Skip to content

Commit c121c03

Browse files
committed
chore(git): merge from master
2 parents c635112 + f634855 commit c121c03

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

src/args/threads.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,22 +17,22 @@ pub enum Threads {
1717

1818
/// Error that occurs when converting a string to an instance of [`Threads`].
1919
#[derive(Debug, Display, Clone, PartialEq, Eq, Error)]
20+
#[non_exhaustive]
2021
pub enum FromStrError {
2122
#[display("Value is neither {AUTO:?}, {MAX:?}, nor a number: {_0}")]
2223
InvalidSyntax(ParseIntError),
2324
}
2425

2526
impl FromStr for Threads {
2627
type Err = FromStrError;
27-
fn from_str(value: &str) -> Result<Self, Self::Err> {
28-
let value = value.trim();
29-
match value {
28+
fn from_str(text: &str) -> Result<Self, Self::Err> {
29+
let text = text.trim();
30+
match text {
3031
AUTO => return Ok(Threads::Auto),
3132
MAX => return Ok(Threads::Max),
3233
_ => {}
3334
};
34-
value
35-
.parse()
35+
text.parse()
3636
.map_err(FromStrError::InvalidSyntax)
3737
.map(Threads::Fixed)
3838
}

0 commit comments

Comments
 (0)