fix(staking): implement serde manually to preserve Rc
properties
#5682
Annotations
6 errors and 6 warnings
field assignment outside of initializer for an instance created with Default::default():
data_structures/src/staking/stakes.rs#L320
error: field assignment outside of initializer for an instance created with Default::default()
--> data_structures/src/staking/stakes.rs:320:9
|
320 | stakes.by_key = entries;
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
note: consider initializing the variable with `Stakes::<Address, Coins, Epoch, Power> { by_key: entries, ..Default::default() }` and removing relevant reassignments
--> data_structures/src/staking/stakes.rs:319:9
|
319 | let mut stakes = Stakes::default();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#field_reassign_with_default
= note: `-D clippy::field-reassign-with-default` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::field_reassign_with_default)]`
|
missing documentation for an associated function:
data_structures/src/staking/stakes.rs#L316
error: missing documentation for an associated function
--> data_structures/src/staking/stakes.rs:316:5
|
316 | / pub fn with_entries(
317 | | entries: BTreeMap<StakeKey<Address>, SyncStake<Address, Coins, Epoch, Power>>,
318 | | ) -> Self {
| |_____________^
|
note: the lint level is defined here
--> data_structures/src/staking/mod.rs:1:9
|
1 | #![deny(missing_docs)]
| ^^^^^^^^^^^^
|
field assignment outside of initializer for an instance created with Default::default():
data_structures/src/staking/stakes.rs#L320
error: field assignment outside of initializer for an instance created with Default::default()
--> data_structures/src/staking/stakes.rs:320:9
|
320 | stakes.by_key = entries;
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
note: consider initializing the variable with `Stakes::<Address, Coins, Epoch, Power> { by_key: entries, ..Default::default() }` and removing relevant reassignments
--> data_structures/src/staking/stakes.rs:319:9
|
319 | let mut stakes = Stakes::default();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#field_reassign_with_default
= note: `-D clippy::field-reassign-with-default` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::field_reassign_with_default)]`
|
build_ubuntu
could not compile `witnet_data_structures` (lib) due to 3 previous errors
|
build_ubuntu
could not compile `witnet_data_structures` (lib test) due to 2 previous errors
|
build_ubuntu
Clippy had exited with the 101 exit code
|
build_ubuntu
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions-rs/toolchain@v1, actions-rs/cargo@v1, actions-rs/clippy-check@v1. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
|
build_ubuntu
The following actions uses node12 which is deprecated and will be forced to run on node16: actions-rs/toolchain@v1, actions-rs/cargo@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/
|
build_ubuntu
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/
|
build_ubuntu
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/
|
build_ubuntu
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/
|
build_ubuntu
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/
|