Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: fix some comments #372

Merged
merged 1 commit into from
Jun 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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