aboutsummaryrefslogtreecommitdiff
path: root/fondant_derive
diff options
context:
space:
mode:
authorAkshay <[email protected]>2020-04-03 13:11:47 +0100
committerAkshay <[email protected]>2020-04-03 13:11:47 +0100
commit18678dec57136707a73b9cc044a65b67c18b37fd (patch)
tree47aa0c24608caa0823b368544cf83fee188d149c /fondant_derive
parent1a4e12184166a0abc62e2ffe2e04046de461eb8c (diff)
supress unused Result warning
Diffstat (limited to 'fondant_derive')
-rw-r--r--fondant_derive/src/lib.rs4
1 files changed, 2 insertions, 2 deletions
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 {
127 match File::open(&config_file) { 127 match File::open(&config_file) {
128 Ok(mut cfg) => { 128 Ok(mut cfg) => {
129 let mut cfg_data = String::new(); 129 let mut cfg_data = String::new();
130 cfg.read_to_string(&mut cfg_data); 130 cfg.read_to_string(&mut cfg_data).unwrap();
131 131
132 let config: #struct_ident = #ser::from_str(&cfg_data[..]) 132 let config: #struct_ident = #ser::from_str(&cfg_data[..])
133 .map_err(|_| FondantError::ConfigParseError)?; 133 .map_err(|_| FondantError::ConfigParseError)?;
@@ -154,7 +154,7 @@ fn gen_impl(ast: &DeriveInput, cfg_path: ConfigPath) -> TokenStream {
154 .map_err(|_| FondantError::FileOpenError)?; 154 .map_err(|_| FondantError::FileOpenError)?;
155 155
156 let s = #ser::#ser_fn(self).map_err(|_| FondantError::ConfigParseError)?; 156 let s = #ser::#ser_fn(self).map_err(|_| FondantError::ConfigParseError)?;
157 f.write_all(s.as_bytes()).map_err(|_| FondantError::FileWriteError); 157 f.write_all(s.as_bytes()).map_err(|_| FondantError::FileWriteError)?;
158 Ok(()) 158 Ok(())
159 } 159 }
160 } 160 }