diff --git a/riklet/src/cli/config.rs b/riklet/src/cli/config.rs index c73d597a..e2b21d8d 100644 --- a/riklet/src/cli/config.rs +++ b/riklet/src/cli/config.rs @@ -66,9 +66,9 @@ impl Configuration { "Reading configuration from file {}", path.display() ); - let contents = std::fs::read(path).map_err(ConfigurationError::Load)?; + let content = std::fs::read_to_string(path).map_err(ConfigurationError::Load)?; - toml::from_slice(&contents).map_err(ConfigurationError::Parse) + toml::from_str(&content).map_err(ConfigurationError::Parse) } /// Load the configuration file