refactor(platform): replace bls library #4536
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/errors/protocol_error.rs#L1
warning: unused import: `std::array::TryFromSliceError`
--> packages/rs-dpp/src/errors/protocol_error.rs:1:5
|
1 | use std::array::TryFromSliceError;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `#[warn(unused_imports)]` on by default
|
Run clechasseur/rs-clippy-check@v3:
packages/rs-dpp/src/bls/native_bls.rs#L5
warning: unused import: `std::array::TryFromSliceError`
--> packages/rs-dpp/src/bls/native_bls.rs:5:5
|
5 | use std::array::TryFromSliceError;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
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
|
Post Setup Rust
100% - 196 hits, 0 misses, 0 errors
|
Loading