feat(platform)!: contested document resolution with masternode voting #2540
Annotations
11 warnings
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: mozilla-actions/[email protected], strophy/actions-cache@opendal-update. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
|
packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/document_create_transition/v0/mod.rs#L9
warning: unused import: `platform_value::ValueMapHelper`
--> packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/document_create_transition/v0/mod.rs:9:5
|
9 | use platform_value::ValueMapHelper;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `#[warn(unused_imports)]` on by default
|
packages/rs-dpp/src/voting/contender_structs/contender/mod.rs#L4
warning: unused import: `crate::document::serialization_traits::DocumentPlatformConversionMethodsV0`
--> packages/rs-dpp/src/voting/contender_structs/contender/mod.rs:4:5
|
4 | use crate::document::serialization_traits::DocumentPlatformConversionMethodsV0;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
packages/rs-dpp/src/data_contract/document_type/index/mod.rs#L130
warning: variable does not need to be mutable
--> packages/rs-dpp/src/data_contract/document_type/index/mod.rs:130:36
|
130 | fn visit_enum<V>(self, mut visitor: V) -> Result<ContestedIndexFieldMatch, V::Error>
| ----^^^^^^^
| |
| help: remove this `mut`
|
= note: `#[warn(unused_mut)]` on by default
|
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
|
packages/rs-dpp/src/data_contract/document_type/index/mod.rs#L492
warning: `to_string` applied to a type that implements `Display` in `format!` args
--> packages/rs-dpp/src/data_contract/document_type/index/mod.rs:492:66
|
492 | ... 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
|
packages/rs-dpp/src/data_contract/document_type/property/mod.rs#L846
warning: taken reference of right operand
--> packages/rs-dpp/src/data_contract/document_type/property/mod.rs:846:20
|
846 | 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
|
packages/rs-dpp/src/data_contract/document_type/property/mod.rs#L883
warning: taken reference of right operand
--> packages/rs-dpp/src/data_contract/document_type/property/mod.rs:883:20
|
883 | 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
|
packages/rs-dpp/src/data_contract/document_type/property/mod.rs#L885
warning: taken reference of right operand
--> packages/rs-dpp/src/data_contract/document_type/property/mod.rs:885:27
|
885 | } 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
|
packages/rs-dpp/src/data_contract/document_type/v0/random_document_type.rs#L390
warning: iterating on a map's values
--> packages/rs-dpp/src/data_contract/document_type/v0/random_document_type.rs:390:35
|
390 | let indices_json_schema = indices
| ___________________________________^
391 | | .iter()
392 | | .map(|(_, index)| {
393 | | let properties_schema = index
... |
406 | | })
407 | | })
| |______________^
|
= 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
|
390 ~ let indices_json_schema = indices.values().map(|index| {
391 + let properties_schema = index
392 + .properties
393 + .iter()
394 + .map(|prop| {
395 + // Only "asc" is allowed for now (v1.0-dev)
396 + json!({ <std::string::String as Clone>::clone(&prop.name): "asc" })
397 + })
398 + .collect::<Vec<_>>();
399 +
400 + json!({
401 + "name": index.name,
402 + "properties": properties_schema,
403 + "unique": index.unique,
404 + })
405 + })
|
|
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
|
This job succeeded
Loading