Skip to content

Commit

Permalink
fix(from_str): Correct typos
Browse files Browse the repository at this point in the history
typos in the comments
  • Loading branch information
jkremser committed Feb 21, 2021
1 parent ab57c26 commit 5f7c89f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions exercises/conversions/from_str.rs
Expand Up @@ -13,13 +13,13 @@ struct Person {
// I AM NOT DONE

// Steps:
// 1. If the length of the provided string is 0 an error should be returned
// 1. If the length of the provided string is 0, an error should be returned
// 2. Split the given string on the commas present in it
// 3. Only 2 elements should returned from the split, otherwise return an error
// 3. Only 2 elements should be returned from the split, otherwise return an error
// 4. Extract the first element from the split operation and use it as the name
// 5. Extract the other element from the split operation and parse it into a `usize` as the age
// with something like `"4".parse::<usize>()`.
// 5. If while extracting the name and the age something goes wrong an error should be returned
// with something like `"4".parse::<usize>()`
// 5. If while extracting the name and the age something goes wrong, an error should be returned
// If everything goes well, then return a Result of a Person object

impl FromStr for Person {
Expand Down

0 comments on commit 5f7c89f

Please sign in to comment.