Skip to content

Commit 7f585d0

Browse files
ehusstraviscross
authored andcommitted
Add a comment explaining the FromStr example
1 parent 5fcaa8e commit 7f585d0

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

src/types/never.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@ The never type `!` is a type with no values, representing computations that neve
3939
> }
4040
> }
4141
>
42+
> // This does not need to check for the `Err` variant because
43+
> // `FromStr::Err` is the never type.
4244
> let Ok(s) = Anything::from_str("example");
4345
> ```
4446

0 commit comments

Comments
 (0)