Skip to content

Commit

Permalink
fix mistake in Config::load and Config::save docs (fixes #256)
Browse files Browse the repository at this point in the history
  • Loading branch information
aatxe committed Mar 18, 2024
1 parent b5a017a commit f640e49
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/client/data/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ impl Config {

/// Loads a configuration from the desired path. This will use the file extension to detect
/// which format to parse the file as (json, toml, or yaml). Using each format requires having
/// its respective crate feature enabled. Only json is available by default.
/// its respective crate feature enabled. Only toml is available by default.
pub fn load<P: AsRef<Path>>(path: P) -> Result<Config> {
let mut file = File::open(&path)?;
let mut data = String::new();
Expand Down Expand Up @@ -317,7 +317,7 @@ impl Config {

/// Saves a configuration to the desired path. This will use the file extension to detect
/// which format to parse the file as (json, toml, or yaml). Using each format requires having
/// its respective crate feature enabled. Only json is available by default.
/// its respective crate feature enabled. Only toml is available by default.
pub fn save<P: AsRef<Path>>(&mut self, path: P) -> Result<()> {
let _ = self.path.take();
let mut file = File::create(&path)?;
Expand Down

0 comments on commit f640e49

Please sign in to comment.