File tree Expand file tree Collapse file tree 3 files changed +5
-5
lines changed Expand file tree Collapse file tree 3 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -115,7 +115,7 @@ $ ls target/debug
115115build deps examples libphrases-a7448e02a0468eaa.rlib native
116116```
117117
118- ` libphrases-hash.rlib ` is the compiled crate. Before we see how to use this
118+ ` libphrases-< hash> .rlib ` is the compiled crate. Before we see how to use this
119119crate from another crate, let’s break it up into multiple files.
120120
121121# Multiple File Crates
Original file line number Diff line number Diff line change @@ -225,7 +225,7 @@ sense to put it into a function:
225225``` rust
226226# fn find (_ : & str , _ : char ) -> Option <usize > { None }
227227// Returns the extension of the given file name, where the extension is defined
228- // as all characters proceeding the first `.`.
228+ // as all characters following the first `.`.
229229// If `file_name` has no `.`, then `None` is returned.
230230fn extension_explicit (file_name : & str ) -> Option <& str > {
231231 match find (file_name , '.' ) {
@@ -274,7 +274,7 @@ to get rid of the case analysis:
274274``` rust
275275# fn find (_ : & str , _ : char ) -> Option <usize > { None }
276276// Returns the extension of the given file name, where the extension is defined
277- // as all characters proceeding the first `.`.
277+ // as all characters following the first `.`.
278278// If `file_name` has no `.`, then `None` is returned.
279279fn extension (file_name : & str ) -> Option <& str > {
280280 find (file_name , '.' ). map (| i | & file_name [i + 1 .. ])
Original file line number Diff line number Diff line change @@ -84,8 +84,8 @@ fn it_works() {
8484```
8585
8686` assert! ` is a macro provided by Rust which takes one argument: if the argument
87- is ` true ` , nothing happens. If the argument is ` false ` , it ` panic! ` s . Let's run
88- our tests again:
87+ is ` true ` , nothing happens. If the argument is ` false ` , it will ` panic! ` . Let's
88+ run our tests again:
8989
9090``` bash
9191$ cargo test
You can’t perform that action at this time.
0 commit comments