Skip to content

perf: more use of raw strings and slices #186

perf: more use of raw strings and slices

perf: more use of raw strings and slices #186

GitHub Actions / clippy failed Feb 2, 2024 in 0s

clippy

3 errors

Details

Results

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

Versions

  • rustc 1.75.0 (82e1608df 2023-12-21)
  • cargo 1.75.0 (1d8b05cdd 2023-11-20)
  • clippy 0.1.75 (82e1608 2023-12-21)

Annotations

Check failure on line 251 in src/sources/modrinth.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

mismatched types

error[E0308]: mismatched types
   --> src/sources/modrinth.rs:251:62
    |
251 |             .filter(|v| is_proxy || v.game_versions.contains(mcver))
    |                                                     -------- ^^^^^ expected `&String`, found `&str`
    |                                                     |
    |                                                     arguments to this method are incorrect
    |
    = note: expected reference `&std::string::String`
               found reference `&str`
note: method defined here
   --> /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/core/src/slice/mod.rs:2579:12

Check failure on line 80 in src/sources/hangar.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

mismatched types

error[E0308]: mismatched types
  --> src/sources/hangar.rs:80:22
   |
80 |                 Some(self.0.mc_version())
   |                 ---- ^^^^^^^^^^^^^^^^^^^- help: try using a conversion method: `.to_string()`
   |                 |    |
   |                 |    expected `String`, found `&str`
   |                 arguments to this enum variant are incorrect
   |
help: the type constructed contains `&str` due to the type of the argument passed
  --> src/sources/hangar.rs:80:17
   |
80 |                 Some(self.0.mc_version())
   |                 ^^^^^-------------------^
   |                      |
   |                      this argument influences the type of `Some`
note: tuple variant defined here
  --> /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/core/src/option.rs:577:5

Check failure on line 431 in src/app/from_string.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

mismatched types

error[E0308]: mismatched types
   --> src/app/from_string.rs:419:29
    |
419 | / ...                   self.prompt_string_filled(
420 | | ...                       "Artifact?",
421 | | ...                       if urlstr.starts_with(&suggest) {
422 | | ...                           urlstr
...   |
430 | | ...                       },
431 | | ...                   )
    | |_______________________^ expected `String`, found `Result<String, Error>`
    |
    = note: expected struct `std::string::String`
                 found enum `std::result::Result<std::string::String, anyhow::Error>`
help: consider using `Result::expect` to unwrap the `std::result::Result<std::string::String, anyhow::Error>` value, panicking if the value is a `Result::Err`
    |
431 |                             ).expect("REASON")
    |                              +++++++++++++++++