Skip to content

Commit 26c9a26

Browse files
Fix clippy::uninlined_format_args lints (#55)
1 parent fb0bbea commit 26c9a26

File tree

3 files changed

+10
-11
lines changed

3 files changed

+10
-11
lines changed

src/error.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ impl std::fmt::Display for Error {
5353
write!(f, "unexpected end of stream")
5454
}
5555
Self::UnexpectedData(pos) => {
56-
write!(f, "unexpected data at position {}", pos)
56+
write!(f, "unexpected data at position {pos}")
5757
}
5858
Self::InvalidValue => {
5959
write!(f, "invalid value")
@@ -87,7 +87,7 @@ impl std::fmt::Display for Error {
8787
)
8888
}
8989
Self::InvalidNumber(pos) => {
90-
write!(f, "invalid number at position {}", pos)
90+
write!(f, "invalid number at position {pos}")
9191
}
9292
}
9393
}

src/filter_functions.rs

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -77,26 +77,25 @@ impl std::fmt::Display for FilterValueListParserError {
7777
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
7878
match *self {
7979
Self::PercentageValue(pos) => {
80-
write!(f, "a percentage value detected at position {}", pos)
80+
write!(f, "a percentage value detected at position {pos}")
8181
}
8282
Self::NegativeValue(pos) => {
83-
write!(f, "a negative value detected at position {}", pos)
83+
write!(f, "a negative value detected at position {pos}")
8484
}
8585
Self::InvalidAngle(pos) => {
86-
write!(f, "an invalid angle at position {}", pos)
86+
write!(f, "an invalid angle at position {pos}")
8787
}
8888
Self::MissingDropShadowOffset(pos) => {
8989
write!(
9090
f,
91-
"drop-shadow offset values are expected at position {}",
92-
pos
91+
"drop-shadow offset values are expected at position {pos}"
9392
)
9493
}
9594
Self::InvalidUrl(pos) => {
96-
write!(f, "an invalid url at position {}", pos)
95+
write!(f, "an invalid url at position {pos}")
9796
}
9897
Self::StreamErrors(ref e) => {
99-
write!(f, "{}", e)
98+
write!(f, "{e}")
10099
}
101100
}
102101
}

src/font.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,9 @@ impl Display for FontFamily {
4343
Self::SansSerif => "sans-serif".to_string(),
4444
Self::Cursive => "cursive".to_string(),
4545
Self::Fantasy => "fantasy".to_string(),
46-
Self::Named(s) => format!("\"{}\"", s),
46+
Self::Named(s) => format!("\"{s}\""),
4747
};
48-
write!(f, "{}", str)
48+
write!(f, "{str}")
4949
}
5050
}
5151

0 commit comments

Comments
 (0)