use std::fs::File; use std::io::Read; fn main() { let path = "/home/aaryaman/projects/rusty/oxibit/Hawkeye.torrent"; let mut torrent = File::open(path).unwrap(); let mut buf = vec![]; torrent.read_to_end(&mut buf); let contents = String::from_utf8_lossy(&buf); println!("{}", contents); }
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter