Implement From<&String> for Content
This commit is contained in:
parent
6f0ae129fa
commit
4a4225f72c
2 changed files with 7 additions and 0 deletions
|
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue