Skip to content

Update tests

Update tests #48

GitHub Actions / clippy succeeded Jun 22, 2023 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.72.0-nightly (065a1f5df 2023-06-21)
  • cargo 1.72.0-nightly (dead4b874 2023-06-20)
  • clippy 0.1.72 (065a1f5 2023-06-21)

Annotations

Check warning on line 218 in ntex-files/src/lib.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

needless `fn main` in doctest

warning: needless `fn main` in doctest
   --> ntex-files/src/lib.rs:218:4
    |
218 | /// use ntex::web::App;
    |    ^^^^^^^^^^^^^^^^^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_doctest_main
    = note: `#[warn(clippy::needless_doctest_main)]` on by default

Check warning on line 16 in ntex-files/src/range.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

this returns a `Result<_, ()>`

warning: this returns a `Result<_, ()>`
  --> ntex-files/src/range.rs:16:5
   |
16 |     pub fn parse(header: &str, size: u64) -> Result<Vec<HttpRange>, ()> {
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = help: use a custom `Error` type instead
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_unit_err
   = note: `#[warn(clippy::result_unit_err)]` on by default

Check warning on line 38 in ntex-files/src/file_header/parsing.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

this call to `as_ref` does nothing

warning: this call to `as_ref` does nothing
  --> ntex-files/src/file_header/parsing.rs:38:32
   |
38 |         let s = str::from_utf8(s.as_ref())?;
   |                                ^^^^^^^^^^ help: try this: `s`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_asref
   = note: `#[warn(clippy::useless_asref)]` on by default

Check warning on line 148 in ntex-files/src/file_header/method.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

this `impl` can be derived

warning: this `impl` can be derived
   --> ntex-files/src/file_header/method.rs:144:1
    |
144 | / impl Default for Method {
145 | |     fn default() -> Method {
146 | |         Method::Get
147 | |     }
148 | | }
    | |_^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls
    = note: `#[warn(clippy::derivable_impls)]` on by default
    = help: remove the manual implementation...
help: ...and instead derive it...
    |
17  + #[derive(Default)]
18  | pub enum Method {
    |
help: ...and mark the default variant
    |
21  ~     #[default]
22  ~     Get,
    |

Check warning on line 187 in ntex-identity/src/lib.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

methods called `from_*` usually take no `self`

warning: methods called `from_*` usually take no `self`
   --> ntex-identity/src/lib.rs:187:21
    |
187 |     fn from_request(&self, request: &mut WebRequest<Err>) -> Self::Future;
    |                     ^^^^^
    |
    = 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 125 in ntex-files/src/file_header/entity.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

redundant slicing of the whole range

warning: redundant slicing of the whole range
   --> ntex-files/src/file_header/entity.rs:125:21
    |
125 |         let slice = &s[..];
    |                     ^^^^^^ help: use the original value instead: `s`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_slicing
    = note: `#[warn(clippy::redundant_slicing)]` on by default

Check warning on line 52 in ntex-files/src/error.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

all variants have the same prefix: `Bad`

warning: all variants have the same prefix: `Bad`
  --> ntex-files/src/error.rs:42:1
   |
42 | / pub enum UriSegmentError {
43 | |     /// The segment started with the wrapped invalid character.
44 | |     #[display(fmt = "The segment started with the wrapped invalid character")]
45 | |     BadStart(char),
...  |
51 | |     BadEnd(char),
52 | | }
   | |_^
   |
   = help: remove the prefixes and use full paths to the variants instead of glob imports
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#enum_variant_names
   = note: `#[warn(clippy::enum_variant_names)]` on by default

Check warning on line 63 in ntex-files/src/file_header/entity.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

associated items `weak`, `tag`, `set_tag`, `strong_ne`, and `weak_ne` are never used

warning: associated items `weak`, `tag`, `set_tag`, `strong_ne`, and `weak_ne` are never used
   --> ntex-files/src/file_header/entity.rs:63:12
    |
51  | impl EntityTag {
    | -------------- associated items in this implementation
...
63  |     pub fn weak(tag: String) -> EntityTag {
    |            ^^^^
...
75  |     pub fn tag(&self) -> &str {
    |            ^^^
...
82  |     pub fn set_tag(&mut self, tag: String) {
    |            ^^^^^^^
...
101 |     pub fn strong_ne(&self, other: &EntityTag) -> bool {
    |            ^^^^^^^^^
...
106 |     pub fn weak_ne(&self, other: &EntityTag) -> bool {
    |            ^^^^^^^

Check warning on line 126 in ntex-files/src/file_header/mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

method `danger_fmt_line_without_newline_replacer` is never used

warning: method `danger_fmt_line_without_newline_replacer` is never used
   --> ntex-files/src/file_header/mod.rs:126:8
    |
88  | impl<'a, 'b> Formatter<'a, 'b> {
    | ------------------------------ method in this implementation
...
126 |     fn danger_fmt_line_without_newline_replacer<T: std::fmt::Display>(
    |        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: `#[warn(dead_code)]` on by default

Check warning on line 224 in ntex-cors/src/lib.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

method `default` can be confused for the standard trait method `std::default::Default::default`

warning: method `default` can be confused for the standard trait method `std::default::Default::default`
   --> ntex-cors/src/lib.rs:199:5
    |
199 | /     pub fn default<Err>() -> CorsFactory<Err> {
200 | |         let inner = Inner {
201 | |             origins: AllOrSome::default(),
202 | |             origins_str: None,
...   |
223 | |         CorsFactory { inner: Rc::new(inner), _t: PhantomData }
224 | |     }
    | |_____^
    |
    = help: consider implementing the trait `std::default::Default` or choosing a less ambiguous method name
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#should_implement_trait
    = note: `#[warn(clippy::should_implement_trait)]` on by default

Check warning on line 120 in ntex-cors/src/lib.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

this `impl` can be derived

warning: this `impl` can be derived
   --> ntex-cors/src/lib.rs:116:1
    |
116 | / impl<T> Default for AllOrSome<T> {
117 | |     fn default() -> Self {
118 | |         AllOrSome::All
119 | |     }
120 | | }
    | |_^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls
    = note: `#[warn(clippy::derivable_impls)]` on by default
    = help: remove the manual implementation...
help: ...and instead derive it...
    |
109 + #[derive(Default)]
110 | pub enum AllOrSome<T> {
    |
help: ...and mark the default variant
    |
111 ~     #[default]
112 ~     All,
    |