MCPcopy Create free account
hub / github.com/daniel-e/rustml / path

Method path

src/datasets.rs:139–149  ·  view source on GitHub ↗
(fname: &str)

Source from the content-addressed store, hash-verified

137 }
138
139 fn path(fname: &str) -> Result<String, &'static str> {
140
141 match home_dir() {
142 Some(ref mut p) => {
143 p.push(Path::new(MNIST_PATH));
144 p.push(Path::new(fname));
145 Ok(p.as_path().to_str().unwrap().to_string())
146 }
147 None => Err("Could not get home directory.")
148 }
149 }
150
151 /// Reads the default MNIST training set.
152 ///

Callers

nothing calls this directly

Calls 1

to_stringMethod · 0.80

Tested by

no test coverage detected