mirror of
https://github.com/rust-lang-nursery/rust-cookbook
synced 2024-11-25 04:50:21 +00:00
fixed spelling in about.md app.md and basics.md
This commit is contained in:
parent
412b70e7b3
commit
fa4ce1c96f
3 changed files with 10 additions and 10 deletions
|
@ -21,7 +21,7 @@ common tasks.
|
|||
The cookbook [index] contains the full list of recipes, organized into
|
||||
a number of sections: "basics", "encoding", "concurrency", etc. The
|
||||
sections themselves are more or less ordered in progression, with
|
||||
later sections being more advanced, and occassionally building on
|
||||
later sections being more advanced, and occasionally building on
|
||||
concepts from earlier sections.
|
||||
|
||||
Within the index, each section contains a list of recipes. The recipes
|
||||
|
|
10
src/app.md
10
src/app.md
|
@ -256,8 +256,8 @@ fn run() -> Result<()> {
|
|||
[![same_file-badge]][same_file] [![cat-filesystem-badge]][cat-filesystem]
|
||||
|
||||
Use [`same_file::is_same_file`] to detect loops for a given path.
|
||||
For example, a loop could be created on a unix system via sym links:
|
||||
```
|
||||
For example, a loop could be created on a Unix system via symlinks:
|
||||
```bash
|
||||
mkdir -p /tmp/foo/bar/baz
|
||||
ln -s /tmp/foo/ /tmp/foo/bar/baz/qux
|
||||
```
|
||||
|
@ -301,7 +301,7 @@ fn main() {
|
|||
|
||||
[![walkdir-badge]][walkdir] [![cat-filesystem-badge]][cat-filesystem]
|
||||
|
||||
Find recusively in the current directory duplicate filenames,
|
||||
Find recursively in the current directory duplicate filenames,
|
||||
printing them only once.
|
||||
|
||||
```rust,no_run
|
||||
|
@ -452,11 +452,11 @@ fn main() {
|
|||
|
||||
[![glob-badge]][glob] [![cat-filesystem-badge]][cat-filesystem]
|
||||
|
||||
Recursively find all png files in the current directory.
|
||||
Recursively find all PNG files in the current directory.
|
||||
In this case, the `**` pattern matches the current directory and all subdirectories.
|
||||
|
||||
You can also use the `**` pattern for any directory, not just the current one.
|
||||
For example, `/media/**/*.png` would match all pngs in `media` and it's subdirectories.
|
||||
For example, `/media/**/*.png` would match all PNGs in `media` and it's subdirectories.
|
||||
|
||||
```rust,no_run
|
||||
# #[macro_use]
|
||||
|
|
|
@ -120,7 +120,7 @@ fn decode(mut bytes: &[u8]) -> Result<Payload> {
|
|||
<a name="ex-rand"></a>
|
||||
## Generate random numbers
|
||||
|
||||
The [`rand`] crate provides a convenient source of psuedo-random numbers.
|
||||
The [`rand`] crate provides a convenient source of pseudo-random numbers.
|
||||
|
||||
[![rand-badge]][rand] [![cat-science-badge]][cat-science]
|
||||
|
||||
|
@ -583,7 +583,7 @@ fn main() {
|
|||
|
||||
Extracts a sorted and deduplicated list of hashtags from a text.
|
||||
|
||||
The hashtag regex given here only catches latin hashtags that start with a letter. The complete [twitter hashtag regex] is way more complicated.
|
||||
The hashtag regex given here only catches Latin hashtags that start with a letter. The complete [twitter hashtag regex] is way more complicated.
|
||||
|
||||
```rust
|
||||
extern crate regex;
|
||||
|
@ -616,8 +616,8 @@ fn main() {
|
|||
|
||||
[![regex-badge]][regex] [![lazy_static-badge]][lazy_static] [![cat-text-processing-badge]][cat-text-processing]
|
||||
|
||||
Replaces all occurences of the hyphenated british english date pattern `2013-01-15`
|
||||
with its equivalent slashed american english date pattern `01/15/2013`.
|
||||
Replaces all occurrences of the hyphenated British English date pattern `2013-01-15`
|
||||
with its equivalent slashed American English date pattern `01/15/2013`.
|
||||
|
||||
The method [`Regex::replace_all`] replaces all occurrences of the whole regex. The
|
||||
`Replacer` trait helps to figure out the replacement string. This trait is implemented
|
||||
|
|
Loading…
Reference in a new issue