ci: audit workflows with zizmor #1069
clippy
361 warnings
Details
Results
Message level | Amount |
---|---|
Internal compiler error | 0 |
Error | 0 |
Warning | 361 |
Note | 0 |
Help | 0 |
Versions
- rustc 1.83.0 (90b35a623 2024-11-26)
- cargo 1.83.0 (5ffbef321 2024-10-29)
- clippy 0.1.83 (90b35a62 2024-11-26)
Annotations
Check warning on line 29 in libcst/src/bin.rs
github-actions / clippy
`to_string` applied to a type that implements `Display` in `print!` args
warning: `to_string` applied to a type that implements `Display` in `print!` args
--> libcst/src/bin.rs:29:35
|
29 | print!("{}", state.to_string());
| ^^^^^^^^^^^^ help: remove this
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_in_format_args
= note: `#[warn(clippy::to_string_in_format_args)]` on by default
Check warning on line 22 in libcst/src/bin.rs
github-actions / clippy
use of `unwrap_or_else` to construct default value
warning: use of `unwrap_or_else` to construct default value
--> libcst/src/bin.rs:22:48
|
22 | let first_arg = env::args().nth(1).unwrap_or_else(|| "".to_string());
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_default()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default
= note: `#[warn(clippy::unwrap_or_default)]` on by default
Check warning on line 3481 in libcst/src/parser/grammar.rs
github-actions / clippy
manual implementation of `Option::map`
warning: manual implementation of `Option::map`
--> libcst/src/parser/grammar.rs:3477:24
|
3477 | let lbracket_tok = if let Some(tp) = &type_parameters {
| ________________________^
3478 | | Some(tp.lbracket.tok)
3479 | | } else {
3480 | | None
3481 | | };
| |_____^ help: try: `type_parameters.as_ref().map(|tp| tp.lbracket.tok)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map
= note: `#[warn(clippy::manual_map)]` on by default
Check warning on line 1913 in libcst/src/parser/grammar.rs
github-actions / clippy
unneeded `return` statement
warning: unneeded `return` statement
--> libcst/src/parser/grammar.rs:1907:9
|
1907 | / return NameOrAttribute::A(Box::new(Attribute {
1908 | | attr: name,
1909 | | dot,
1910 | | lpar: Default::default(),
1911 | | rpar: Default::default(),
1912 | | value: Box::new(make_name_or_attr(first_tok, tail).into()),
1913 | | }));
| |___________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
= note: `#[warn(clippy::needless_return)]` on by default
help: remove `return`
|
1907 ~ NameOrAttribute::A(Box::new(Attribute {
1908 + attr: name,
1909 + dot,
1910 + lpar: Default::default(),
1911 + rpar: Default::default(),
1912 + value: Box::new(make_name_or_attr(first_tok, tail).into()),
1913 ~ }))
|
Check warning on line 1898 in libcst/src/parser/grammar.rs
github-actions / clippy
explicit call to `.into_iter()` in function argument accepting `IntoIterator`
warning: explicit call to `.into_iter()` in function argument accepting `IntoIterator`
--> libcst/src/parser/grammar.rs:1898:25
|
1898 | a.into_iter().chain(b.into_iter()).collect()
| ^^^^^^^^^^^^^ help: consider removing the `.into_iter()`: `b`
|
note: this parameter accepts any `IntoIterator`, so you don't need to call `.into_iter()`
--> /rustc/90b35a6239c3d8bdabc530a6a0816f7ff89a0aaf/library/core/src/iter/traits/iterator.rs:479:12
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
= note: `#[warn(clippy::useless_conversion)]` on by default
Check warning on line 47 in libcst/src/parser/grammar.rs
github-actions / clippy
the following explicit lifetimes could be elided: 'a
warning: the following explicit lifetimes could be elided: 'a
--> libcst/src/parser/grammar.rs:47:6
|
47 | impl<'a> Parse for TokVec<'a> {
| ^^ ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
|
47 - impl<'a> Parse for TokVec<'a> {
47 + impl Parse for TokVec<'_> {
|
Check warning on line 81 in libcst/src/parser/errors.rs
github-actions / clippy
this lifetime isn't used in the impl
warning: this lifetime isn't used in the impl
--> libcst/src/parser/errors.rs:81:10
|
81 | impl<'a> PyErrArguments for Details {
| ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_lifetimes
= note: `#[warn(clippy::extra_unused_lifetimes)]` on by default
Check warning on line 43 in libcst/src/parser/errors.rs
github-actions / clippy
the following explicit lifetimes could be elided: 'a
warning: the following explicit lifetimes could be elided: 'a
--> libcst/src/parser/errors.rs:43:10
|
43 | impl<'a> From<ParserError<'a>> for PyErr {
| ^^ ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
|
43 - impl<'a> From<ParserError<'a>> for PyErr {
43 + impl From<ParserError<'_>> for PyErr {
|
Check warning on line 183 in libcst/src/nodes/traits.rs
github-actions / clippy
the following explicit lifetimes could be elided: 'a
warning: the following explicit lifetimes could be elided: 'a
--> libcst/src/nodes/traits.rs:183:10
|
183 | impl<'a> TryIntoPy<PyObject> for &'a str {
| ^^ ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
|
183 - impl<'a> TryIntoPy<PyObject> for &'a str {
183 + impl TryIntoPy<PyObject> for &str {
|
Check warning on line 103 in libcst/src/nodes/traits.rs
github-actions / clippy
`?Sized` bound is ignored because of a `Sized` requirement
warning: `?Sized` bound is ignored because of a `Sized` requirement
--> libcst/src/nodes/traits.rs:103:27
|
103 | impl<'a, T: Inflate<'a> + ?Sized> Inflate<'a> for Box<T> {
| ^^^^^^
|
note: `T` cannot be unsized because of the bound
--> libcst/src/nodes/traits.rs:103:13
|
103 | impl<'a, T: Inflate<'a> + ?Sized> Inflate<'a> for Box<T> {
| ^^^^^^^^^^^
= note: ...because `Inflate` has the bound `Sized`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_maybe_sized
= note: `#[warn(clippy::needless_maybe_sized)]` on by default
help: change the bounds that require `Sized`, or remove the `?Sized` bound
|
103 - impl<'a, T: Inflate<'a> + ?Sized> Inflate<'a> for Box<T> {
103 + impl<'a, T: Inflate<'a>> Inflate<'a> for Box<T> {
|
Check warning on line 56 in libcst/src/nodes/codegen.rs
github-actions / clippy
the following explicit lifetimes could be elided: 'a
warning: the following explicit lifetimes could be elided: 'a
--> libcst/src/nodes/codegen.rs:56:6
|
56 | impl<'a> Default for CodegenState<'a> {
| ^^ ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
|
56 - impl<'a> Default for CodegenState<'a> {
56 + impl Default for CodegenState<'_> {
|
Check warning on line 30 in libcst/src/nodes/codegen.rs
github-actions / clippy
the following explicit lifetimes could be elided: 'a
warning: the following explicit lifetimes could be elided: 'a
--> libcst/src/nodes/codegen.rs:30:6
|
30 | impl<'a> fmt::Display for CodegenState<'a> {
| ^^ ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
|
30 - impl<'a> fmt::Display for CodegenState<'a> {
30 + impl fmt::Display for CodegenState<'_> {
|
Check warning on line 63 in libcst/src/nodes/module.rs
github-actions / clippy
deref which would be done by auto-deref
warning: deref which would be done by auto-deref
--> libcst/src/nodes/module.rs:63:18
|
63 | &mut (*self.eof_tok).whitespace_before.borrow_mut(),
| ^^^^^^^^^^^^^^^ help: try: `self.eof_tok`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref
Check warning on line 54 in libcst/src/nodes/module.rs
github-actions / clippy
the following explicit lifetimes could be elided: 'r
warning: the following explicit lifetimes could be elided: 'r
--> libcst/src/nodes/module.rs:54:6
|
54 | impl<'r, 'a> Inflate<'a> for DeflatedModule<'r, 'a> {
| ^^ ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
|
54 - impl<'r, 'a> Inflate<'a> for DeflatedModule<'r, 'a> {
54 + impl<'a> Inflate<'a> for DeflatedModule<'_, 'a> {
|
Check warning on line 1415 in libcst/src/nodes/op.rs
github-actions / clippy
deref which would be done by auto-deref
warning: deref which would be done by auto-deref
--> libcst/src/nodes/op.rs:1415:18
|
1415 | &mut (*self.tok).whitespace_after.borrow_mut(),
| ^^^^^^^^^^^ help: try: `self.tok`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref
Check warning on line 1411 in libcst/src/nodes/op.rs
github-actions / clippy
deref which would be done by auto-deref
warning: deref which would be done by auto-deref
--> libcst/src/nodes/op.rs:1411:18
|
1411 | &mut (*self.tok).whitespace_before.borrow_mut(),
| ^^^^^^^^^^^ help: try: `self.tok`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref
Check warning on line 1406 in libcst/src/nodes/op.rs
github-actions / clippy
the following explicit lifetimes could be elided: 'r
warning: the following explicit lifetimes could be elided: 'r
--> libcst/src/nodes/op.rs:1406:6
|
1406 | impl<'r, 'a> Inflate<'a> for DeflatedBitOr<'r, 'a> {
| ^^ ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
|
1406 - impl<'r, 'a> Inflate<'a> for DeflatedBitOr<'r, 'a> {
1406 + impl<'a> Inflate<'a> for DeflatedBitOr<'_, 'a> {
|
Check warning on line 1312 in libcst/src/nodes/op.rs
github-actions / clippy
deref which would be done by auto-deref
warning: deref which would be done by auto-deref
--> libcst/src/nodes/op.rs:1312:26
|
1312 | &mut (*tok).whitespace_after.borrow_mut(),
| ^^^^^^ help: try: `tok`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref
Check warning on line 1308 in libcst/src/nodes/op.rs
github-actions / clippy
deref which would be done by auto-deref
warning: deref which would be done by auto-deref
--> libcst/src/nodes/op.rs:1308:26
|
1308 | &mut (*tok).whitespace_before.borrow_mut(),
| ^^^^^^ help: try: `tok`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref
Check warning on line 1298 in libcst/src/nodes/op.rs
github-actions / clippy
deref which would be done by auto-deref
warning: deref which would be done by auto-deref
--> libcst/src/nodes/op.rs:1298:26
|
1298 | &mut (*tok).whitespace_after.borrow_mut(),
| ^^^^^^ help: try: `tok`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref
Check warning on line 1294 in libcst/src/nodes/op.rs
github-actions / clippy
deref which would be done by auto-deref
warning: deref which would be done by auto-deref
--> libcst/src/nodes/op.rs:1294:26
|
1294 | &mut (*tok).whitespace_before.borrow_mut(),
| ^^^^^^ help: try: `tok`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref
Check warning on line 1284 in libcst/src/nodes/op.rs
github-actions / clippy
deref which would be done by auto-deref
warning: deref which would be done by auto-deref
--> libcst/src/nodes/op.rs:1284:26
|
1284 | &mut (*tok).whitespace_after.borrow_mut(),
| ^^^^^^ help: try: `tok`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref
Check warning on line 1280 in libcst/src/nodes/op.rs
github-actions / clippy
deref which would be done by auto-deref
warning: deref which would be done by auto-deref
--> libcst/src/nodes/op.rs:1280:26
|
1280 | &mut (*tok).whitespace_before.borrow_mut(),
| ^^^^^^ help: try: `tok`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref
Check warning on line 1270 in libcst/src/nodes/op.rs
github-actions / clippy
deref which would be done by auto-deref
warning: deref which would be done by auto-deref
--> libcst/src/nodes/op.rs:1270:26
|
1270 | &mut (*tok).whitespace_after.borrow_mut(),
| ^^^^^^ help: try: `tok`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref
Check warning on line 1266 in libcst/src/nodes/op.rs
github-actions / clippy
deref which would be done by auto-deref
warning: deref which would be done by auto-deref
--> libcst/src/nodes/op.rs:1266:26
|
1266 | &mut (*tok).whitespace_before.borrow_mut(),
| ^^^^^^ help: try: `tok`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref