Skip to content

Impl FromStr for BlockPos & Vec (#174) #1923

Impl FromStr for BlockPos & Vec (#174)

Impl FromStr for BlockPos & Vec (#174) #1923

GitHub Actions / clippy succeeded Oct 21, 2024 in 0s

clippy

11 warnings

Details

Results

Message level Amount
Internal compiler error 0
Error 0
Warning 11
Note 0
Help 0

Versions

  • rustc 1.84.0-nightly (662180b34 2024-10-20)
  • cargo 1.84.0-nightly (cf53cc54b 2024-10-18)
  • clippy 0.1.84 (662180b34d 2024-10-20)

Annotations

Check warning on line 551 in azalea/src/swarm/mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

empty line after doc comment

warning: empty line after doc comment
   --> azalea/src/swarm/mod.rs:550:1
    |
550 | / /// }
551 | |
    | |_
552 |   impl Swarm {
    |   ---------- the comment documents this implementation
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_line_after_doc_comments
    = note: `#[warn(clippy::empty_line_after_doc_comments)]` on by default
    = help: if the empty line is unintentional remove it

Check warning on line 160 in azalea/src/pathfinder/simulation.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

called `map(..).flatten()` on `Option`

warning: called `map(..).flatten()` on `Option`
   --> azalea/src/pathfinder/simulation.rs:159:14
    |
159 |               .map(|c| *c)
    |  ______________^
160 | |             .flatten()
    | |______________________^ help: try replacing `map` with `and_then` and remove the `.flatten()`: `and_then(|c| *c)`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_flatten
    = note: `#[warn(clippy::map_flatten)]` on by default

Check warning on line 60 in azalea/src/nearest_entity.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

the following explicit lifetimes could be elided: 'w, 's

warning: the following explicit lifetimes could be elided: 'w, 's
  --> azalea/src/nearest_entity.rs:60:6
   |
60 | impl<'w, 's, 'a, F> EntityFinder<'w, 's, F>
   |      ^^  ^^                      ^^  ^^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
   = note: `#[warn(clippy::needless_lifetimes)]` on by default
help: elide the lifetimes
   |
60 - impl<'w, 's, 'a, F> EntityFinder<'w, 's, F>
60 + impl<'a, F> EntityFinder<'_, '_, F>
   |

Check warning on line 159 in azalea/src/nearest_entity.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

elided lifetime has a name

warning: elided lifetime has a name
   --> azalea/src/nearest_entity.rs:159:48
    |
60  | impl<'w, 's, 'a, F> EntityFinder<'w, 's, F>
    |              -- lifetime `'a` declared here
...
159 |     ) -> impl Iterator<Item = (Entity, f64)> + '_ {
    |                                                ^^ this elided lifetime gets resolved as `'a`

Check warning on line 132 in azalea/src/nearest_entity.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

elided lifetime has a name

warning: elided lifetime has a name
   --> azalea/src/nearest_entity.rs:132:48
    |
60  | impl<'w, 's, 'a, F> EntityFinder<'w, 's, F>
    |              -- lifetime `'a` declared here
...
132 |     ) -> impl Iterator<Item = (Entity, f64)> + '_ {
    |                                                ^^ this elided lifetime gets resolved as `'a`
    |
    = note: `#[warn(elided_named_lifetimes)]` on by default

Check warning on line 25 in azalea-client/src/raw_connection.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

empty line after doc comment

warning: empty line after doc comment
  --> azalea-client/src/raw_connection.rs:24:5
   |
24 | /     /// Packets sent to this will be sent to the server.
25 | |
   | |_
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_line_after_doc_comments
   = note: `#[warn(clippy::empty_line_after_doc_comments)]` on by default
   = help: if the empty line is unintentional remove it
help: if the documentation should include the empty line include it in the comment
   |
25 |     ///
   |

Check warning on line 150 in azalea-client/src/local_player.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

large size difference between variants

warning: large size difference between variants
   --> azalea-client/src/local_player.rs:141:1
    |
141 | / pub enum HandlePacketError {
142 | |     #[error("{0}")]
143 | |     Poison(String),
    | |     -------------- the second-largest variant contains at least 24 bytes
144 | |     #[error(transparent)]
...   |
149 | |     Send(#[from] mpsc::error::SendError<AzaleaEvent>),
    | |     ------------------------------------------------- the largest variant contains at least 232 bytes
150 | | }
    | |_^ the entire enum is at least 0 bytes
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#large_enum_variant
    = note: `#[warn(clippy::large_enum_variant)]` on by default
help: consider boxing the large fields to reduce the total size of the enum
    |
149 |     Send(#[from] Box<mpsc::error::SendError<AzaleaEvent>>),
    |                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Check warning on line 43 in azalea-protocol/src/lib.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

the following explicit lifetimes could be elided: 'a

warning: the following explicit lifetimes could be elided: 'a
  --> azalea-protocol/src/lib.rs:43:6
   |
43 | impl<'a> TryFrom<&'a str> for ServerAddress {
   |      ^^           ^^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
   = note: `#[warn(clippy::needless_lifetimes)]` on by default
help: elide the lifetimes
   |
43 - impl<'a> TryFrom<&'a str> for ServerAddress {
43 + impl TryFrom<&str> for ServerAddress {
   |

Check warning on line 158 in azalea-world/src/find_blocks.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

the following explicit lifetimes could be elided: 'a

warning: the following explicit lifetimes could be elided: 'a
   --> azalea-world/src/find_blocks.rs:158:6
    |
158 | impl<'a> Iterator for FindBlocks<'a> {
    |      ^^                          ^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
    |
158 - impl<'a> Iterator for FindBlocks<'a> {
158 + impl Iterator for FindBlocks<'_> {
    |

Check warning on line 231 in azalea-world/src/bit_storage.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

the following explicit lifetimes could be elided: 'a

warning: the following explicit lifetimes could be elided: 'a
   --> azalea-world/src/bit_storage.rs:231:6
    |
231 | impl<'a> Iterator for BitStorageIter<'a> {
    |      ^^                              ^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
    = note: `#[warn(clippy::needless_lifetimes)]` on by default
help: elide the lifetimes
    |
231 - impl<'a> Iterator for BitStorageIter<'a> {
231 + impl Iterator for BitStorageIter<'_> {
    |

Check warning on line 122 in azalea-world/src/bit_storage.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

manually reimplementing `div_ceil`

warning: manually reimplementing `div_ceil`
   --> azalea-world/src/bit_storage.rs:122:33
    |
122 |         let calculated_length = (size + values_per_long - 1) / values_per_long;
    |                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.div_ceil()`: `size.div_ceil(values_per_long)`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_div_ceil
    = note: `#[warn(clippy::manual_div_ceil)]` on by default