config: remove unnecessary mut
This commit is contained in:
parent
cd12ebf9e9
commit
e207c073ee
@ -77,7 +77,7 @@ impl Config {
|
||||
Ok(Config { fs })
|
||||
}
|
||||
|
||||
fn read<'b>(&mut self, key: &'b str) -> Result<'b, Vec<u8>> {
|
||||
fn read<'b>(&self, key: &'b str) -> Result<'b, Vec<u8>> {
|
||||
let root_dir = self.fs.root_dir();
|
||||
let mut buffer: Vec<u8> = Vec::new();
|
||||
match root_dir.open_file(&["/CONFIG/", key, ".BIN"].concat()) {
|
||||
@ -90,7 +90,7 @@ impl Config {
|
||||
Ok(buffer)
|
||||
}
|
||||
|
||||
pub fn read_str<'b>(&mut self, key: &'b str) -> Result<'b, String> {
|
||||
pub fn read_str<'b>(&self, key: &'b str) -> Result<'b, String> {
|
||||
Ok(String::from_utf8(self.read(key)?)?)
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user