Implement From<&String> for Content
This commit is contained in:
parent
6f0ae129fa
commit
4a4225f72c
2 changed files with 7 additions and 0 deletions
|
|
@ -20,6 +20,7 @@ A dependency update to an incompatible version is considered a breaking change.
|
|||
### Added
|
||||
|
||||
- `Element::into_document`
|
||||
- `impl From<&String> for Content`
|
||||
- Eponymous JS helper function in readme
|
||||
|
||||
## v0.1.0 - 2024-12-02
|
||||
|
|
|
|||
|
|
@ -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