From fa4ce1c96f143eef40e32fc79fe66c44f8986be5 Mon Sep 17 00:00:00 2001 From: Michal Budzynski Date: Sun, 30 Jul 2017 14:50:46 +0200 Subject: [PATCH] fixed spelling in about.md app.md and basics.md --- src/about.md | 2 +- src/app.md | 10 +++++----- src/basics.md | 8 ++++---- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/about.md b/src/about.md index 08c8fce..aa80611 100644 --- a/src/about.md +++ b/src/about.md @@ -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 diff --git a/src/app.md b/src/app.md index 979e054..4af49a7 100644 --- a/src/app.md +++ b/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] diff --git a/src/basics.md b/src/basics.md index 81c7225..6454355 100644 --- a/src/basics.md +++ b/src/basics.md @@ -120,7 +120,7 @@ fn decode(mut bytes: &[u8]) -> Result { ## 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