use nightly toolchain #3
clippy
5 errors
Details
Results
Message level | Amount |
---|---|
Internal compiler error | 0 |
Error | 5 |
Warning | 0 |
Note | 0 |
Help | 0 |
Versions
- rustc 1.77.0 (aedd173a2 2024-03-17)
- cargo 1.77.0 (3fe68eabf 2024-02-29)
- clippy 0.1.77 (aedd173 2024-03-17)
Annotations
Check failure on line 286 in src/did.rs
github-actions / clippy
you should consider adding a `Default` implementation for `Path<'a>`
error: you should consider adding a `Default` implementation for `Path<'a>`
--> src/did.rs:284:5
|
284 | / pub const fn new() -> Self {
285 | | Self(Cow::Borrowed(""))
286 | | }
| |_____^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default
= note: `-D clippy::new-without-default` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::new_without_default)]`
help: try adding this
|
283 ~ impl<'a> Default for Path<'a> {
284 + fn default() -> Self {
285 + Self::new()
286 + }
287 + }
288 +
289 ~ impl<'a> Path<'a> {
|
Check failure on line 199 in src/did.rs
github-actions / clippy
non-canonical implementation of `partial_cmp` on an `Ord` type
error: non-canonical implementation of `partial_cmp` on an `Ord` type
--> src/did.rs:195:1
|
195 | / impl PartialOrd for DID {
196 | | fn partial_cmp(&self, other: &Self) -> Option<Ordering> {
| | ___________________________________________________________-
197 | || self.as_str().partial_cmp(other.as_str())
198 | || }
| ||___- help: change this to: `{ Some(self.cmp(other)) }`
199 | | }
| |__^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#non_canonical_partial_ord_impl
= note: `-D clippy::non-canonical-partial-ord-impl` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::non_canonical_partial_ord_impl)]`
Check failure on line 72 in src/did.rs
github-actions / clippy
deref which would be done by auto-deref
error: deref which would be done by auto-deref
--> src/did.rs:72:5
|
72 | &*self.data
| ^^^^^^^^^^^ help: try: `&self.data`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref
= note: `-D clippy::explicit-auto-deref` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::explicit_auto_deref)]`
Check failure on line 114 in src/core.rs
github-actions / clippy
calling `insert_str()` using a single-character string literal
error: calling `insert_str()` using a single-character string literal
--> src/core.rs:114:9
|
114 | buffer.insert_str(fragment as usize, "?");
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `insert` with a character literal: `buffer.insert(fragment as usize, '?')`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str
= note: `-D clippy::single-char-add-str` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::single_char_add_str)]`
Check failure on line 95 in src/core.rs
github-actions / clippy
unnecessary closure used to substitute value for `Option::None`
error: unnecessary closure used to substitute value for `Option::None`
--> src/core.rs:92:20
|
92 | let end: u32 = self
| ____________________^
93 | | .query
94 | | .or(self.fragment)
95 | | .unwrap_or_else(|| buffer.len() as u32);
| |________-------------------------------------^
| |
| help: use `unwrap_or(..)` instead: `unwrap_or(buffer.len() as u32)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_lazy_evaluations
= note: `-D clippy::unnecessary-lazy-evaluations` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::unnecessary_lazy_evaluations)]`