diff --git a/src/config/config.rs b/src/config/config.rs index 1cf13a1..5640f70 100644 --- a/src/config/config.rs +++ b/src/config/config.rs @@ -47,10 +47,8 @@ impl Config { path.display(), ); - // this Box::leak() may not be great? something about leaking memory? - // i don't know what i'm doing here? Ok(try_print!( - toml::from_str(Box::leak(file_contents.into_boxed_str())), + toml::from_str(&file_contents), "Unable to parse toml: {}", path.display(), ))