mirror of
https://git.aramjonghu.dev/AramJonghu/rustlings.git
synced 2026-09-02 00:13:30 +02:00
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:
co-authored by
GitHub
parent
1f2ee8cb62
commit
187d2ad226
@@ -63,7 +63,7 @@ mod tests {
|
||||
// `Option`.
|
||||
|
||||
// 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)`
|
||||
// - change the body of the function to return `Ok(stuff)` where it currently
|
||||
// returns `Some(stuff)`
|
||||
|
||||
Reference in New Issue
Block a user