Skip to content

Commit

Permalink
Merge pull request #36 from tpoliaw/short_string_into_string
Browse files Browse the repository at this point in the history
  • Loading branch information
Keruspe authored Jul 20, 2024
2 parents c1fbf90 + 1bae04e commit 6f5a9f7
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions types/src/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,12 @@ impl fmt::Display for ShortString {
}
}

impl From<ShortString> for String {
fn from(value: ShortString) -> Self {
value.0
}
}

impl<'a> LongString {
/// Get a reference to a LongString as &[u8]
pub fn as_bytes(&'a self) -> &'a [u8] {
Expand Down

0 comments on commit 6f5a9f7

Please sign in to comment.