Update Backend Dependencies #470
This run and associated checks have been archived and are scheduled for deletion.
Learn more about checks retention
push.yml
on: push
Linux / Stable
9m 19s
clippy_check
2m 46s
Annotations
2 errors and 58 warnings
redundant redefinition of a binding:
src/authentication/middleware.rs#L73
error: redundant redefinition of a binding
--> src/authentication/middleware.rs:73:13
|
73 | let run_cookies = self.run_cookies;
| ^^^^^^^^^^^
...
76 | let run_cookies = run_cookies;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: remove the redefinition of `run_cookies`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_locals
= note: `#[deny(clippy::redundant_locals)]` on by default
|
clippy_check
Clippy had exited with the 101 exit code
|
single-character string constant used as pattern:
src/lib.rs#L67
warning: single-character string constant used as pattern
--> src/lib.rs:67:59
|
67 | features: env!("VERGEN_CARGO_FEATURES").split(",").collect(),
| ^^^ help: try using a `char` instead: `','`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_pattern
= note: `#[warn(clippy::single_char_pattern)]` on by default
|
redundant closure:
src/utils.rs#L119
warning: redundant closure
--> src/utils.rs:119:44
|
119 | String::from_utf8(decoded).map_err(|x| actix_web::error::ErrorBadRequest(x))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `actix_web::error::ErrorBadRequest`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure
|
redundant closure:
src/utils.rs#L118
warning: redundant closure
--> src/utils.rs:118:45
|
118 | let decoded = decode(input).map_err(|e| actix_web::error::ErrorBadRequest(e))?;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `actix_web::error::ErrorBadRequest`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure
= note: `#[warn(clippy::redundant_closure)]` on by default
|
this `if` branch is empty:
src/utils.rs#L105
warning: this `if` branch is empty
--> src/utils.rs:105:5
|
105 | if x.is_err() {}
| ^^^^^^^^^^^^^^^^ help: you can remove it: `x.is_err();`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_if
|
this expression creates a reference which is immediately dereferenced by the compiler:
src/system/permissions/permissions_checker.rs#L187
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> src/system/permissions/permissions_checker.rs:187:41
|
187 | let can_read = can_read(&self, repo)?;
| ^^^^^ help: change this to: `self`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
this expression creates a reference which is immediately dereferenced by the compiler:
src/system/permissions/permissions_checker.rs#L172
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> src/system/permissions/permissions_checker.rs:172:35
|
172 | let can_read = can_deploy(&self, repo)?;
| ^^^^^ help: change this to: `self`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
this `MutexGuard` is held across an `await` point:
src/storage/multi/mod.rs#L158
warning: this `MutexGuard` is held across an `await` point
--> src/storage/multi/mod.rs:158:13
|
158 | let storages_ref = self.storages.read();
| ^^^^^^^^^^^^
|
= help: consider using an async-aware `Mutex` type or ensuring the `MutexGuard` is dropped before calling await
note: these are all the `await` points this lock is held through
--> src/storage/multi/mod.rs:158:9
|
158 | / let storages_ref = self.storages.read();
159 | | let mut storages = Vec::with_capacity(storages_ref.len() + 1);
160 | | for (storage_name, storage) in storages_ref.iter() {
161 | | if storage_name.eq(&name) {
... |
190 | | Ok(())
191 | | }
| |_____^
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#await_holding_lock
|
this `MutexGuard` is held across an `await` point:
src/storage/multi/mod.rs#L128
warning: this `MutexGuard` is held across an `await` point
--> src/storage/multi/mod.rs:128:13
|
128 | let storage_ref = self.storages.read();
| ^^^^^^^^^^^
|
= help: consider using an async-aware `Mutex` type or ensuring the `MutexGuard` is dropped before calling await
note: these are all the `await` points this lock is held through
--> src/storage/multi/mod.rs:128:9
|
128 | / let storage_ref = self.storages.read();
129 | | let mut storages = Vec::with_capacity(storage_ref.len() + 1);
130 | |
131 | | for (storage_name, value) in storage_ref.iter() {
... |
150 | | Ok(())
151 | | }
| |_____^
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#await_holding_lock
= note: `#[warn(clippy::await_holding_lock)]` on by default
|
you are using an explicit closure for cloning elements:
src/storage/multi/mod.rs#L84
warning: you are using an explicit closure for cloning elements
--> src/storage/multi/mod.rs:84:9
|
84 | self.storages.read().get(name).map(|x| x.clone())
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling the dedicated `cloned` method: `self.storages.read().get(name).cloned()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_clone
= note: `#[warn(clippy::map_clone)]` on by default
|
the borrowed expression implements the required traits:
src/storage/local_storage/mod.rs#L417
warning: the borrowed expression implements the required traits
--> src/storage/local_storage/mod.rs:417:79
|
417 | let file_location = self.get_repository_folder(&repository.name).join(&location);
| ^^^^^^^^^ help: change this to: `location`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
this `if` branch is empty:
src/storage/file.rs#L136
warning: this `if` branch is empty
--> src/storage/file.rs:136:9
|
136 | if request.method() == Method::HEAD {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: you can remove it: `request.method() == Method::HEAD;`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_if
= note: `#[warn(clippy::needless_if)]` on by default
|
use of `unwrap_or_else` to construct default value:
src/repository/settings/repository_page.rs#L148
warning: use of `unwrap_or_else` to construct default value
--> src/repository/settings/repository_page.rs:148:25
|
148 | let page = body.unwrap_or_else(|| "".to_string());
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_default()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default
= note: `#[warn(clippy::unwrap_or_default)]` on by default
|
unneeded `return` statement:
src/repository/settings/repository_page.rs#L79
warning: unneeded `return` statement
--> src/repository/settings/repository_page.rs:79:17
|
79 | / return Ok(actix_web::HttpResponse::BadRequest()
80 | | .body("Repository type not supported".to_string()));
| |_______________________________________________________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
= note: `#[warn(clippy::needless_return)]` on by default
help: remove `return`
|
79 ~ Ok(actix_web::HttpResponse::BadRequest()
80 ~ .body("Repository type not supported".to_string()))
|
|
this `impl` can be derived:
src/repository/settings/badge.rs#L48
warning: this `impl` can be derived
--> src/repository/settings/badge.rs:48:1
|
48 | / impl Default for BadgeStyle {
49 | | fn default() -> Self {
50 | | BadgeStyle::Flat
51 | | }
52 | | }
| |_^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls
= help: remove the manual implementation...
help: ...and instead derive it...
|
42 + #[derive(Default)]
43 | pub enum BadgeStyle {
|
help: ...and mark the default variant
|
43 ~ #[default]
44 ~ Flat,
|
|
the borrowed expression implements the required traits:
src/repository/npm/mod.rs#L203
warning: the borrowed expression implements the required traits
--> src/repository/npm/mod.rs:203:57
|
203 | let created_response = serde_json::to_value(&LoginResponse { ok: message })
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `LoginResponse { ok: message }`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
the borrowed expression implements the required traits:
src/repository/npm/mod.rs#L165
warning: the borrowed expression implements the required traits
--> src/repository/npm/mod.rs:165:38
|
165 | serde_json::to_value(&get_response.unwrap()).map_err(InternalError::from)?;
| ^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `get_response.unwrap()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
calls to `push` immediately after creation:
src/repository/settings/mod.rs#L186
warning: calls to `push` immediately after creation
--> src/repository/settings/mod.rs:186:17
|
186 | / let mut layout = Vec::new();
187 | | $(
188 | | layout.push(crate::repository::settings::RepositoryLayoutValue{
189 | | config_name: stringify!($name),
190 | | config_proper_name: stringify!($name),
191 | | schema: schemars::schema_for!($config)
192 | | });
| |_______________________^ help: consider using the `vec![]` macro: `let layout = vec![..];`
|
::: src/repository/npm/mod.rs:93:1
|
93 | / crate::repository::settings::define_configs_on_handler!(
94 | | NPMHandler<StorageType>,
95 | | badge,
96 | | BadgeSettings,
97 | | frontend,
98 | | Frontend
99 | | );
| |_- in this macro invocation
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#vec_init_then_push
= note: this warning originates in the macro `crate::repository::settings::define_config_layout` which comes from the expansion of the macro `crate::repository::settings::define_configs_on_handler` (in Nightly builds, run with -Z macro-backtrace for more info)
|
large size difference between variants:
src/repository/nitro/mod.rs#L38
warning: large size difference between variants
--> src/repository/nitro/mod.rs:38:1
|
38 | / pub enum NitroFileResponseType {
39 | | Project(Project),
| | ---------------- the largest variant contains at least 320 bytes
40 | | Other,
| | ----- the second-largest variant carries no data at all
41 | | }
| |_^ the entire enum is at least 320 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
|
39 | Project(Box<Project>),
| ~~~~~~~~~~~~
|
this `if let` can be collapsed into the outer `if let`:
src/repository/maven/settings/macros.rs#L50
warning: this `if let` can be collapsed into the outer `if let`
--> src/repository/maven/settings/macros.rs:50:21
|
50 | / ... if let crate::repository::maven::MavenHandler::$maven_type(ref mut repository) = repository {
51 | | ... let _value = crate::repository::settings::RepositoryConfigHandler::<$config>::get(repository);
52 | | ... let value = crate::repository::settings::RepositoryConfigHandler::<$config>::update( repository, body).map(|_| true);
53 | | ... if let Err(e) = storage.save_repository_config(repository.get_repository(), crate::repository::settings::RepositoryConfigHandl...
... |
58 | | ... Ok(false)
59 | | ... }
| |_______^
|
::: src/repository/maven/staging/mod.rs:275:5
|
275 | / crate::repository::maven::settings::macros::define_repository_config_handlers_group!(
276 | | super::MavenStagingConfig,
277 | | stage_settings,
278 | | Staging
279 | | );
| |_____- in this macro invocation
|
help: the outer pattern can be modified to include the inner pattern
--> src/repository/maven/settings/macros.rs:49:98
|
49 | let result = if let crate::repository::handler::DynamicRepositoryHandler::Maven(ref mut repository) = repository {
| ^^^^^^^^^^^^^^^^^^ replace this binding
50 | if let crate::repository::maven::MavenHandler::$maven_type(ref mut repository) = repository {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ with this pattern
|
::: src/repository/maven/staging/mod.rs:275:5
|
275 | / crate::repository::maven::settings::macros::define_repository_config_handlers_group!(
276 | | super::MavenStagingConfig,
277 | | stage_settings,
278 | | Staging
279 | | );
| | -
| |_____|
| |_____in this macro invocation
| in this macro invocation
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match
= note: this warning originates in the macro `crate::repository::maven::settings::macros::define_repository_config_set` which comes from the expansion of the macro `crate::repository::maven::settings::macros::define_repository_config_handlers_group` (in Nightly builds, run with -Z macro-backtrace for more info)
|
this `if let` can be collapsed into the outer `if let`:
src/repository/maven/settings/macros.rs#L18
warning: this `if let` can be collapsed into the outer `if let`
--> src/repository/maven/settings/macros.rs:18:17
|
18 | / if let crate::repository::maven::MavenHandler::$maven_type(ref repository) = repository {
19 | | let value = crate::repository::settings::RepositoryConfigHandler::<$config>::get(repository);
20 | | return Ok(actix_web::HttpResponse::Ok().json(value));
21 | | }
| |_________________^
|
::: src/repository/maven/staging/mod.rs:275:5
|
275 | / crate::repository::maven::settings::macros::define_repository_config_handlers_group!(
276 | | super::MavenStagingConfig,
277 | | stage_settings,
278 | | Staging
279 | | );
| |_____- in this macro invocation
|
help: the outer pattern can be modified to include the inner pattern
--> src/repository/maven/settings/macros.rs:17:82
|
17 | if let crate::repository::handler::DynamicRepositoryHandler::Maven( repository) = repository.as_ref() {
| ^^^^^^^^^^ replace this binding
18 | if let crate::repository::maven::MavenHandler::$maven_type(ref repository) = repository {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ with this pattern
|
::: src/repository/maven/staging/mod.rs:275:5
|
275 | / crate::repository::maven::settings::macros::define_repository_config_handlers_group!(
276 | | super::MavenStagingConfig,
277 | | stage_settings,
278 | | Staging
279 | | );
| | -
| |_____|
| |_____in this macro invocation
| in this macro invocation
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match
= note: this warning originates in the macro `crate::repository::maven::settings::macros::define_repository_config_get` which comes from the expansion of the macro `crate::repository::maven::settings::macros::define_repository_config_handlers_group` (in Nightly builds, run with -Z macro-backtrace for more info)
|
this lifetime isn't used in the impl:
src/repository/maven/staging/mod.rs#L104
warning: this lifetime isn't used in the impl
--> src/repository/maven/staging/mod.rs:104:6
|
104 | impl<'a, S: Storage> StageHandler<S> for StagingRepository<S> {
| ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_lifetimes
= note: `#[warn(clippy::extra_unused_lifetimes)]` on by default
|
calls to `push` immediately after creation:
src/repository/settings/mod.rs#L186
warning: calls to `push` immediately after creation
--> src/repository/settings/mod.rs:186:17
|
186 | / let mut layout = Vec::new();
187 | | $(
188 | | layout.push(crate::repository::settings::RepositoryLayoutValue{
189 | | config_name: stringify!($name),
190 | | config_proper_name: stringify!($name),
191 | | schema: schemars::schema_for!($config)
192 | | });
| |_______________________^ help: consider using the `vec![]` macro: `let layout = vec![..];`
|
::: src/repository/maven/staging/mod.rs:95:1
|
95 | / crate::repository::settings::define_configs_on_handler!(
96 | | StagingRepository<StorageType>,
97 | | stage_settings,
98 | | MavenStagingConfig,
99 | | repository_page,
100 | | RepositoryPage
101 | | );
| |_- in this macro invocation
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#vec_init_then_push
= note: this warning originates in the macro `crate::repository::settings::define_config_layout` which comes from the expansion of the macro `crate::repository::settings::define_configs_on_handler` (in Nightly builds, run with -Z macro-backtrace for more info)
|
this `impl` can be derived:
src/repository/maven/staging/mod.rs#L46
warning: this `impl` can be derived
--> src/repository/maven/staging/mod.rs:46:1
|
46 | / impl Default for MavenStagingConfig {
47 | | fn default() -> Self {
48 | | Self {
49 | | parent: ProxySettings::default(),
... |
54 | | }
55 | | }
| |_^
|
= 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
|
37 + #[derive(Default)]
38 | pub struct MavenStagingConfig {
|
|
this function has too many arguments (8/7):
src/repository/maven/staging/git.rs#L25
warning: this function has too many arguments (8/7)
--> src/repository/maven/staging/git.rs:25:1
|
25 | / pub async fn stage_to_git(
26 | | username: String,
27 | | password: String,
28 | | url: String,
... |
33 | | model: UserSafeData,
34 | | ) -> Result<(), GitStageError> {
| |______________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments
= note: `#[warn(clippy::too_many_arguments)]` on by default
|
all variants have the same postfix: `Error`:
src/repository/maven/staging/git.rs#L16
warning: all variants have the same postfix: `Error`
--> src/repository/maven/staging/git.rs:16:1
|
16 | / pub enum GitStageError {
17 | | #[error("{0}")]
18 | | GitError(#[from] git2::Error),
19 | | #[error("{0}")]
... |
22 | | SerdeError(#[from] quick_xml::de::DeError),
23 | | }
| |_^
|
= help: remove the postfixes 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
|
all variants have the same postfix: `Error`:
src/repository/maven/staging/external.rs#L16
warning: all variants have the same postfix: `Error`
--> src/repository/maven/staging/external.rs:16:1
|
16 | / pub enum ExternalStageError {
17 | | #[error("{0}")]
18 | | IoError(#[from] io::Error),
19 | | #[error("{0}")]
... |
22 | | StorageError(#[from] StorageError),
23 | | }
| |_^
|
= help: remove the postfixes 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
|
this `if let` can be collapsed into the outer `if let`:
src/repository/maven/settings/macros.rs#L50
warning: this `if let` can be collapsed into the outer `if let`
--> src/repository/maven/settings/macros.rs:50:21
|
50 | / ... if let crate::repository::maven::MavenHandler::$maven_type(ref mut repository) = repository {
51 | | ... let _value = crate::repository::settings::RepositoryConfigHandler::<$config>::get(repository);
52 | | ... let value = crate::repository::settings::RepositoryConfigHandler::<$config>::update( repository, body).map(|_| true);
53 | | ... if let Err(e) = storage.save_repository_config(repository.get_repository(), crate::repository::settings::RepositoryConfigHandl...
... |
58 | | ... Ok(false)
59 | | ... }
| |_______^
|
::: src/repository/maven/proxy.rs:160:5
|
160 | / crate::repository::maven::settings::macros::define_repository_config_handlers_group!(
161 | | super::MavenProxySettings,
162 | | proxy,
163 | | Proxy
164 | | );
| |_____- in this macro invocation
|
help: the outer pattern can be modified to include the inner pattern
--> src/repository/maven/settings/macros.rs:49:98
|
49 | let result = if let crate::repository::handler::DynamicRepositoryHandler::Maven(ref mut repository) = repository {
| ^^^^^^^^^^^^^^^^^^ replace this binding
50 | if let crate::repository::maven::MavenHandler::$maven_type(ref mut repository) = repository {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ with this pattern
|
::: src/repository/maven/proxy.rs:160:5
|
160 | / crate::repository::maven::settings::macros::define_repository_config_handlers_group!(
161 | | super::MavenProxySettings,
162 | | proxy,
163 | | Proxy
164 | | );
| | -
| |_____|
| |_____in this macro invocation
| in this macro invocation
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match
= note: this warning originates in the macro `crate::repository::maven::settings::macros::define_repository_config_set` which comes from the expansion of the macro `crate::repository::maven::settings::macros::define_repository_config_handlers_group` (in Nightly builds, run with -Z macro-backtrace for more info)
|
this `if let` can be collapsed into the outer `if let`:
src/repository/maven/settings/macros.rs#L18
warning: this `if let` can be collapsed into the outer `if let`
--> src/repository/maven/settings/macros.rs:18:17
|
18 | / if let crate::repository::maven::MavenHandler::$maven_type(ref repository) = repository {
19 | | let value = crate::repository::settings::RepositoryConfigHandler::<$config>::get(repository);
20 | | return Ok(actix_web::HttpResponse::Ok().json(value));
21 | | }
| |_________________^
|
::: src/repository/maven/proxy.rs:160:5
|
160 | / crate::repository::maven::settings::macros::define_repository_config_handlers_group!(
161 | | super::MavenProxySettings,
162 | | proxy,
163 | | Proxy
164 | | );
| |_____- in this macro invocation
|
help: the outer pattern can be modified to include the inner pattern
--> src/repository/maven/settings/macros.rs:17:82
|
17 | if let crate::repository::handler::DynamicRepositoryHandler::Maven( repository) = repository.as_ref() {
| ^^^^^^^^^^ replace this binding
18 | if let crate::repository::maven::MavenHandler::$maven_type(ref repository) = repository {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ with this pattern
|
::: src/repository/maven/proxy.rs:160:5
|
160 | / crate::repository::maven::settings::macros::define_repository_config_handlers_group!(
161 | | super::MavenProxySettings,
162 | | proxy,
163 | | Proxy
164 | | );
| | -
| |_____|
| |_____in this macro invocation
| in this macro invocation
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match
= note: this warning originates in the macro `crate::repository::maven::settings::macros::define_repository_config_get` which comes from the expansion of the macro `crate::repository::maven::settings::macros::define_repository_config_handlers_group` (in Nightly builds, run with -Z macro-backtrace for more info)
|
used consecutive `str::replace` call:
src/repository/maven/proxy.rs#L155
warning: used consecutive `str::replace` call
--> src/repository/maven/proxy.rs:155:22
|
155 | value.into().replace('.', "/").replace(':', "/")
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `replace(['.', ':'], "/")`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_str_replace
|
calls to `push` immediately after creation:
src/repository/settings/mod.rs#L186
warning: calls to `push` immediately after creation
--> src/repository/settings/mod.rs:186:17
|
186 | / let mut layout = Vec::new();
187 | | $(
188 | | layout.push(crate::repository::settings::RepositoryLayoutValue{
189 | | config_name: stringify!($name),
190 | | config_proper_name: stringify!($name),
191 | | schema: schemars::schema_for!($config)
192 | | });
| |_______________________^ help: consider using the `vec![]` macro: `let layout = vec![..];`
|
::: src/repository/maven/proxy.rs:65:1
|
65 | / crate::repository::settings::define_configs_on_handler!(
66 | | ProxyMavenRepository<StorageType>,
67 | | badge,
68 | | BadgeSettings,
... |
74 | | RepositoryPage
75 | | );
| |_- in this macro invocation
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#vec_init_then_push
= note: this warning originates in the macro `crate::repository::settings::define_config_layout` which comes from the expansion of the macro `crate::repository::settings::define_configs_on_handler` (in Nightly builds, run with -Z macro-backtrace for more info)
|
this `if let` can be collapsed into the outer `if let`:
src/repository/maven/settings/macros.rs#L50
warning: this `if let` can be collapsed into the outer `if let`
--> src/repository/maven/settings/macros.rs:50:21
|
50 | / ... if let crate::repository::maven::MavenHandler::$maven_type(ref mut repository) = repository {
51 | | ... let _value = crate::repository::settings::RepositoryConfigHandler::<$config>::get(repository);
52 | | ... let value = crate::repository::settings::RepositoryConfigHandler::<$config>::update( repository, body).map(|_| true);
53 | | ... if let Err(e) = storage.save_repository_config(repository.get_repository(), crate::repository::settings::RepositoryConfigHandl...
... |
58 | | ... Ok(false)
59 | | ... }
| |_______^
|
::: src/repository/maven/hosted.rs:215:5
|
215 | / crate::repository::maven::settings::macros::define_repository_config_handlers_group!(
216 | | super::MavenHosted,
217 | | hosted,
218 | | Hosted
219 | | );
| |_____- in this macro invocation
|
help: the outer pattern can be modified to include the inner pattern
--> src/repository/maven/settings/macros.rs:49:98
|
49 | let result = if let crate::repository::handler::DynamicRepositoryHandler::Maven(ref mut repository) = repository {
| ^^^^^^^^^^^^^^^^^^ replace this binding
50 | if let crate::repository::maven::MavenHandler::$maven_type(ref mut repository) = repository {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ with this pattern
|
::: src/repository/maven/hosted.rs:215:5
|
215 | / crate::repository::maven::settings::macros::define_repository_config_handlers_group!(
216 | | super::MavenHosted,
217 | | hosted,
218 | | Hosted
219 | | );
| | -
| |_____|
| |_____in this macro invocation
| in this macro invocation
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match
= note: this warning originates in the macro `crate::repository::maven::settings::macros::define_repository_config_set` which comes from the expansion of the macro `crate::repository::maven::settings::macros::define_repository_config_handlers_group` (in Nightly builds, run with -Z macro-backtrace for more info)
|
this `if let` can be collapsed into the outer `if let`:
src/repository/maven/settings/macros.rs#L18
warning: this `if let` can be collapsed into the outer `if let`
--> src/repository/maven/settings/macros.rs:18:17
|
18 | / if let crate::repository::maven::MavenHandler::$maven_type(ref repository) = repository {
19 | | let value = crate::repository::settings::RepositoryConfigHandler::<$config>::get(repository);
20 | | return Ok(actix_web::HttpResponse::Ok().json(value));
21 | | }
| |_________________^
|
::: src/repository/maven/hosted.rs:215:5
|
215 | / crate::repository::maven::settings::macros::define_repository_config_handlers_group!(
216 | | super::MavenHosted,
217 | | hosted,
218 | | Hosted
219 | | );
| |_____- in this macro invocation
|
help: the outer pattern can be modified to include the inner pattern
--> src/repository/maven/settings/macros.rs:17:82
|
17 | if let crate::repository::handler::DynamicRepositoryHandler::Maven( repository) = repository.as_ref() {
| ^^^^^^^^^^ replace this binding
18 | if let crate::repository::maven::MavenHandler::$maven_type(ref repository) = repository {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ with this pattern
|
::: src/repository/maven/hosted.rs:215:5
|
215 | / crate::repository::maven::settings::macros::define_repository_config_handlers_group!(
216 | | super::MavenHosted,
217 | | hosted,
218 | | Hosted
219 | | );
| | -
| |_____|
| |_____in this macro invocation
| in this macro invocation
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match
= note: `#[warn(clippy::collapsible_match)]` on by default
= note: this warning originates in the macro `crate::repository::maven::settings::macros::define_repository_config_get` which comes from the expansion of the macro `crate::repository::maven::settings::macros::define_repository_config_handlers_group` (in Nightly builds, run with -Z macro-backtrace for more info)
|
used consecutive `str::replace` call:
src/repository/maven/hosted.rs#L210
warning: used consecutive `str::replace` call
--> src/repository/maven/hosted.rs:210:22
|
210 | value.into().replace('.', "/").replace(':', "/")
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `replace(['.', ':'], "/")`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_str_replace
= note: `#[warn(clippy::collapsible_str_replace)]` on by default
|
calls to `push` immediately after creation:
src/repository/settings/mod.rs#L186
warning: calls to `push` immediately after creation
--> src/repository/settings/mod.rs:186:17
|
186 | / let mut layout = Vec::new();
187 | | $(
188 | | layout.push(crate::repository::settings::RepositoryLayoutValue{
189 | | config_name: stringify!($name),
190 | | config_proper_name: stringify!($name),
191 | | schema: schemars::schema_for!($config)
192 | | });
| |_______________________^ help: consider using the `vec![]` macro: `let layout = vec![..];`
|
::: src/repository/maven/hosted.rs:43:1
|
43 | / crate::repository::settings::define_configs_on_handler!(
44 | | HostedMavenRepository<StorageType>,
45 | | badge,
46 | | BadgeSettings,
... |
52 | | RepositoryPage
53 | | );
| |_- in this macro invocation
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#vec_init_then_push
= note: `#[warn(clippy::vec_init_then_push)]` on by default
= note: this warning originates in the macro `crate::repository::settings::define_config_layout` which comes from the expansion of the macro `crate::repository::settings::define_configs_on_handler` (in Nightly builds, run with -Z macro-backtrace for more info)
|
the borrowed expression implements the required traits:
src/frontend/controllers.rs#L125
warning: the borrowed expression implements the required traits
--> src/frontend/controllers.rs:125:36
|
125 | create_dir_all(&p)?;
| ^^ help: change this to: `p`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
= note: `#[warn(clippy::needless_borrow)]` on by default
|
deref which would be done by auto-deref:
src/authentication/middleware.rs#L159
warning: deref which would be done by auto-deref
--> src/authentication/middleware.rs:159:62
|
159 | ... if let Ok(v) = i64::from_str(*username) {
| ^^^^^^^^^ help: try: `username`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref
= note: `#[warn(clippy::explicit_auto_deref)]` on by default
|
function `request_error` is never used:
src/authentication/middleware.rs#L250
warning: function `request_error` is never used
--> src/authentication/middleware.rs:250:4
|
250 | fn request_error<E: fmt::Debug + fmt::Display + 'static>(err: E) -> Error {
| ^^^^^^^^^^^^^
|
= note: `#[warn(dead_code)]` on by default
|
constants have by default a `'static` lifetime:
src/storage/mod.rs#L28
warning: constants have by default a `'static` lifetime
--> src/storage/mod.rs:28:31
|
28 | pub const REPOSITORY_FOLDER: &'static str = ".config.nitro_repo";
| -^^^^^^^---- help: consider removing `'static`: `&str`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes
|
constants have by default a `'static` lifetime:
src/storage/mod.rs#L27
warning: constants have by default a `'static` lifetime
--> src/storage/mod.rs:27:28
|
27 | pub const STORAGE_CONFIG: &'static str = "storage.json";
| -^^^^^^^---- help: consider removing `'static`: `&str`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes
|
constants have by default a `'static` lifetime:
src/storage/mod.rs#L26
warning: constants have by default a `'static` lifetime
--> src/storage/mod.rs:26:29
|
26 | pub const STORAGES_CONFIG: &'static str = "storages.json";
| -^^^^^^^---- help: consider removing `'static`: `&str`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes
= note: `#[warn(clippy::redundant_static_lifetimes)]` on by default
|
this `else { if .. }` block can be collapsed:
src/repository/web/multi/repository_handler.rs#L73
warning: this `else { if .. }` block can be collapsed
--> src/repository/web/multi/repository_handler.rs:73:12
|
73 | } else {
| ____________^
74 | | if let Some(some) =
75 | | NitroRepositoryHandler::latest_version(repository.as_ref(), &file).await?
76 | | {
... |
87 | | }
88 | | };
| |_____^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_else_if
= note: `#[warn(clippy::collapsible_else_if)]` on by default
help: collapse nested if block
|
73 ~ } else if let Some(some) =
74 + NitroRepositoryHandler::latest_version(repository.as_ref(), &file).await?
75 + {
76 + BadgeBuilder::new()
77 + .color_parse(&settings.color)
78 + .label_color_parse(&settings.label_color)
79 + .style(settings.style.to_badge_maker_style())
80 + .label(&repository.get_repository().name)
81 + .message(&some)
82 + .build()
83 + .unwrap()
84 + } else {
85 + return Ok(HttpResponse::NotFound().finish());
86 ~ };
|
|
redundant field names in struct initialization:
src/repository/web/multi/public/repositories.rs#L110
warning: redundant field names in struct initialization
--> src/repository/web/multi/public/repositories.rs:110:9
|
110 | page_content: page_content,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `page_content`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names
= note: `#[warn(clippy::redundant_field_names)]` on by default
|
clippy_check
The following actions uses node12 which is deprecated and will be forced to run on node16: actions/checkout@v2, Swatinem/rust-cache@v1, actions-rs/clippy-check@v1. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
|
clippy_check
The `save-state` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
clippy_check
The `save-state` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
clippy_check
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
clippy_check
Unexpected input(s) 'working-directory', valid inputs are ['token', 'toolchain', 'args', 'use-cross', 'name']
|
Linux / Stable
The following actions uses node12 which is deprecated and will be forced to run on node16: actions/checkout@v2, Swatinem/rust-cache@v1, actions-rs/toolchain@v1, actions/setup-node@v2, actions/upload-artifact@v2. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
|
Linux / Stable
The `save-state` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
Linux / Stable
The `save-state` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
Linux / Stable
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
Linux / Stable
Unexpected input(s) 'working-directory', valid inputs are ['toolchain', 'target', 'default', 'override', 'profile', 'components']
|
Linux / Stable
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
Linux / Stable
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
Linux / Stable
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
Linux / Stable
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
Linux / Stable
Unexpected input(s) 'working-directory', valid inputs are ['always-auth', 'node-version', 'node-version-file', 'architecture', 'check-latest', 'registry-url', 'scope', 'token', 'cache', 'cache-dependency-path', 'version']
|
Linux / Stable
Unexpected input(s) 'working-directory', valid inputs are ['always-auth', 'node-version', 'node-version-file', 'architecture', 'check-latest', 'registry-url', 'scope', 'token', 'cache', 'cache-dependency-path', 'version']
|
Artifacts
Produced during runtime
Name | Size | |
---|---|---|
nitro_repo stable Linux
Expired
|
1.31 MB |
|