Created
December 20, 2023 22:47
-
-
Save bananu7/961dc1d08e6ec8bf71155e0f9448545d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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