From 18678dec57136707a73b9cc044a65b67c18b37fd Mon Sep 17 00:00:00 2001 From: Akshay Date: Fri, 3 Apr 2020 17:41:47 +0530 Subject: supress unused Result warning --- fondant_derive/src/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'fondant_derive/src') diff --git a/fondant_derive/src/lib.rs b/fondant_derive/src/lib.rs index 1a0b945..62106c4 100644 --- a/fondant_derive/src/lib.rs +++ b/fondant_derive/src/lib.rs @@ -127,7 +127,7 @@ fn gen_impl(ast: &DeriveInput, cfg_path: ConfigPath) -> TokenStream { match File::open(&config_file) { Ok(mut cfg) => { let mut cfg_data = String::new(); - cfg.read_to_string(&mut cfg_data); + cfg.read_to_string(&mut cfg_data).unwrap(); let config: #struct_ident = #ser::from_str(&cfg_data[..]) .map_err(|_| FondantError::ConfigParseError)?; @@ -154,7 +154,7 @@ fn gen_impl(ast: &DeriveInput, cfg_path: ConfigPath) -> TokenStream { .map_err(|_| FondantError::FileOpenError)?; let s = #ser::#ser_fn(self).map_err(|_| FondantError::ConfigParseError)?; - f.write_all(s.as_bytes()).map_err(|_| FondantError::FileWriteError); + f.write_all(s.as_bytes()).map_err(|_| FondantError::FileWriteError)?; Ok(()) } } -- cgit v1.2.3