serde_urlencoded
serde_urlencoded copied to clipboard
Fix clippy recommendations and compiler warnings
Implemented some clippy recommendations and fixed a few compiler warnings.
The two compiler warnings I left are
warning: use of deprecated item 'std::error::Error::description': use the Display impl or to_string()
--> src/ser/mod.rs:78:37
|
78 | Error::Utf8(ref err) => error::Error::description(err),
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `#[warn(deprecated)]` on by default
I'm not sure how to fix this without changing the function return (currently &str) since, to my knowledge, there's no other way to access the description as a reference to self.
warning: trait objects without an explicit `dyn` are deprecated
--> src/ser/mod.rs:83:32
|
83 | fn cause(&self) -> Option<&error::Error> {
| ^^^^^^^^^^^^ help: use `dyn`: `dyn error::Error`
|
= note: `#[warn(bare_trait_objects)]` on by default
This is fixed in #70 so I didn't want to create a conflict.
Could you add 2 allows for the 2 remaining warnings please?
I've added an allow onto the deprecated description, and popped the dyn
in as it seems likely this PR will go in before #70 so I can do a proper job here and update #70 after this has been merged.