Fixed shortcoming in docs.
Added a comment in the docs about how to make Config not error out if a configuration file isn't present.
This commit is contained in:
parent
727ad252cc
commit
2aa202d05c
|
@ -273,7 +273,8 @@ impl Default for Settings {
|
||||||
```
|
```
|
||||||
|
|
||||||
Again, exceeding the book's parameters, I'm going to say that if the file is
|
Again, exceeding the book's parameters, I'm going to say that if the file is
|
||||||
missing the default parameters should hold:
|
missing the default parameters should hold, so the presence of a valid
|
||||||
|
configuration isn't a show-stopper and should not be required.
|
||||||
|
|
||||||
``` rust
|
``` rust
|
||||||
pub(crate) fn get_configuration() -> Result<Settings, config::ConfigError> {
|
pub(crate) fn get_configuration() -> Result<Settings, config::ConfigError> {
|
||||||
|
|
Loading…
Reference in New Issue