ci: improve caching #4516
Annotations
11 warnings and 1 notice
Setup Rust
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/
|
Run clechasseur/rs-clippy-check@v3:
packages/rs-dpp/src/data_contract/document_type/property/mod.rs#L1203
warning: taken reference of right operand
--> packages/rs-dpp/src/data_contract/document_type/property/mod.rs:1203:20
|
1203 | if value == &vec![0] {
| ^^^^^^^^^--------
| |
| help: use the right value directly: `...`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref
= note: `#[warn(clippy::op_ref)]` on by default
|
Run clechasseur/rs-clippy-check@v3:
packages/rs-dpp/src/data_contract/document_type/property/mod.rs#L1294
warning: taken reference of right operand
--> packages/rs-dpp/src/data_contract/document_type/property/mod.rs:1294:20
|
1294 | if value == &vec![0] {
| ^^^^^^^^^--------
| |
| help: use the right value directly: `...`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref
|
Run clechasseur/rs-clippy-check@v3:
packages/rs-dpp/src/data_contract/document_type/property/mod.rs#L1296
warning: taken reference of right operand
--> packages/rs-dpp/src/data_contract/document_type/property/mod.rs:1296:27
|
1296 | } else if value == &vec![1] {
| ^^^^^^^^^--------
| |
| help: use the right value directly: `...`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref
|
Run clechasseur/rs-clippy-check@v3:
packages/rs-dpp/src/data_contract/document_type/index/mod.rs#L157
warning: non-canonical implementation of `partial_cmp` on an `Ord` type
--> packages/rs-dpp/src/data_contract/document_type/index/mod.rs:157:1
|
157 | / impl PartialOrd for ContestedIndexFieldMatch {
158 | | fn partial_cmp(&self, other: &Self) -> Option<Ordering> {
| | _____________________________________________________________-
159 | || use ContestedIndexFieldMatch::*;
160 | || match (self, other) {
161 | || // Comparing two integers
... ||
170 | || }
171 | || }
| ||_____- help: change this to: `{ Some(self.cmp(other)) }`
172 | | }
| |__^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#non_canonical_partial_ord_impl
= note: `#[warn(clippy::non_canonical_partial_ord_impl)]` on by default
|
Run clechasseur/rs-clippy-check@v3:
packages/rs-dpp/src/data_contract/document_type/index/mod.rs#L503
warning: `to_string` applied to a type that implements `Display` in `format!` args
--> packages/rs-dpp/src/data_contract/document_type/index/mod.rs:503:66
|
503 | ... e.to_string()
| ^^^^^^^^^^^^ help: remove this
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_in_format_args
= note: `#[warn(clippy::to_string_in_format_args)]` on by default
|
Run clechasseur/rs-clippy-check@v3:
packages/rs-dpp/src/data_contract/document_type/v0/random_document_type.rs#L396
warning: iterating on a map's values
--> packages/rs-dpp/src/data_contract/document_type/v0/random_document_type.rs:396:35
|
396 | let indices_json_schema = indices
| ___________________________________^
397 | | .iter()
398 | | .map(|(_, index)| {
399 | | let properties_schema = index
... |
412 | | })
413 | | })
| |______________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_kv_map
= note: `#[warn(clippy::iter_kv_map)]` on by default
help: try
|
396 ~ let indices_json_schema = indices.values().map(|index| {
397 + let properties_schema = index
398 + .properties
399 + .iter()
400 + .map(|prop| {
401 + // Only "asc" is allowed for now (v1.0-dev)
402 + json!({ <std::string::String as Clone>::clone(&prop.name): "asc" })
403 + })
404 + .collect::<Vec<_>>();
405 +
406 + json!({
407 + "name": index.name,
408 + "properties": properties_schema,
409 + "unique": index.unique,
410 + })
411 + })
|
|
Run clechasseur/rs-clippy-check@v3:
packages/rs-dpp/src/data_contract/v0/accessors/mod.rs#L70
warning: unnecessary use of `get(name).is_some()`
--> packages/rs-dpp/src/data_contract/v0/accessors/mod.rs:70:29
|
70 | self.document_types.get(name).is_some()
| ^^^^^^^^^^^^^^^^^^^ help: replace it with: `contains_key(name)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_get_then_check
= note: `#[warn(clippy::unnecessary_get_then_check)]` on by default
|
Run clechasseur/rs-clippy-check@v3:
packages/rs-dpp/src/document/document_factory/v0/mod.rs#L215
warning: very complex type used. Consider factoring parts into `type` definitions
--> packages/rs-dpp/src/document/document_factory/v0/mod.rs:215:24
|
215 | let documents: Vec<(
| ________________________^
216 | | DocumentTransitionActionType,
217 | | Vec<(Document, DocumentTypeRef, Bytes32)>,
218 | | )> = documents_iter.into_iter().collect();
| |__________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity
= note: `#[warn(clippy::type_complexity)]` on by default
|
Run clechasseur/rs-clippy-check@v3:
packages/rs-dpp/src/document/document_methods/is_equal_ignoring_timestamps/v0/mod.rs#L23
warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do
--> packages/rs-dpp/src/document/document_methods/is_equal_ignoring_timestamps/v0/mod.rs:23:28
|
23 | ignore_fields: &Vec<&str>,
| ^^^^^^^^^^ help: change this to: `&[&str]`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg
= note: `#[warn(clippy::ptr_arg)]` on by default
|
Run clechasseur/rs-clippy-check@v3:
packages/rs-dpp/src/document/specialized_document_factory/v0/mod.rs#L223
warning: very complex type used. Consider factoring parts into `type` definitions
--> packages/rs-dpp/src/document/specialized_document_factory/v0/mod.rs:223:24
|
223 | let documents: Vec<(
| ________________________^
224 | | DocumentTransitionActionType,
225 | | Vec<(Document, DocumentTypeRef, Bytes32)>,
226 | | )> = documents_iter.into_iter().collect();
| |__________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity
|
Post Setup Rust
100% - 193 hits, 0 misses, 0 errors
|
Loading