Skip to content

refactor: migrate server to actix-http #384

refactor: migrate server to actix-http

refactor: migrate server to actix-http #384

GitHub Actions / clippy failed May 27, 2024 in 1s

clippy

2 errors

Details

Results

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

Versions

  • rustc 1.78.0 (9b00956e5 2024-04-29)
  • cargo 1.78.0 (54d8815d0 2024-03-26)
  • clippy 0.1.78 (9b00956 2024-04-29)

Annotations

Check failure on line 29 in src/utils/index.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

no method named `crate_` found for enum `Result` in the current scope

error[E0599]: no method named `crate_` found for enum `Result` in the current scope
   --> src/utils/index.rs:29:27
    |
29  |         self.index.lock().crate_(crate_name.as_ref())
    |                           ^^^^^^ method not found in `Result<MutexGuard<'_, GitIndex>, PoisonError<MutexGuard<'_, GitIndex>>>`
    |
    = note: the full type name has been written to '/home/runner/work/deps.rs/deps.rs/target/debug/deps/shiny_robots-36f3bbac64197803.long-type-4172696596408091560.txt'
    = note: consider using `--verbose` to print the full type name to the console
note: the method `crate_` exists on the type `std::sync::MutexGuard<'_, crates_index::GitIndex>`
   --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/crates-index-2.10.0/src/git/impl_.rs:259:5
    |
259 |     pub fn crate_(&self, name: &str) -> Option<Crate> {
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
help: consider using `Result::expect` to unwrap the `std::sync::MutexGuard<'_, crates_index::GitIndex>` value, panicking if the value is a `Result::Err`
    |
29  |         self.index.lock().expect("REASON").crate_(crate_name.as_ref())
    |                          +++++++++++++++++

Check failure on line 50 in src/utils/index.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

no method named `update` found for enum `Result` in the current scope

error[E0599]: no method named `update` found for enum `Result` in the current scope
   --> src/utils/index.rs:50:45
    |
50  |         spawn_blocking(move || index.lock().update())
    |                                             ^^^^^^ method not found in `Result<MutexGuard<'_, GitIndex>, PoisonError<MutexGuard<'_, GitIndex>>>`
    |
    = note: the full type name has been written to '/home/runner/work/deps.rs/deps.rs/target/debug/deps/shiny_robots-36f3bbac64197803.long-type-13719998844214305856.txt'
    = note: consider using `--verbose` to print the full type name to the console
note: the method `update` exists on the type `std::sync::MutexGuard<'_, crates_index::GitIndex>`
   --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/crates-index-2.10.0/src/git/impl_.rs:234:5
    |
234 |     pub fn update(&mut self) -> Result<(), Error> {
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
help: consider using `Result::expect` to unwrap the `std::sync::MutexGuard<'_, crates_index::GitIndex>` value, panicking if the value is a `Result::Err`
    |
50  |         spawn_blocking(move || index.lock().expect("REASON").update())
    |                                            +++++++++++++++++