Skip to content

Commit 6b5d683

Browse files
committed
Fix clippy
1 parent 185c785 commit 6b5d683

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

src/cli.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ pub fn run() {
248248
.run()
249249
.with_context(|| format!("by svdtools ({})", clap::crate_version!()))
250250
{
251-
log::error!("{:?}", e);
251+
log::error!("{e:?}");
252252

253253
std::process::exit(1);
254254
}

src/html/html_cli.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ fn short_ra(ra: Option<ReadAction>) -> &'static str {
122122

123123
trait GetI64 {
124124
fn get_i64(&self, key: &str) -> Option<i64>;
125-
fn get_str(&self, key: &str) -> Option<Cow<str>>;
125+
fn get_str(&self, key: &str) -> Option<Cow<'_, str>>;
126126
}
127127

128128
impl GetI64 for Object {
@@ -131,7 +131,7 @@ impl GetI64 for Object {
131131
.and_then(|v| v.as_view().as_scalar())
132132
.and_then(|s| s.to_integer())
133133
}
134-
fn get_str(&self, key: &str) -> Option<Cow<str>> {
134+
fn get_str(&self, key: &str) -> Option<Cow<'_, str>> {
135135
self.get(key)
136136
.and_then(|v| v.as_view().as_scalar())
137137
.map(|s| s.into_cow_str())
@@ -508,7 +508,7 @@ fn parse_device(svdfile: impl AsRef<Path>) -> anyhow::Result<Object> {
508508

509509
fn process_svd(svdfile: impl AsRef<Path>) -> anyhow::Result<Object> {
510510
let svdfile = svdfile.as_ref().to_str().unwrap();
511-
println!("Processing {}", svdfile);
511+
println!("Processing {svdfile}");
512512
parse_device(svdfile).with_context(|| format!("In file {svdfile}"))
513513
}
514514

src/patch/iterators.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,15 @@ where
2929
Self: Iterator + Sized,
3030
Self::Item: Name,
3131
{
32-
fn matched(self, spec: &str) -> MatchIter<Self>;
32+
fn matched(self, spec: &str) -> MatchIter<'_, Self>;
3333
}
3434

3535
impl<I> Matched for I
3636
where
3737
Self: Iterator + Sized,
3838
Self::Item: Name,
3939
{
40-
fn matched(self, spec: &str) -> MatchIter<Self> {
40+
fn matched(self, spec: &str) -> MatchIter<'_, Self> {
4141
MatchIter { it: self, spec }
4242
}
4343
}

0 commit comments

Comments
 (0)