Get rid of the leaky box.

It was leftover from an earlier time when there was generic code to load a
toml file and put it into a struct. It is no longer necessary.
master
rasul 5 years ago
parent 9d15eb0042
commit 6c2811d062

@ -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(),
))

Loading…
Cancel
Save