Skip to content

Commit

Permalink
Merge pull request #5 from ramiroaisen/core-docs
Browse files Browse the repository at this point in the history
core: improve doc examples
  • Loading branch information
ramiroaisen authored Jul 6, 2024
2 parents a21eba7 + 59ae340 commit d1da435
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ struct MyConfig {

let mut loader = ConfigLoader::<MyConfig>::new();

loader.defaults()?;
loader.file("config.json", Format::Json)?;
loader.env()?;
loader.defaults()?;

// config have the type MyConfig here
let config = loader.finish()?;
Expand Down
2 changes: 1 addition & 1 deletion metre-macros/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "metre-macros"
version = "0.2.3"
version = "0.2.4"
edition = "2021"
license = "Apache-2.0"
description = "Macros for the metre crate"
Expand Down
2 changes: 1 addition & 1 deletion metre/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "metre"
version = "0.2.3"
version = "0.2.4"
edition = "2021"
description = "Metre, the configuration loader for Rust"
repository = "https://github.com/ramiroaisen/metre"
Expand Down
2 changes: 1 addition & 1 deletion metre/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@
//!
//! let mut loader = ConfigLoader::<MyConfig>::new();
//!
//! loader.defaults()?;
//! loader.file("config.json", Format::Json)?;
//! loader.env()?;
//! loader.defaults()?;
//!
//! // config have the type MyConfig here, or loader.finish() returns an error
//! let config = loader.finish()?;
Expand Down
2 changes: 1 addition & 1 deletion metre/tests/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ fn readme_example() -> Result<(), Box<dyn std::error::Error>> {

let mut loader = ConfigLoader::<MyConfig>::new();

loader.defaults()?;
loader.file("config.json", Format::Json)?;
loader.env()?;
loader.defaults()?;

// config have the type MyConfig here, or loader.finish() returns an error
let config = loader.finish()?;
Expand Down

0 comments on commit d1da435

Please sign in to comment.