aboutsummaryrefslogtreecommitdiff
path: root/fondant_derive/src
diff options
context:
space:
mode:
Diffstat (limited to 'fondant_derive/src')
-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 }