Skip to content

A set of fixes and features for wit\2 #5687

A set of fixes and features for wit\2

A set of fixes and features for wit\2 #5687

Triggered via pull request July 4, 2024 07:59
Status Failure
Total duration 17m 58s
Artifacts

push.yml

on: pull_request
Fit to window
Zoom out
Zoom in

Annotations

14 errors and 8 warnings
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 4 previous errors
build_ubuntu
Unable to create clippy annotations! Reason: HttpError: Resource not accessible by integration
build_ubuntu: data_structures/src/staking/stakes.rs#L439
returning the result of a `let` binding from a block
build_ubuntu: data_structures/src/wit.rs#L168
casting `u8` to `u32` may become silently lossy if you later change the type
build_ubuntu: data_structures/src/staking/stakes.rs#L439
returning the result of a `let` binding from a block
build_ubuntu: data_structures/src/staking/stakes.rs#L996
unnecessary map of the identity function
build_ubuntu: data_structures/src/wit.rs#L168
casting `u8` to `u32` may become silently lossy if you later change the type
build_ubuntu
Exiting due to clippy errors
casting `u8` to `u32` may become silently lossy if you later change the type: data_structures/src/wit.rs#L168
error: casting `u8` to `u32` may become silently lossy if you later change the type --> data_structures/src/wit.rs:168:27 | 168 | self / 10_u64.pow(digits as u32) | ^^^^^^^^^^^^^ help: try: `u32::from(digits)` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_lossless = note: requested on the command line with `-D clippy::cast-lossless`
unnecessary map of the identity function: data_structures/src/staking/stakes.rs#L996
error: unnecessary map of the identity function --> data_structures/src/staking/stakes.rs:996:21 | 996 | .take(4) | _____________________^ 997 | | .map(|sk| sk) | |_________________________^ help: remove the call to `map` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_identity = note: `-D clippy::map-identity` implied by `-D warnings` = help: to override `-D warnings` add `#[allow(clippy::map_identity)]`
returning the result of a `let` binding from a block: data_structures/src/staking/stakes.rs#L439
error: returning the result of a `let` binding from a block --> data_structures/src/staking/stakes.rs:439:9 | 428 | / let valid_staking_pair = if !self.by_validator.contains_key(&validator) { 429 | | Ok(()) 430 | | } else { 431 | | let stake_key = StakeKey::from((validator.clone(), withdrawer)); ... | 436 | | } 437 | | }; | |__________- unnecessary `let` binding 438 | 439 | valid_staking_pair | ^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return = note: `-D clippy::let-and-return` implied by `-D warnings` = help: to override `-D warnings` add `#[allow(clippy::let_and_return)]` help: return the expression directly | 428 ~ 429 | 430 ~ if !self.by_validator.contains_key(&validator) { 431 + Ok(()) 432 + } else { 433 + let stake_key = StakeKey::from((validator.clone(), withdrawer)); 434 + if self.by_key.contains_key(&stake_key) { 435 + Ok(()) 436 + } else { 437 + Err(StakesError::DifferentWithdrawer { validator }) 438 + } 439 + } |
casting `u8` to `u32` may become silently lossy if you later change the type: data_structures/src/wit.rs#L168
error: casting `u8` to `u32` may become silently lossy if you later change the type --> data_structures/src/wit.rs:168:27 | 168 | self / 10_u64.pow(digits as u32) | ^^^^^^^^^^^^^ help: try: `u32::from(digits)` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_lossless = note: requested on the command line with `-D clippy::cast-lossless`
returning the result of a `let` binding from a block: data_structures/src/staking/stakes.rs#L439
error: returning the result of a `let` binding from a block --> data_structures/src/staking/stakes.rs:439:9 | 428 | / let valid_staking_pair = if !self.by_validator.contains_key(&validator) { 429 | | Ok(()) 430 | | } else { 431 | | let stake_key = StakeKey::from((validator.clone(), withdrawer)); ... | 436 | | } 437 | | }; | |__________- unnecessary `let` binding 438 | 439 | valid_staking_pair | ^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return = note: `-D clippy::let-and-return` implied by `-D warnings` = help: to override `-D warnings` add `#[allow(clippy::let_and_return)]` help: return the expression directly | 428 ~ 429 | 430 ~ if !self.by_validator.contains_key(&validator) { 431 + Ok(()) 432 + } else { 433 + let stake_key = StakeKey::from((validator.clone(), withdrawer)); 434 + if self.by_key.contains_key(&stake_key) { 435 + Ok(()) 436 + } else { 437 + Err(StakesError::DifferentWithdrawer { validator }) 438 + } 439 + } |
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
It seems that this Action is executed from the forked repository.
build_ubuntu
GitHub Actions are not allowed to create Check annotations, when executed for a forked repos. See https://github.com/actions-rs/clippy-check/issues/2 for details.
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/