Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drop the serde_json dependency #24

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

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