Skip to content

Commit 62eee7b

Browse files
authored
Merge pull request #942 from rust-embedded/clippy189
clippy 1.89
2 parents 23464b3 + 8905af6 commit 62eee7b

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/util.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -436,14 +436,14 @@ pub fn build_rs(config: &Config) -> TokenStream {
436436
}
437437

438438
pub trait DimSuffix {
439-
fn expand_dim(&self, suffix: &str) -> Cow<str>;
440-
fn remove_dim(&self) -> Cow<str> {
439+
fn expand_dim(&self, suffix: &str) -> Cow<'_, str>;
440+
fn remove_dim(&self) -> Cow<'_, str> {
441441
self.expand_dim("")
442442
}
443443
}
444444

445445
impl DimSuffix for str {
446-
fn expand_dim(&self, suffix: &str) -> Cow<str> {
446+
fn expand_dim(&self, suffix: &str) -> Cow<'_, str> {
447447
if self.contains("%s") {
448448
self.replace(if self.contains("[%s]") { "[%s]" } else { "%s" }, suffix)
449449
.into()
@@ -454,11 +454,11 @@ impl DimSuffix for str {
454454
}
455455

456456
pub trait FullName {
457-
fn fullname(&self, ignore_group: bool) -> Cow<str>;
457+
fn fullname(&self, ignore_group: bool) -> Cow<'_, str>;
458458
}
459459

460460
impl FullName for RegisterInfo {
461-
fn fullname(&self, ignore_group: bool) -> Cow<str> {
461+
fn fullname(&self, ignore_group: bool) -> Cow<'_, str> {
462462
fullname(&self.name, &self.alternate_group, ignore_group)
463463
}
464464
}
@@ -471,7 +471,7 @@ pub fn fullname<'a>(name: &'a str, group: &Option<String>, ignore_group: bool) -
471471
}
472472

473473
impl FullName for PeripheralInfo {
474-
fn fullname(&self, _ignore_group: bool) -> Cow<str> {
474+
fn fullname(&self, _ignore_group: bool) -> Cow<'_, str> {
475475
self.name.as_str().into()
476476
}
477477
}

0 commit comments

Comments
 (0)