Skip to content

Instantly share code, notes, and snippets.

@bananu7
Created December 20, 2023 22:47
Show Gist options
  • Save bananu7/961dc1d08e6ec8bf71155e0f9448545d to your computer and use it in GitHub Desktop.
Save bananu7/961dc1d08e6ec8bf71155e0f9448545d to your computer and use it in GitHub Desktop.
fn b_to_s(bytes: &[u8]) -> String {
let hex : String = bytes.iter()
.map(|b| format!("{:02x}", b).to_string())
.collect::<Vec<String>>()
.join("");
hex
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment