Skip to content

add .flush() and .clear() to RawCall #7

add .flush() and .clear() to RawCall

add .flush() and .clear() to RawCall #7

Triggered via pull request September 1, 2023 20:48
Status Failure
Total duration 58s
Artifacts

linux.yml

on: pull_request
Matrix: test
Fit to window
Zoom out
Zoom in

Annotations

11 errors and 4 warnings
(x86_64-unknown-linux-gnu, stable)
Process completed with exit code 101.
use of moved value: `self`: stylus-sdk/src/call/raw.rs#L133
error[E0382]: use of moved value: `self` --> stylus-sdk/src/call/raw.rs:133:9 | 129 | pub fn storage_cache_maybe_flush(self, flush: bool) ->Self { | ---- move occurs because `self` has type `call::raw::RawCall`, which does not implement the `Copy` trait 130 | if flush { 131 | self.storage_cache_flush(); | --------------------- `self` moved due to this method call 132 | } 133 | self | ^^^^ value used here after move | note: `call::raw::RawCall::storage_cache_flush` takes ownership of the receiver `self`, which moves `self` --> stylus-sdk/src/call/raw.rs:125:32 | 125 | pub fn storage_cache_flush(self) -> Self { | ^^^^ help: you can `clone` the value and consume it, but this might not be your desired behavior | 131 | self.clone().storage_cache_flush(); | ++++++++
cannot assign to `self.flush`, as `self` is not declared as mutable: stylus-sdk/src/call/raw.rs#L126
error[E0594]: cannot assign to `self.flush`, as `self` is not declared as mutable --> stylus-sdk/src/call/raw.rs:126:9 | 126 | self.flush = true; | ^^^^^^^^^^^^^^^^^ cannot assign | help: consider changing this to be mutable | 125 | pub fn storage_cache_flush(mut self) -> Self { | +++
use of moved value: `self`: stylus-sdk/src/call/raw.rs#L121
error[E0382]: use of moved value: `self` --> stylus-sdk/src/call/raw.rs:121:9 | 117 | pub fn storage_cache_maybe_clear(self, clear: bool) ->Self { | ---- move occurs because `self` has type `call::raw::RawCall`, which does not implement the `Copy` trait 118 | if clear { 119 | self.storage_cache_clear(); | --------------------- `self` moved due to this method call 120 | } 121 | self | ^^^^ value used here after move | note: `call::raw::RawCall::storage_cache_clear` takes ownership of the receiver `self`, which moves `self` --> stylus-sdk/src/call/raw.rs:113:32 | 113 | pub fn storage_cache_clear(self) -> Self { | ^^^^ help: you can `clone` the value and consume it, but this might not be your desired behavior | 119 | self.clone().storage_cache_clear(); | ++++++++
cannot assign to `self.clear`, as `self` is not declared as mutable: stylus-sdk/src/call/raw.rs#L114
error[E0594]: cannot assign to `self.clear`, as `self` is not declared as mutable --> stylus-sdk/src/call/raw.rs:114:9 | 114 | self.clear = true; | ^^^^^^^^^^^^^^^^^ cannot assign | help: consider changing this to be mutable | 113 | pub fn storage_cache_clear(mut self) -> Self { | +++
(x86_64-unknown-linux-gnu, nightly)
The job was canceled because "x86_64-unknown-linux-gnu_stable" failed.
(x86_64-unknown-linux-gnu, nightly)
The operation was canceled.
use of moved value: `self`: stylus-sdk/src/call/raw.rs#L133
error[E0382]: use of moved value: `self` --> stylus-sdk/src/call/raw.rs:133:9 | 129 | pub fn storage_cache_maybe_flush(self, flush: bool) ->Self { | ---- move occurs because `self` has type `call::raw::RawCall`, which does not implement the `Copy` trait 130 | if flush { 131 | self.storage_cache_flush(); | --------------------- `self` moved due to this method call 132 | } 133 | self | ^^^^ value used here after move | note: `call::raw::RawCall::storage_cache_flush` takes ownership of the receiver `self`, which moves `self` --> stylus-sdk/src/call/raw.rs:125:32 | 125 | pub fn storage_cache_flush(self) -> Self { | ^^^^ help: you can `clone` the value and consume it, but this might not be your desired behavior | 131 | self.clone().storage_cache_flush(); | ++++++++
cannot assign to `self.flush`, as `self` is not declared as mutable: stylus-sdk/src/call/raw.rs#L126
error[E0594]: cannot assign to `self.flush`, as `self` is not declared as mutable --> stylus-sdk/src/call/raw.rs:126:9 | 126 | self.flush = true; | ^^^^^^^^^^^^^^^^^ cannot assign | help: consider changing this to be mutable | 125 | pub fn storage_cache_flush(mut self) -> Self { | +++
use of moved value: `self`: stylus-sdk/src/call/raw.rs#L121
error[E0382]: use of moved value: `self` --> stylus-sdk/src/call/raw.rs:121:9 | 117 | pub fn storage_cache_maybe_clear(self, clear: bool) ->Self { | ---- move occurs because `self` has type `call::raw::RawCall`, which does not implement the `Copy` trait 118 | if clear { 119 | self.storage_cache_clear(); | --------------------- `self` moved due to this method call 120 | } 121 | self | ^^^^ value used here after move | note: `call::raw::RawCall::storage_cache_clear` takes ownership of the receiver `self`, which moves `self` --> stylus-sdk/src/call/raw.rs:113:32 | 113 | pub fn storage_cache_clear(self) -> Self { | ^^^^ help: you can `clone` the value and consume it, but this might not be your desired behavior | 119 | self.clone().storage_cache_clear(); | ++++++++
cannot assign to `self.clear`, as `self` is not declared as mutable: stylus-sdk/src/call/raw.rs#L114
error[E0594]: cannot assign to `self.clear`, as `self` is not declared as mutable --> stylus-sdk/src/call/raw.rs:114:9 | 114 | self.clear = true; | ^^^^^^^^^^^^^^^^^ cannot assign | help: consider changing this to be mutable | 113 | pub fn storage_cache_clear(mut self) -> Self { | +++
unused import: `storage::StorageCache`: stylus-sdk/src/call/raw.rs#L4
warning: unused import: `storage::StorageCache` --> stylus-sdk/src/call/raw.rs:4:75 | 4 | use crate::{contract::read_return_data, hostio::{self, RETURN_DATA_SIZE}, storage::StorageCache, tx, ArbResult, storage}; | ^^^^^^^^^^^^^^^^^^^^^
unused import: `StorageCache`: stylus-sdk/src/call/mod.rs#L4
warning: unused import: `StorageCache` --> stylus-sdk/src/call/mod.rs:4:22 | 4 | use crate::storage::{StorageCache, TopLevelStorage}; | ^^^^^^^^^^^^ | = note: `#[warn(unused_imports)]` on by default
unused import: `storage::StorageCache`: stylus-sdk/src/call/raw.rs#L4
warning: unused import: `storage::StorageCache` --> stylus-sdk/src/call/raw.rs:4:75 | 4 | use crate::{contract::read_return_data, hostio::{self, RETURN_DATA_SIZE}, storage::StorageCache, tx, ArbResult, storage}; | ^^^^^^^^^^^^^^^^^^^^^
unused import: `StorageCache`: stylus-sdk/src/call/mod.rs#L4
warning: unused import: `StorageCache` --> stylus-sdk/src/call/mod.rs:4:22 | 4 | use crate::storage::{StorageCache, TopLevelStorage}; | ^^^^^^^^^^^^ | = note: `#[warn(unused_imports)]` on by default