WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Commit acc23cf

Browse files
maggiemossQEDK
authored andcommitted
Update README.md to include example of overriding defaults
This was a feature we were looking for, and were able to use by looking at `src/ini.rs`. Having a quick example on the page would have helped us
1 parent 02c31d8 commit acc23cf

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,16 @@ You can activate it by adding it as a feature like this:
188188
configparser = { version = "3.2.0", features = ["tokio"] }
189189
```
190190

191+
## Override Defaults
192+
193+
You can change the default configuration options like this. See the API for more verbose documentation.
194+
195+
```
196+
let mut default = IniDefault::default();
197+
default.multiline = true;
198+
let mut config = Ini::new_from_defaults(default);
199+
```
200+
191201
## 📜 License
192202

193203
Licensed under either of

0 commit comments

Comments
 (0)