Skip to content

SDK Testing Framework Prototyping #342

SDK Testing Framework Prototyping

SDK Testing Framework Prototyping #342

GitHub Actions / clippy succeeded Dec 27, 2024 in 1s

clippy

37 warnings

Details

Results

Message level Amount
Internal compiler error 0
Error 0
Warning 37
Note 0
Help 0

Versions

  • rustc 1.83.0 (90b35a623 2024-11-26)
  • cargo 1.83.0 (5ffbef321 2024-10-29)
  • clippy 0.1.83 (90b35a6 2024-11-26)

Annotations

Check warning on line 47 in stylus-sdk/src/testing/mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

missing documentation for a struct

warning: missing documentation for a struct
  --> stylus-sdk/src/testing/mod.rs:47:1
   |
47 | pub struct MockHost;
   | ^^^^^^^^^^^^^^^^^^^

Check warning on line 89 in stylus-sdk/src/storage/mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

bounds on generic parameters in type aliases are not enforced

warning: bounds on generic parameters in type aliases are not enforced
   --> stylus-sdk/src/storage/mod.rs:89:35
    |
89  |               pub type $name<'a, H: Host> = StorageFixedBytes<'a, H, $bytes>;
    |                                   --^^^^
    |                                   | |
    |                                   | will not be checked at usage sites of the type alias
    |                                   help: remove this bound
...
105 | / alias_bytes! {
106 | |     StorageB8, 8, 1;
107 | |     StorageB16, 16, 2;
108 | |     StorageB32, 32, 4;
...   |
115 | |     StorageB256, 256, 32;
116 | | }
    | |_- in this macro invocation
    |
    = note: this is a known limitation of the type checker that may be lifted in a future edition.
            see issue #112792 <https://github.com/rust-lang/rust/issues/112792> for more information
    = note: this warning originates in the macro `alias_bytes` (in Nightly builds, run with -Z macro-backtrace for more info)

Check warning on line 80 in stylus-sdk/src/storage/mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

bounds on generic parameters in type aliases are not enforced

warning: bounds on generic parameters in type aliases are not enforced
   --> stylus-sdk/src/storage/mod.rs:80:42
    |
80  |               pub type $signed_name<'a, H: Host> = StorageSigned<'a, H, $bits, $limbs>;
    |                                          --^^^^
    |                                          | |
    |                                          | will not be checked at usage sites of the type alias
    |                                          help: remove this bound
...
94  | / alias_ints! {
95  | |     StorageU8, StorageI8, 8, 1;
96  | |     StorageU16, StorageI16, 16, 1;
97  | |     StorageU32, StorageI32, 32, 1;
...   |
102 | |     StorageU256, StorageI256, 256, 4;
103 | | }
    | |_- in this macro invocation
    |
    = note: this is a known limitation of the type checker that may be lifted in a future edition.
            see issue #112792 <https://github.com/rust-lang/rust/issues/112792> for more information
    = note: this warning originates in the macro `alias_ints` (in Nightly builds, run with -Z macro-backtrace for more info)

Check warning on line 77 in stylus-sdk/src/storage/mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

bounds on generic parameters in type aliases are not enforced

warning: bounds on generic parameters in type aliases are not enforced
   --> stylus-sdk/src/storage/mod.rs:77:35
    |
77  |               pub type $name<'a, H: Host> = StorageUint<'a, $bits, $limbs, H>;
    |                                   --^^^^
    |                                   | |
    |                                   | will not be checked at usage sites of the type alias
    |                                   help: remove this bound
...
94  | / alias_ints! {
95  | |     StorageU8, StorageI8, 8, 1;
96  | |     StorageU16, StorageI16, 16, 1;
97  | |     StorageU32, StorageI32, 32, 1;
...   |
102 | |     StorageU256, StorageI256, 256, 4;
103 | | }
    | |_- in this macro invocation
    |
    = note: this is a known limitation of the type checker that may be lifted in a future edition.
            see issue #112792 <https://github.com/rust-lang/rust/issues/112792> for more information
    = note: `#[warn(type_alias_bounds)]` on by default
    = note: this warning originates in the macro `alias_ints` (in Nightly builds, run with -Z macro-backtrace for more info)

Check warning on line 6 in stylus-sdk/src/host/wasm.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

missing documentation for a static

warning: missing documentation for a static
  --> stylus-sdk/src/host/wasm.rs:6:1
   |
6  | pub static GLOBAL_WASM_HOST: Lazy<WasmHost> = Lazy::new(|| WasmHost {});
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
note: the lint level is defined here
  --> stylus-sdk/src/lib.rs:27:9
   |
27 | #![warn(missing_docs)]
   |         ^^^^^^^^^^^^

Check warning on line 742 in stylus-sdk/src/storage/mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

the following explicit lifetimes could be elided: 'a

warning: the following explicit lifetimes could be elided: 'a
   --> stylus-sdk/src/storage/mod.rs:742:6
    |
742 | impl<'a, H: Host> Deref for StorageBlockHash<'a, H> {
    |      ^^                                      ^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
    |
742 - impl<'a, H: Host> Deref for StorageBlockHash<'a, H> {
742 + impl<H: Host> Deref for StorageBlockHash<'_, H> {
    |

Check warning on line 690 in stylus-sdk/src/storage/mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

the following explicit lifetimes could be elided: 'a

warning: the following explicit lifetimes could be elided: 'a
   --> stylus-sdk/src/storage/mod.rs:690:6
    |
690 | impl<'a, H: Host> StorageBlockHash<'a, H> {
    |      ^^                            ^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
    |
690 - impl<'a, H: Host> StorageBlockHash<'a, H> {
690 + impl<H: Host> StorageBlockHash<'_, H> {
    |

Check warning on line 662 in stylus-sdk/src/storage/mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

the following explicit lifetimes could be elided: 'a

warning: the following explicit lifetimes could be elided: 'a
   --> stylus-sdk/src/storage/mod.rs:662:6
    |
662 | impl<'a, H: Host> Deref for StorageBlockNumber<'a, H> {
    |      ^^                                        ^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
    |
662 - impl<'a, H: Host> Deref for StorageBlockNumber<'a, H> {
662 + impl<H: Host> Deref for StorageBlockNumber<'_, H> {
    |

Check warning on line 603 in stylus-sdk/src/storage/mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

the following explicit lifetimes could be elided: 'a

warning: the following explicit lifetimes could be elided: 'a
   --> stylus-sdk/src/storage/mod.rs:603:6
    |
603 | impl<'a, H: Host> StorageBlockNumber<'a, H> {
    |      ^^                              ^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
    |
603 - impl<'a, H: Host> StorageBlockNumber<'a, H> {
603 + impl<H: Host> StorageBlockNumber<'_, H> {
    |

Check warning on line 576 in stylus-sdk/src/storage/mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

the following explicit lifetimes could be elided: 'a

warning: the following explicit lifetimes could be elided: 'a
   --> stylus-sdk/src/storage/mod.rs:576:6
    |
576 | impl<'a, H: Host> Deref for StorageAddress<'a, H> {
    |      ^^                                    ^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
    |
576 - impl<'a, H: Host> Deref for StorageAddress<'a, H> {
576 + impl<H: Host> Deref for StorageAddress<'_, H> {
    |

Check warning on line 518 in stylus-sdk/src/storage/mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

the following explicit lifetimes could be elided: 'a

warning: the following explicit lifetimes could be elided: 'a
   --> stylus-sdk/src/storage/mod.rs:518:6
    |
518 | impl<'a, H: Host> StorageAddress<'a, H> {
    |      ^^                          ^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
    |
518 - impl<'a, H: Host> StorageAddress<'a, H> {
518 + impl<H: Host> StorageAddress<'_, H> {
    |

Check warning on line 492 in stylus-sdk/src/storage/mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

the following explicit lifetimes could be elided: 'a

warning: the following explicit lifetimes could be elided: 'a
   --> stylus-sdk/src/storage/mod.rs:492:6
    |
492 | impl<'a, H: Host> Deref for StorageBool<'a, H> {
    |      ^^                                 ^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
    |
492 - impl<'a, H: Host> Deref for StorageBool<'a, H> {
492 + impl<H: Host> Deref for StorageBool<'_, H> {
    |

Check warning on line 434 in stylus-sdk/src/storage/mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

the following explicit lifetimes could be elided: 'a

warning: the following explicit lifetimes could be elided: 'a
   --> stylus-sdk/src/storage/mod.rs:434:6
    |
434 | impl<'a, H: Host> StorageBool<'a, H> {
    |      ^^                       ^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
    |
434 - impl<'a, H: Host> StorageBool<'a, H> {
434 + impl<H: Host> StorageBool<'_, H> {
    |

Check warning on line 410 in stylus-sdk/src/storage/mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

the following explicit lifetimes could be elided: 'a

warning: the following explicit lifetimes could be elided: 'a
   --> stylus-sdk/src/storage/mod.rs:410:6
    |
410 | impl<'a, H: Host, const N: usize> Deref for StorageFixedBytes<'a, H, N> {
    |      ^^                                                       ^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
    |
410 - impl<'a, H: Host, const N: usize> Deref for StorageFixedBytes<'a, H, N> {
410 + impl<H: Host, const N: usize> Deref for StorageFixedBytes<'_, H, N> {
    |

Check warning on line 343 in stylus-sdk/src/storage/mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

the following explicit lifetimes could be elided: 'a

warning: the following explicit lifetimes could be elided: 'a
   --> stylus-sdk/src/storage/mod.rs:343:6
    |
343 | impl<'a, H: Host, const N: usize> StorageFixedBytes<'a, H, N> {
    |      ^^                                             ^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
    |
343 - impl<'a, H: Host, const N: usize> StorageFixedBytes<'a, H, N> {
343 + impl<H: Host, const N: usize> StorageFixedBytes<'_, H, N> {
    |

Check warning on line 313 in stylus-sdk/src/storage/mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

the following explicit lifetimes could be elided: 'a

warning: the following explicit lifetimes could be elided: 'a
   --> stylus-sdk/src/storage/mod.rs:313:6
    |
313 | impl<'a, H: Host, const B: usize, const L: usize> Deref for StorageSigned<'a, H, B, L>
    |      ^^                                                                   ^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
    |
313 - impl<'a, H: Host, const B: usize, const L: usize> Deref for StorageSigned<'a, H, B, L>
313 + impl<H: Host, const B: usize, const L: usize> Deref for StorageSigned<'_, H, B, L>
    |

Check warning on line 242 in stylus-sdk/src/storage/mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

the following explicit lifetimes could be elided: 'a

warning: the following explicit lifetimes could be elided: 'a
   --> stylus-sdk/src/storage/mod.rs:242:6
    |
242 | impl<'a, H: Host, const B: usize, const L: usize> StorageSigned<'a, H, B, L>
    |      ^^                                                         ^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
    |
242 - impl<'a, H: Host, const B: usize, const L: usize> StorageSigned<'a, H, B, L>
242 + impl<H: Host, const B: usize, const L: usize> StorageSigned<'_, H, B, L>
    |

Check warning on line 205 in stylus-sdk/src/storage/mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

the following explicit lifetimes could be elided: 'a

warning: the following explicit lifetimes could be elided: 'a
   --> stylus-sdk/src/storage/mod.rs:205:6
    |
205 | impl<'a, const B: usize, const L: usize, H: Host> Deref for StorageUint<'a, B, L, H>
    |      ^^                                                                 ^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
    |
205 - impl<'a, const B: usize, const L: usize, H: Host> Deref for StorageUint<'a, B, L, H>
205 + impl<const B: usize, const L: usize, H: Host> Deref for StorageUint<'_, B, L, H>
    |

Check warning on line 134 in stylus-sdk/src/storage/mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

this lifetime isn't used in the impl

warning: this lifetime isn't used in the impl
   --> stylus-sdk/src/storage/mod.rs:134:6
    |
134 | impl<'a, const B: usize, const L: usize, H: Host> StorageUint<'_, B, L, H>
    |      ^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_lifetimes
    = note: `#[warn(clippy::extra_unused_lifetimes)]` on by default

Check warning on line 334 in stylus-sdk/src/storage/bytes.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

the following explicit lifetimes could be elided: 'a

warning: the following explicit lifetimes could be elided: 'a
   --> stylus-sdk/src/storage/bytes.rs:334:6
    |
334 | impl<'a, H: Host> Extend<char> for StorageString<'a, H> {
    |      ^^                                          ^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
    |
334 - impl<'a, H: Host> Extend<char> for StorageString<'a, H> {
334 + impl<H: Host> Extend<char> for StorageString<'_, H> {
    |

Check warning on line 295 in stylus-sdk/src/storage/bytes.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

the following explicit lifetimes could be elided: 'a

warning: the following explicit lifetimes could be elided: 'a
   --> stylus-sdk/src/storage/bytes.rs:295:6
    |
295 | impl<'a, H: Host> StorageString<'a, H> {
    |      ^^                         ^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
    |
295 - impl<'a, H: Host> StorageString<'a, H> {
295 + impl<H: Host> StorageString<'_, H> {
    |

Check warning on line 261 in stylus-sdk/src/storage/bytes.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

the following explicit lifetimes could be elided: 'b

warning: the following explicit lifetimes could be elided: 'b
   --> stylus-sdk/src/storage/bytes.rs:261:10
    |
261 | impl<'a, 'b, H: Host> Extend<&'a u8> for StorageBytes<'b, H> {
    |          ^^                                           ^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
    |
261 - impl<'a, 'b, H: Host> Extend<&'a u8> for StorageBytes<'b, H> {
261 + impl<'a, H: Host> Extend<&'a u8> for StorageBytes<'_, H> {
    |

Check warning on line 253 in stylus-sdk/src/storage/bytes.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

the following explicit lifetimes could be elided: 'a

warning: the following explicit lifetimes could be elided: 'a
   --> stylus-sdk/src/storage/bytes.rs:253:6
    |
253 | impl<'a, H: Host> Extend<u8> for StorageBytes<'a, H> {
    |      ^^                                       ^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
    |
253 - impl<'a, H: Host> Extend<u8> for StorageBytes<'a, H> {
253 + impl<H: Host> Extend<u8> for StorageBytes<'_, H> {
    |

Check warning on line 48 in stylus-sdk/src/storage/bytes.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

the following explicit lifetimes could be elided: 'a

warning: the following explicit lifetimes could be elided: 'a
  --> stylus-sdk/src/storage/bytes.rs:48:6
   |
48 | impl<'a, H: Host> StorageBytes<'a, H> {
   |      ^^                        ^^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
   = note: `#[warn(clippy::needless_lifetimes)]` on by default
help: elide the lifetimes
   |
48 - impl<'a, H: Host> StorageBytes<'a, H> {
48 + impl<H: Host> StorageBytes<'_, H> {
   |

Check warning on line 106 in stylus-sdk/src/abi/mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

this expression creates a reference which is immediately dereferenced by the compiler

warning: this expression creates a reference which is immediately dereferenced by the compiler
   --> stylus-sdk/src/abi/mod.rs:106:54
    |
106 |     let mut storage = unsafe { S::new(U256::ZERO, 0, &host) };
    |                                                      ^^^^^ help: change this to: `host`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
    = note: `#[warn(clippy::needless_borrow)]` on by default