Skip to content

Commit

Permalink
Fix some typos in docs and comments (#372)
Browse files Browse the repository at this point in the history
Signed-off-by: wangcundashang <[email protected]>
  • Loading branch information
wangcundashang authored Jun 19, 2024
1 parent cf842e9 commit 9391fdb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion impl/doc/try_from.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Derive `TryFrom` allows you to convert enum discriminants into their correspondi

By default, a `TryFrom<isize>` is generated, matching the [type of the discriminant](https://doc.rust-lang.org/reference/items/enumerations.html#discriminants).
The type can be changed with a `#[repr(u/i*)]` attribute, e.g., `#[repr(u8)]` or `#[repr(i32)]`.
Only field-less variants can be constructed from their variant, therefor the `TryFrom` implementation will return an error for a discriminant representing a variant with fields.
Only field-less variants can be constructed from their variant, therefore the `TryFrom` implementation will return an error for a discriminant representing a variant with fields.

```rust
# #[cfg(msrv)] fn main() {} // TODO: Remove once MSRV bumps 1.66 or higher.
Expand Down
2 changes: 1 addition & 1 deletion src/convert.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ mod try_from {
}

#[cfg(feature = "std")]
// `T` should only be an integer type and therefor be debug
// `T` should only be an integer type and therefore be debug
impl<T: fmt::Debug> std::error::Error for TryFromReprError<T> {}
}

Expand Down

0 comments on commit 9391fdb

Please sign in to comment.