1
0
Fork 0

Runtime config: fixed warning

This commit is contained in:
pca006132 2020-06-29 10:00:13 +08:00 committed by Gitea
parent 8d1b9f7f23
commit 29dd311c0f
1 changed files with 1 additions and 1 deletions

View File

@ -81,7 +81,7 @@ impl Config {
let root_dir = self.fs.root_dir(); let root_dir = self.fs.root_dir();
let mut buffer: Vec<u8> = Vec::new(); let mut buffer: Vec<u8> = Vec::new();
match root_dir.open_file(&["/CONFIG/", key, ".BIN"].concat()) { match root_dir.open_file(&["/CONFIG/", key, ".BIN"].concat()) {
Ok(mut f) => f.read_to_end(&mut buffer).map(|v| ())?, Ok(mut f) => f.read_to_end(&mut buffer).map(|_| ())?,
Err(_) => match root_dir.open_file("/CONFIG.TXT") { Err(_) => match root_dir.open_file("/CONFIG.TXT") {
Ok(f) => parse_config(key, &mut buffer, f)?, Ok(f) => parse_config(key, &mut buffer, f)?,
Err(_) => return Err(Error::KeyNotFoundError(key)), Err(_) => return Err(Error::KeyNotFoundError(key)),