Age | Commit message (Collapse) | Author |
|
|
|
This also enables support for 128 bit integers.
Nothing is tested, though.
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
|
|
|
|
Because of the clash in names with the TryInto and TryFrom traits, we're
renaming the functions here to try_serialize/try_deserialize.
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
|
|
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
|
|
|
|
|
|
|
|
Cherry picked, fixed merge conflict in Cargo.toml and ran cargo-fmt on
the new tree.
(cherry picked from commit 43ca83a4fa6ea55274f7c78a1914fe93476916ed)
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
|
|
This patch adds a builder-pattern version of Config::merge(), which can
be used for method-chain-building Config objects.
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
|
|
Config::merge() overwrite it later
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
|
|
|
|
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
|
|
|
|
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Tested-by: Matthias Beyer <mail@beyermatthias.de>
|
|
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
|
|
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
|
|
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
|
|
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
|
|
As reported in
https://github.com/hjson/hjson-rust/issues/23
the issue of the failing tests is the serde_hjson crate. The problem can
be prevented (as reported by
https://github.com/hjson/hjson-rust/issues/23#issuecomment-775520018) by
disabling the default features of the crate (namingly preservation of
key order).
This commit disables the default features of serde_hjson to fix our
tests.
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
|
|
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
|
|
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
|
|
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
|
|
Update version in usage example
|
|
Ensure format
|
|
Run cargo-fmt
|
|
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
|
|
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
|
|
|
|
Fix paths in tests expectations for all platforms
|
|
|
|
|
|
chore: Update float-cmp to 0.6
|
|
Fix of all the clippy warnings and removing of deprecated Error::description method
|
|
|
|
|
|
|
|
|
|
|
|
Allow arbitrary types of map keys
|
|
|
|
|
|
|
|
|
|
port to nom 5
|
|
Of particular interest are maps that have numbers or enums as keys.
Closes #74.
|
|
|
|
Remove ValueWithKey struct
|
|
While using this library, I end up having lifetime issues with
`Config::get`. I've seen that current implementation forces the calleer
to match `key` lifetime to the output of the function.
My use case is, under some circumstances, return a suffixed version of
the config key. Something similar to:
```
if some_condition == true {
let key_name = format!("{}_suffix", key);
self.config.get(&key_name)
} else {
self.config.get(key)
}
```
This code is noy compiling for me due to conflicting lifetimes. To avoid
this, I've started looking to the code and I've found that `key` needed
this lifetime because of `ValueWithKey`. The purpouse of this struct
seems to be add more information to the errors that are returned to the
user.
To mitigate this lifetime coupling I've:
- Mapped the error on `Config::get` to include the originating key of
the current error
- Remove all the code related with `ValueWithKey`
|
|
|