-
-
Save rust-play/23e03fc9d2078417bbea9027a3f195c3 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