Skip to content

Commit

Permalink
extra test
Browse files Browse the repository at this point in the history
  • Loading branch information
yegor256 committed Jan 9, 2023
1 parent 8b8cb9d commit a5aa939
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/hex.rs
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,12 @@ impl Hex {
}

/// Make hex from the bytes composing `&str`.
///
/// ```
/// use sodg::Hex;
/// let d = Hex::from_str_bytes("Ура!");
/// assert_eq!("D0-A3-D1-80-D0-B0-21", d.print());
/// ```
pub fn from_str_bytes(d: &str) -> Self {
Self::from_slice(d.as_bytes())
}
Expand Down

0 comments on commit a5aa939

Please sign in to comment.