Implement From<&String> for Content

This commit is contained in:
Joscha 2024-12-03 15:01:31 +01:00
parent 6f0ae129fa
commit 4a4225f72c
2 changed files with 7 additions and 0 deletions

View file

@ -87,6 +87,12 @@ impl Content {
impl From<String> for Content {
fn from(value: String) -> Self {
Self::Text(value)
}
}
impl From<&String> for Content {
fn from(value: &String) -> Self {
Self::text(value)
}
}