shawntabrizi / substrate-collectables-workshop

A guided tutorial for building an NFT marketplace with the Polkadot SDK
https://www.shawntabrizi.com/substrate-collectables-workshop/
MIT License
230 stars 98 forks source link

Warning from running nightly clippy on default repo #179

Open Yung-Beef opened 1 week ago

Yung-Beef commented 1 week ago

Per the 1.1 setup page there should be no warnings or errors from running cargo +nightly clippy however I am getting:

warning: unreachable pattern
  --> src/lib.rs:29:12
   |
29 |     #[pallet::call]
   |               ^^^^ matches no values because `polkadot_sdk_frame::deps::frame_support::Never` is uninhabited
   |
   = note: to learn more about uninhabited types, see https://doc.rust-lang.org/nomicon/exotic-sizes.html#empty-types
   = note: `#[warn(unreachable_patterns)]` on by default

warning: `pallet-kitties` (lib) generated 1 warning
shawntabrizi commented 1 week ago

interesting... will look

shawntabrizi commented 1 week ago

Everything passes for me:

Output from my "check" script ```sh substrate-collectables-workshop git:(master) ./check.sh Skipping directory (no Cargo.toml found): steps/0/ Entering directory: steps/1/ Checking cargo fmt Checking cargo clippy Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.25s Checking cargo test Finished `test` profile [unoptimized + debuginfo] target(s) in 0.20s Running unittests src/lib.rs (target/debug/deps/pallet_kitties-cbea56a5091ea01d) running 0 tests test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s Doc-tests pallet_kitties running 0 tests test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s Entering directory: steps/2/ Checking cargo fmt Checking cargo clippy Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.17s Checking cargo test Finished `test` profile [unoptimized + debuginfo] target(s) in 0.19s Running unittests src/lib.rs (target/debug/deps/pallet_kitties-cbea56a5091ea01d) running 0 tests test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s Doc-tests pallet_kitties running 0 tests test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s Entering directory: steps/3/ Checking cargo fmt Checking cargo clippy Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.18s Checking cargo test Finished `test` profile [unoptimized + debuginfo] target(s) in 0.19s Running unittests src/lib.rs (target/debug/deps/pallet_kitties-cbea56a5091ea01d) running 0 tests test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s Doc-tests pallet_kitties running 0 tests test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s Entering directory: steps/4/ Checking cargo fmt Checking cargo clippy Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.18s Checking cargo test Finished `test` profile [unoptimized + debuginfo] target(s) in 0.19s Running unittests src/lib.rs (target/debug/deps/pallet_kitties-cbea56a5091ea01d) running 0 tests test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s Doc-tests pallet_kitties ```

Let's share versions?

➜  substrate-collectables-workshop git:(master) cargo +nightly clippy --version
clippy 0.1.82 (176e5452 2024-08-04)
➜  substrate-collectables-workshop git:(master) cargo clippy --version 
clippy 0.1.80 (05147895 2024-07-21)
Yung-Beef commented 1 week ago

No idea about a check script but here's what I get for those 2 commands

➜  substrate-collectables-workshop git:(master) cargo +nightly clippy --version
clippy 0.1.82 (8d6b88b 2024-09-11)
➜  substrate-collectables-workshop git:(master) cargo clippy --version 
clippy 0.1.81 (eeb90cd 2024-09-04)
Yung-Beef commented 1 week ago

I'm running it after git clone https://github.com/shawntabrizi/substrate-collectables-workshop/ -b starting-template --single-branch per the setup page, so I don't have the script or the steps folder.

shawntabrizi commented 1 week ago

@Yung-Beef okay i can reproduce. let me see what i can do, the error is coming from Polkadot SDK unfortunately

shawntabrizi commented 1 week ago

For now, please feel free to move on. I will try to get it fixed:

https://github.com/paritytech/polkadot-sdk/issues/5697

Thanks for the report.