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

Function bytes_from_file

0d_files/rust/binary/src/main.rs:4–6  ·  view source on GitHub ↗
(filename: impl AsRef<std::path::Path>)

Source from the content-addressed store, hash-verified

2use std::path::{Path, PathBuf};
3
4fn bytes_from_file(filename: impl AsRef<std::path::Path>) -> io::Result<Vec<u8>> {
5 Ok(std::fs::read(filename)?)
6}
7
8fn main() -> io::Result<()> {
9 let args: Vec<String> = std::env::args().collect();

Callers 1

mainFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected