Update errors1.rs - Add Result type signature as it is difficult for new comers to understand Generics and Error all at once. (#157)

Update errors1.rs - Add Result type signature as it is difficult for new comers to understand Generics and Error all at once.
This commit is contained in:
liv 2019-05-22 10:53:18 +02:00 committed by GitHub
commit 5423bc66a9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -63,7 +63,7 @@ mod tests {
// `Option`. // `Option`.
// To make this change, you'll need to: // To make this change, you'll need to:
// - update the return type in the function signature to be a Result that // - update the return type in the function signature to be a Result<String, String> that
// could be the variants `Ok(String)` and `Err(String)` // could be the variants `Ok(String)` and `Err(String)`
// - change the body of the function to return `Ok(stuff)` where it currently // - change the body of the function to return `Ok(stuff)` where it currently
// returns `Some(stuff)` // returns `Some(stuff)`