MCPcopy Create free account
hub / github.com/bedroombuilds/python2rust / main

Function main

0d_files/rust/binary/src/main.rs:8–20  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

6}
7
8fn main() -> io::Result<()> {
9 let args: Vec<String> = std::env::args().collect();
10
11 let data = bytes_from_file(&args[1])?;
12 println!("data size {}bytes", data.len());
13
14 let user_home: PathBuf = dirs::home_dir().expect("Could not find home directory.");
15 let user_fonts = Path::new(&user_home).join("Library").join("Fonts");
16 println!("user_home: {:?} user_fonts: {:?}", user_home, user_fonts);
17
18 let _data = bytes_from_file(user_fonts)?;
19 Ok(())
20}

Callers

nothing calls this directly

Calls 1

bytes_from_fileFunction · 0.70

Tested by

no test coverage detected