-
-
Save RandyMcMillan/38e821688a9673ecc742f537b2432aa8 to your computer and use it in GitHub Desktop.
Code shared from the Rust Playground
This file contains hidden or 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
use std::str; | |
fn main() { | |
let self_bytes: &[u8] = include_bytes!("main.rs"); | |
match str::from_utf8(self_bytes) { | |
Ok(s) => println!("{}", s), | |
Err(e) => println!("Error: {}", e), | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment