Skip to content

Commit

Permalink
feat: Implement ToStatic for String
Browse files Browse the repository at this point in the history
  • Loading branch information
fasterthanlime committed Aug 16, 2024
1 parent 66afcbd commit 058de21
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions merde_json/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -958,6 +958,14 @@ impl ToStatic for bool {
}
}

impl ToStatic for String {
type Output = String;

fn to_static(&self) -> Self::Output {
self.clone()
}
}

impl<T: ToStatic> ToStatic for Option<T> {
type Output = Option<T::Output>;

Expand Down

0 comments on commit 058de21

Please sign in to comment.