From e207c073eec8767216dc75bb950005c64b16d342 Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Mon, 6 Jul 2020 11:42:43 +0800 Subject: [PATCH] config: remove unnecessary mut --- src/runtime/src/config.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/runtime/src/config.rs b/src/runtime/src/config.rs index 05631b5..6902f51 100644 --- a/src/runtime/src/config.rs +++ b/src/runtime/src/config.rs @@ -77,7 +77,7 @@ impl Config { Ok(Config { fs }) } - fn read<'b>(&mut self, key: &'b str) -> Result<'b, Vec> { + fn read<'b>(&self, key: &'b str) -> Result<'b, Vec> { let root_dir = self.fs.root_dir(); let mut buffer: Vec = 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)?)?) } }