Skip to content

Commit

Permalink
Added From<&String> for ToastCaption
Browse files Browse the repository at this point in the history
  • Loading branch information
jorgsaa committed Oct 10, 2024
1 parent f9005e5 commit 438234a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/toast.rs
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,12 @@ impl From<String> for ToastCaption {
}
}

impl From<&String> for ToastCaption {
fn from(s: &String) -> Self {
Self::Simple(s.clone())
}
}

impl From<&str> for ToastCaption {
fn from(s: &str) -> Self {
Self::Simple(s.to_owned())
Expand Down

0 comments on commit 438234a

Please sign in to comment.