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:
Kirpal Grewal 2024-03-07 16:30:40 +00:00 committed by GitHub
parent 105e654dce
commit 85e6bc94e9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 1 additions and 2 deletions

View file

@ -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(),
}
}