Skip to content

Conversation

@npmccallum
Copy link

This implements an internal Value type which functions like serde_json::Value. Note that because this commit changes the Error type, this is an API-breaking change.

Resolves: #1

Dependencies of this crate now use `const_fn` which requires 1.46.0.

Signed-off-by: Nathaniel McCallum <[email protected]>
```
warning: this seems like a manual implementation of the non-exhaustive pattern
  --> src/error.rs:11:1
   |
11 |   pub enum Error {
   |   ^-------------
   |   |
   |  _help: add the attribute: `#[non_exhaustive] pub enum Error`
   | |
12 | |     ParseError {
13 | |         msg: String,
14 | |         line: usize,
...  |
45 | |     __NonExhaustive,
46 | | }
   | |_^
   |
   = note: `#[warn(clippy::manual_non_exhaustive)]` on by default
help: remove this variant
  --> src/error.rs:45:5
   |
45 |     __NonExhaustive,
   |     ^^^^^^^^^^^^^^^
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_non_exhaustive

warning: 1 warning emitted
```

Signed-off-by: Nathaniel McCallum <[email protected]>
```
error: this expression borrows a reference (`&std::string::String`) that is immediately dereferenced by the compiler
   --> src/error.rs:114:44
    |
114 |             Error::GenericError { msg } => &msg,
    |                                            ^^^^ help: change this to: `msg`
    |
    = note: `-D clippy::needless-borrow` implied by `-D warnings`
    = help: for further information visit rust-lang.github.io/rust-clippy/master/index.html#needless_borrow

error: aborting due to previous error
```

Signed-off-by: Nathaniel McCallum <[email protected]>
This implements an internal `Value` type which functions like
`serde_json::Value`. Note that because this commit changes the `Error`
type, this is an API-breaking change.

Resolves: bheisler#1

Signed-off-by: Nathaniel McCallum <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Drop serde_json

1 participant