mirror of
https://github.com/uutils/coreutils
synced 2024-12-13 06:42:42 +00:00
Merge pull request #4760 from cakebaker/test_wc_use_variables_directly_in_format_strings
test,wc: use vars directly in format! strings
This commit is contained in:
commit
fe7dd4071d
2 changed files with 7 additions and 7 deletions
|
@ -16,12 +16,12 @@ pub type ParseResult<T> = Result<T, ParseError>;
|
|||
impl std::fmt::Display for ParseError {
|
||||
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||
match self {
|
||||
Self::Expected(s) => write!(f, "expected {}", s),
|
||||
Self::Expected(s) => write!(f, "expected {s}"),
|
||||
Self::ExpectedValue => write!(f, "expected value"),
|
||||
Self::MissingArgument(s) => write!(f, "missing argument after {}", s),
|
||||
Self::ExtraArgument(s) => write!(f, "extra argument {}", s),
|
||||
Self::UnknownOperator(s) => write!(f, "unknown operator {}", s),
|
||||
Self::InvalidInteger(s) => write!(f, "invalid integer {}", s),
|
||||
Self::MissingArgument(s) => write!(f, "missing argument after {s}"),
|
||||
Self::ExtraArgument(s) => write!(f, "extra argument {s}"),
|
||||
Self::UnknownOperator(s) => write!(f, "unknown operator {s}"),
|
||||
Self::InvalidInteger(s) => write!(f, "invalid integer {s}"),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -28,9 +28,9 @@ impl<'a> fmt::Display for BufReadDecoderError<'a> {
|
|||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
match *self {
|
||||
BufReadDecoderError::InvalidByteSequence(bytes) => {
|
||||
write!(f, "invalid byte sequence: {:02x?}", bytes)
|
||||
write!(f, "invalid byte sequence: {bytes:02x?}")
|
||||
}
|
||||
BufReadDecoderError::Io(ref err) => write!(f, "underlying bytestream error: {}", err),
|
||||
BufReadDecoderError::Io(ref err) => write!(f, "underlying bytestream error: {err}"),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue