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

@ -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

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)
}
}