fix(deps): update rust crate serde to ~1.0.178 #300
clippy
29 warnings
Details
Results
Message level | Amount |
---|---|
Internal compiler error | 0 |
Error | 0 |
Warning | 29 |
Note | 0 |
Help | 0 |
Versions
- rustc 1.73.0-nightly (32303b219 2023-07-29)
- cargo 1.73.0-nightly (7ac9416d8 2023-07-24)
- clippy 0.1.73 (32303b2 2023-07-29)
Annotations
Check warning on line 874 in yarte_hir/src/lib.rs
github-actions / clippy
this call to `from_str_radix` can be replaced with a call to `str::parse`
warning: this call to `from_str_radix` can be replaced with a call to `str::parse`
--> yarte_hir/src/lib.rs:874:52
|
874 | ... let field = syn::Index{ index: u32::from_str_radix(str::from_utf8(&ident[1..]).unwrap(), 10).unwrap(), span: proc_macro2::Span...
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `str::from_utf8(&ident[1..]).unwrap().parse::<u32>()`
...
983 | ... On::With(j) => with_var!(ident, j),
| ------------------- in this macro invocation
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_str_radix_10
= note: this warning originates in the macro `index_var` which comes from the expansion of the macro `with_var` (in Nightly builds, run with -Z macro-backtrace for more info)
Check warning on line 874 in yarte_hir/src/lib.rs
github-actions / clippy
this call to `from_str_radix` can be replaced with a call to `str::parse`
warning: this call to `from_str_radix` can be replaced with a call to `str::parse`
--> yarte_hir/src/lib.rs:874:52
|
874 | ... let field = syn::Index{ index: u32::from_str_radix(str::from_utf8(&ident[1..]).unwrap(), 10).unwrap(), span: proc_macro2::Span...
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `str::from_utf8(&ident[1..]).unwrap().parse::<u32>()`
...
982 | ... On::Each(j) => each_var!(ident.as_str(), j),
| ---------------------------- in this macro invocation
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_str_radix_10
= note: this warning originates in the macro `index_var` which comes from the expansion of the macro `each_var` (in Nightly builds, run with -Z macro-backtrace for more info)
Check warning on line 874 in yarte_hir/src/lib.rs
github-actions / clippy
this call to `from_str_radix` can be replaced with a call to `str::parse`
warning: this call to `from_str_radix` can be replaced with a call to `str::parse`
--> yarte_hir/src/lib.rs:874:52
|
874 | let field = syn::Index{ index: u32::from_str_radix(str::from_utf8(&ident[1..]).unwrap(), 10).unwrap(), span: proc_mac...
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `str::from_utf8(&ident[1..]).unwrap().parse::<u32>()`
...
978 | self_var!(ident);
| ---------------- in this macro invocation
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_str_radix_10
= note: this warning originates in the macro `index_var` which comes from the expansion of the macro `self_var` (in Nightly builds, run with -Z macro-backtrace for more info)
Check warning on line 874 in yarte_hir/src/lib.rs
github-actions / clippy
this call to `from_str_radix` can be replaced with a call to `str::parse`
warning: this call to `from_str_radix` can be replaced with a call to `str::parse`
--> yarte_hir/src/lib.rs:874:52
|
874 | ... let field = syn::Index{ index: u32::from_str_radix(str::from_utf8(&ident[1..]).unwrap(), 10).unwrap(), span: proc_macro2::Span::ca...
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `str::from_utf8(&ident[1..]).unwrap().parse::<u32>()`
...
970 | ... Some(On::With(j)) => with_var!(ident, *j),
| -------------------- in this macro invocation
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_str_radix_10
= note: this warning originates in the macro `index_var` which comes from the expansion of the macro `with_var` (in Nightly builds, run with -Z macro-backtrace for more info)
Check warning on line 874 in yarte_hir/src/lib.rs
github-actions / clippy
this call to `from_str_radix` can be replaced with a call to `str::parse`
warning: this call to `from_str_radix` can be replaced with a call to `str::parse`
--> yarte_hir/src/lib.rs:874:52
|
874 | ... let field = syn::Index{ index: u32::from_str_radix(str::from_utf8(&ident[1..]).unwrap(), 10).unwrap(), span: proc_macro2::Span::ca...
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `str::from_utf8(&ident[1..]).unwrap().parse::<u32>()`
...
969 | ... Some(On::Each(j)) => each_var!(ident, *j),
| -------------------- in this macro invocation
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_str_radix_10
= note: this warning originates in the macro `index_var` which comes from the expansion of the macro `each_var` (in Nightly builds, run with -Z macro-backtrace for more info)
Check warning on line 874 in yarte_hir/src/lib.rs
github-actions / clippy
this call to `from_str_radix` can be replaced with a call to `str::parse`
warning: this call to `from_str_radix` can be replaced with a call to `str::parse`
--> yarte_hir/src/lib.rs:874:52
|
874 | ... let field = syn::Index{ index: u32::from_str_radix(str::from_utf8(&ident[1..]).unwrap(), 10).unwrap(), span: proc_macro2::S...
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `str::from_utf8(&ident[1..]).unwrap().parse::<u32>()`
...
968 | ... None => self_var!(ident),
| ---------------- in this macro invocation
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_str_radix_10
= note: `#[warn(clippy::from_str_radix_10)]` on by default
= note: this warning originates in the macro `index_var` which comes from the expansion of the macro `self_var` (in Nightly builds, run with -Z macro-backtrace for more info)
Check warning on line 120 in yarte_parser/src/strnom.rs
github-actions / clippy
try not to call a closure in the expression where it is declared
warning: try not to call a closure in the expression where it is declared
--> yarte_parser/src/strnom.rs:120:44
|
120 | match $i.chars().position(|c| !$f(c)) {
| ^^^^^
|
::: yarte_parser/src/parse.rs:664:5
|
664 | take_while!(i, |i| !is_ws(i)).and_then(|(c, s)| {
| ----------------------------- in this macro invocation
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure_call
= note: `#[warn(clippy::redundant_closure_call)]` on by default
= note: this warning originates in the macro `take_while` (in Nightly builds, run with -Z macro-backtrace for more info)
Check warning on line 874 in yarte_hir/src/lib.rs
github-actions / clippy
this call to `from_str_radix` can be replaced with a call to `str::parse`
warning: this call to `from_str_radix` can be replaced with a call to `str::parse`
--> yarte_hir/src/lib.rs:874:52
|
874 | ... let field = syn::Index{ index: u32::from_str_radix(str::from_utf8(&ident[1..]).unwrap(), 10).unwrap(), span: proc_macro2::Span...
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `str::from_utf8(&ident[1..]).unwrap().parse::<u32>()`
...
983 | ... On::With(j) => with_var!(ident, j),
| ------------------- in this macro invocation
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_str_radix_10
= note: this warning originates in the macro `index_var` which comes from the expansion of the macro `with_var` (in Nightly builds, run with -Z macro-backtrace for more info)
Check warning on line 874 in yarte_hir/src/lib.rs
github-actions / clippy
this call to `from_str_radix` can be replaced with a call to `str::parse`
warning: this call to `from_str_radix` can be replaced with a call to `str::parse`
--> yarte_hir/src/lib.rs:874:52
|
874 | ... let field = syn::Index{ index: u32::from_str_radix(str::from_utf8(&ident[1..]).unwrap(), 10).unwrap(), span: proc_macro2::Span...
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `str::from_utf8(&ident[1..]).unwrap().parse::<u32>()`
...
982 | ... On::Each(j) => each_var!(ident.as_str(), j),
| ---------------------------- in this macro invocation
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_str_radix_10
= note: this warning originates in the macro `index_var` which comes from the expansion of the macro `each_var` (in Nightly builds, run with -Z macro-backtrace for more info)
Check warning on line 874 in yarte_hir/src/lib.rs
github-actions / clippy
this call to `from_str_radix` can be replaced with a call to `str::parse`
warning: this call to `from_str_radix` can be replaced with a call to `str::parse`
--> yarte_hir/src/lib.rs:874:52
|
874 | let field = syn::Index{ index: u32::from_str_radix(str::from_utf8(&ident[1..]).unwrap(), 10).unwrap(), span: proc_mac...
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `str::from_utf8(&ident[1..]).unwrap().parse::<u32>()`
...
978 | self_var!(ident);
| ---------------- in this macro invocation
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_str_radix_10
= note: this warning originates in the macro `index_var` which comes from the expansion of the macro `self_var` (in Nightly builds, run with -Z macro-backtrace for more info)
Check warning on line 874 in yarte_hir/src/lib.rs
github-actions / clippy
this call to `from_str_radix` can be replaced with a call to `str::parse`
warning: this call to `from_str_radix` can be replaced with a call to `str::parse`
--> yarte_hir/src/lib.rs:874:52
|
874 | ... let field = syn::Index{ index: u32::from_str_radix(str::from_utf8(&ident[1..]).unwrap(), 10).unwrap(), span: proc_macro2::Span::ca...
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `str::from_utf8(&ident[1..]).unwrap().parse::<u32>()`
...
970 | ... Some(On::With(j)) => with_var!(ident, *j),
| -------------------- in this macro invocation
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_str_radix_10
= note: this warning originates in the macro `index_var` which comes from the expansion of the macro `with_var` (in Nightly builds, run with -Z macro-backtrace for more info)
Check warning on line 874 in yarte_hir/src/lib.rs
github-actions / clippy
this call to `from_str_radix` can be replaced with a call to `str::parse`
warning: this call to `from_str_radix` can be replaced with a call to `str::parse`
--> yarte_hir/src/lib.rs:874:52
|
874 | ... let field = syn::Index{ index: u32::from_str_radix(str::from_utf8(&ident[1..]).unwrap(), 10).unwrap(), span: proc_macro2::Span::ca...
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `str::from_utf8(&ident[1..]).unwrap().parse::<u32>()`
...
969 | ... Some(On::Each(j)) => each_var!(ident, *j),
| -------------------- in this macro invocation
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_str_radix_10
= note: this warning originates in the macro `index_var` which comes from the expansion of the macro `each_var` (in Nightly builds, run with -Z macro-backtrace for more info)
Check warning on line 874 in yarte_hir/src/lib.rs
github-actions / clippy
this call to `from_str_radix` can be replaced with a call to `str::parse`
warning: this call to `from_str_radix` can be replaced with a call to `str::parse`
--> yarte_hir/src/lib.rs:874:52
|
874 | ... let field = syn::Index{ index: u32::from_str_radix(str::from_utf8(&ident[1..]).unwrap(), 10).unwrap(), span: proc_macro2::S...
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `str::from_utf8(&ident[1..]).unwrap().parse::<u32>()`
...
968 | ... None => self_var!(ident),
| ---------------- in this macro invocation
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_str_radix_10
= note: `#[warn(clippy::from_str_radix_10)]` on by default
= note: this warning originates in the macro `index_var` which comes from the expansion of the macro `self_var` (in Nightly builds, run with -Z macro-backtrace for more info)
Check warning on line 120 in yarte_parser/src/strnom.rs
github-actions / clippy
try not to call a closure in the expression where it is declared
warning: try not to call a closure in the expression where it is declared
--> yarte_parser/src/strnom.rs:120:44
|
120 | match $i.chars().position(|c| !$f(c)) {
| ^^^^^
|
::: yarte_parser/src/parse.rs:664:5
|
664 | take_while!(i, |i| !is_ws(i)).and_then(|(c, s)| {
| ----------------------------- in this macro invocation
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure_call
= note: `#[warn(clippy::redundant_closure_call)]` on by default
= note: this warning originates in the macro `take_while` (in Nightly builds, run with -Z macro-backtrace for more info)
Check warning on line 161 in yarte/src/lib.rs
github-actions / clippy
unneeded sub `cfg` when there is only one condition
warning: unneeded sub `cfg` when there is only one condition
--> yarte/src/lib.rs:161:7
|
161 | #[cfg(any(feature = "bytes-buf"))]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `feature = "bytes-buf"`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#non_minimal_cfg
= note: `#[warn(clippy::non_minimal_cfg)]` on by default
Check warning on line 202 in yarte/src/lib.rs
github-actions / clippy
unsafe function's docs miss `# Safety` section
warning: unsafe function's docs miss `# Safety` section
--> yarte/src/lib.rs:202:5
|
202 | unsafe fn _yarte_in_derive_buf_ptr(&mut self) -> *mut u8 {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_safety_doc
Check warning on line 197 in yarte/src/lib.rs
github-actions / clippy
unsafe function's docs miss `# Safety` section
warning: unsafe function's docs miss `# Safety` section
--> yarte/src/lib.rs:197:5
|
197 | unsafe fn _yarte_in_derive_advance(&mut self, cnt: usize) {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_safety_doc
Check warning on line 182 in yarte/src/lib.rs
github-actions / clippy
unsafe function's docs miss `# Safety` section
warning: unsafe function's docs miss `# Safety` section
--> yarte/src/lib.rs:182:5
|
182 | unsafe fn _yarte_in_derive_extend_from_slice(&mut self, src: &[u8]) {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_safety_doc
= note: `#[warn(clippy::missing_safety_doc)]` on by default
Check warning on line 161 in yarte/src/lib.rs
github-actions / clippy
unneeded sub `cfg` when there is only one condition
warning: unneeded sub `cfg` when there is only one condition
--> yarte/src/lib.rs:161:7
|
161 | #[cfg(any(feature = "bytes-buf"))]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `feature = "bytes-buf"`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#non_minimal_cfg
= note: `#[warn(clippy::non_minimal_cfg)]` on by default
Check warning on line 18 in yarte_helpers/src/helpers/ser_json/mod.rs
github-actions / clippy
methods with the following characteristics: (`to_*` and `*_mut`) usually take `self` by mutable reference
warning: methods with the following characteristics: (`to_*` and `*_mut`) usually take `self` by mutable reference
--> yarte_helpers/src/helpers/ser_json/mod.rs:18:32
|
18 | fn to_bytes_mut<B: Buffer>(&self, buf: &mut B);
| ^^^^^
|
= help: consider choosing a less ambiguous name
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wrong_self_convention
= note: `#[warn(clippy::wrong_self_convention)]` on by default
Check warning on line 18 in yarte_helpers/src/helpers/ser_json/mod.rs
github-actions / clippy
methods with the following characteristics: (`to_*` and `*_mut`) usually take `self` by mutable reference
warning: methods with the following characteristics: (`to_*` and `*_mut`) usually take `self` by mutable reference
--> yarte_helpers/src/helpers/ser_json/mod.rs:18:32
|
18 | fn to_bytes_mut<B: Buffer>(&self, buf: &mut B);
| ^^^^^
|
= help: consider choosing a less ambiguous name
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wrong_self_convention
= note: `#[warn(clippy::wrong_self_convention)]` on by default
Check warning on line 874 in yarte_hir/src/lib.rs
github-actions / clippy
this call to `from_str_radix` can be replaced with a call to `str::parse`
warning: this call to `from_str_radix` can be replaced with a call to `str::parse`
--> yarte_hir/src/lib.rs:874:52
|
874 | ... let field = syn::Index{ index: u32::from_str_radix(str::from_utf8(&ident[1..]).unwrap(), 10).unwrap(), span: proc_macro2::Span...
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `str::from_utf8(&ident[1..]).unwrap().parse::<u32>()`
...
983 | ... On::With(j) => with_var!(ident, j),
| ------------------- in this macro invocation
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_str_radix_10
= note: this warning originates in the macro `index_var` which comes from the expansion of the macro `with_var` (in Nightly builds, run with -Z macro-backtrace for more info)
Check warning on line 874 in yarte_hir/src/lib.rs
github-actions / clippy
this call to `from_str_radix` can be replaced with a call to `str::parse`
warning: this call to `from_str_radix` can be replaced with a call to `str::parse`
--> yarte_hir/src/lib.rs:874:52
|
874 | ... let field = syn::Index{ index: u32::from_str_radix(str::from_utf8(&ident[1..]).unwrap(), 10).unwrap(), span: proc_macro2::Span...
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `str::from_utf8(&ident[1..]).unwrap().parse::<u32>()`
...
982 | ... On::Each(j) => each_var!(ident.as_str(), j),
| ---------------------------- in this macro invocation
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_str_radix_10
= note: this warning originates in the macro `index_var` which comes from the expansion of the macro `each_var` (in Nightly builds, run with -Z macro-backtrace for more info)
Check warning on line 874 in yarte_hir/src/lib.rs
github-actions / clippy
this call to `from_str_radix` can be replaced with a call to `str::parse`
warning: this call to `from_str_radix` can be replaced with a call to `str::parse`
--> yarte_hir/src/lib.rs:874:52
|
874 | let field = syn::Index{ index: u32::from_str_radix(str::from_utf8(&ident[1..]).unwrap(), 10).unwrap(), span: proc_mac...
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `str::from_utf8(&ident[1..]).unwrap().parse::<u32>()`
...
978 | self_var!(ident);
| ---------------- in this macro invocation
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_str_radix_10
= note: this warning originates in the macro `index_var` which comes from the expansion of the macro `self_var` (in Nightly builds, run with -Z macro-backtrace for more info)
Check warning on line 874 in yarte_hir/src/lib.rs
github-actions / clippy
this call to `from_str_radix` can be replaced with a call to `str::parse`
warning: this call to `from_str_radix` can be replaced with a call to `str::parse`
--> yarte_hir/src/lib.rs:874:52
|
874 | ... let field = syn::Index{ index: u32::from_str_radix(str::from_utf8(&ident[1..]).unwrap(), 10).unwrap(), span: proc_macro2::Span::ca...
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `str::from_utf8(&ident[1..]).unwrap().parse::<u32>()`
...
970 | ... Some(On::With(j)) => with_var!(ident, *j),
| -------------------- in this macro invocation
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_str_radix_10
= note: this warning originates in the macro `index_var` which comes from the expansion of the macro `with_var` (in Nightly builds, run with -Z macro-backtrace for more info)