Skip to content

Commit

Permalink
Fix clippy lints.
Browse files Browse the repository at this point in the history
  • Loading branch information
raldone01 committed Oct 25, 2022
1 parent 95cf838 commit 94200a0
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 6 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Fixes
- Fixed clippy lints

## [0.2.3] - 2022-09-25

Moved to [ink-feather-org](https://github.com/ink-feather-org/trait_cast_rs).
Expand Down
2 changes: 1 addition & 1 deletion trait_cast_rs/examples/manual_gen_struct.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ impl<T: Display> Dog for HybridPet<T> {
}
impl<V: Display + ?Sized, T: Display> Cat<V> for HybridPet<T> {
fn meow(&self, speak: &V) {
println!("{}: Meow! {}", self.name, speak);
println!("{}: Meow! {speak}", self.name);
}
}

Expand Down
2 changes: 1 addition & 1 deletion trait_cast_rs/examples/with_decl_macro_gen_struct.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ impl<T: Display> Dog for HybridPet<T> {
}
impl<V: Display + ?Sized, T: Display> Cat<V> for HybridPet<T> {
fn meow(&self, speak: &V) {
println!("{}: Meow! {}", self.name, speak);
println!("{}: Meow! {speak}", self.name);
}
}

Expand Down
6 changes: 3 additions & 3 deletions trait_cast_rs/examples/with_proc_macro_enum.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,20 @@ enum HybridPet {
impl HybridPet {
fn greet(&self) {
let Self::Name(name) = self;
println!("{}: Hi", name)
println!("{name}: Hi")
}
}

impl Dog for HybridPet {
fn bark(&self) {
let Self::Name(name) = self;
println!("{}: Woof!", name)
println!("{name}: Woof!")
}
}
impl Cat for HybridPet {
fn meow(&self) {
let Self::Name(name) = self;
println!("{}: Meow!", name)
println!("{name}: Meow!")
}
}

Expand Down
2 changes: 1 addition & 1 deletion trait_cast_rs/examples/with_proc_macro_mut.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ impl HybridPet {

impl Dog for HybridPet {
fn rename(&mut self, new_name: String) {
println!("Changing name from \"{}\" to \"{}\"", self.name, new_name);
println!("Changing name from \"{}\" to \"{new_name}\"", self.name);
self.name = new_name;
}
}
Expand Down

0 comments on commit 94200a0

Please sign in to comment.