Correctly format array type specifier #213
Annotations
12 errors
|
build-test-unix (latest-stable)
Clippy had exited with the 101 exit code
|
|
this `map_or` can be simplified:
src/params.rs#L15
error: this `map_or` can be simplified
--> src/params.rs:15:39
|
15 | let named_placeholder_token = token.key.as_ref().map_or(false, |key| key.named() != "");
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or
help: use is_some_and instead
|
15 - let named_placeholder_token = token.key.as_ref().map_or(false, |key| key.named() != "");
15 + let named_placeholder_token = token.key.as_ref().is_some_and(|key| key.named() != "");
|
|
|
this `map_or` can be simplified:
src/formatter.rs#L253
error: this `map_or` can be simplified
--> src/formatter.rs:253:16
|
253 | && self
| ________________^
254 | | .options
255 | | .max_inline_arguments
256 | | .map_or(true, |limit| limit < self.indentation.span())
| |______________________________________________________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or
help: use is_none_or instead
|
256 - .map_or(true, |limit| limit < self.indentation.span())
256 + .is_none_or(|limit| limit < self.indentation.span())
|
|
|
this `map_or` can be simplified:
src/formatter.rs#L211
error: this `map_or` can be simplified
--> src/formatter.rs:211:17
|
211 | / self.options
212 | | .max_inline_top_level
213 | | .map_or(true, |limit| limit < span_len),
| |___________________________________________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or
help: use is_none_or instead
|
213 - .map_or(true, |limit| limit < span_len),
213 + .is_none_or(|limit| limit < span_len),
|
|
|
this `map_or` can be simplified:
src/formatter.rs#L170
error: this `map_or` can be simplified
--> src/formatter.rs:170:24
|
170 | && self.next_token(2).map_or(false, |next_token| {
| ________________________^
171 | | !matches!(next_token.kind, TokenKind::Operator)
172 | | })
| |______________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or
help: use is_some_and instead
|
170 - && self.next_token(2).map_or(false, |next_token| {
170 + && self.next_token(2).is_some_and(|next_token| {
|
|
|
this `map_or` can be simplified:
src/formatter.rs#L168
error: this `map_or` can be simplified
--> src/formatter.rs:168:13
|
168 | / self.next_token(1).map_or(false, |current_token| {
169 | | current_token.kind == TokenKind::Whitespace
170 | | && self.next_token(2).map_or(false, |next_token| {
171 | | !matches!(next_token.kind, TokenKind::Operator)
172 | | })
173 | | });
| |______________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or
= note: `-D clippy::unnecessary-map-or` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::unnecessary_map_or)]`
help: use is_some_and instead
|
168 - self.next_token(1).map_or(false, |current_token| {
168 + self.next_token(1).is_some_and(|current_token| {
|
|
|
build-test-unix (minimum)
The operation was canceled.
|
|
build-test-unix (minimum)
The strategy configuration was canceled because "build-test-unix.latest-stable" failed
|
|
build-test-unix (latest-nightly)
The operation was canceled.
|
|
build-test-unix (latest-nightly)
The strategy configuration was canceled because "build-test-unix.latest-stable" failed
|
|
build-test-unix (latest-beta)
The operation was canceled.
|
|
build-test-unix (latest-beta)
The strategy configuration was canceled because "build-test-unix.latest-stable" failed
|