Enable clippy::suspicious_to_owned (#9004)
Another small change: calling to owned on the `Cow` was cloning the `Cow`, not its contents and so calling `clone` makes this more explicit
This commit is contained in:
@@ -224,7 +224,7 @@ impl Clone for Toast {
|
||||
fn clone(&self) -> Self {
|
||||
Toast {
|
||||
id: self.id,
|
||||
msg: self.msg.to_owned(),
|
||||
msg: self.msg.clone(),
|
||||
on_click: self.on_click.clone(),
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user