Skip to content

Commit

Permalink
Go back to Rust 1.81 and solve clippy warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
tsenovilla committed Jan 31, 2025
1 parent a9d9eae commit 1188ad1
Show file tree
Hide file tree
Showing 8 changed files with 32 additions and 1 deletion.
5 changes: 5 additions & 0 deletions pallets/asset-metadata-extender/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@
// along with LAOS. If not, see <http://www.gnu.org/licenses/>.

#![cfg_attr(not(feature = "std"), no_std)]
// TODO: This line is needed cause from frontier2409 and rust 1.81 onwards, manual inspect clippy
// flag is giving a false positive in all our pallets. From this issue: https://github.com/rust-lang/rust-clippy/issues/13185
// it seems that the flag --manual-inspect may not be 100% ready yet, as it's giving problems to
// different codes. Maybe we can remove this attribute in the future
#![allow(clippy::manual_inspect)]

mod benchmarking;
pub mod precompiles;
Expand Down
5 changes: 5 additions & 0 deletions pallets/laos-evolution/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@
// along with LAOS. If not, see <http://www.gnu.org/licenses/>.

#![cfg_attr(not(feature = "std"), no_std)]
// TODO: This line is needed cause from frontier2409 and rust 1.81 onwards, manual inspect clippy
// flag is giving a false positive in all our pallets. From this issue: https://github.com/rust-lang/rust-clippy/issues/13185
// it seems that the flag --manual-inspect may not be 100% ready yet, as it's giving problems to
// different codes. Maybe we can remove this attribute in the future
#![allow(clippy::manual_inspect)]

use frame_support::ensure;
pub use pallet::*;
Expand Down
5 changes: 5 additions & 0 deletions pallets/parachain-staking/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,11 @@
//! To leave the set of delegators and revoke all delegations, call `leave_delegators`.
#![cfg_attr(not(feature = "std"), no_std)]
// TODO: This line is needed cause from frontier2409 and rust 1.81 onwards, manual inspect clippy
// flag is giving a false positive in all our pallets. From this issue: https://github.com/rust-lang/rust-clippy/issues/13185
// it seems that the flag --manual-inspect may not be 100% ready yet, as it's giving problems to
// different codes. Maybe we can remove this attribute in the future
#![allow(clippy::manual_inspect)]

mod auto_compound;
mod delegation_requests;
Expand Down
6 changes: 6 additions & 0 deletions pallets/precompiles-benchmark/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@
// along with LAOS. If not, see <http://www.gnu.org/licenses/>.

#![cfg_attr(not(feature = "std"), no_std)]
// TODO: This line is needed cause from frontier2409 and rust 1.81 onwards, manual inspect clippy
// flag is giving a false positive in all our pallets. From this issue: https://github.com/rust-lang/rust-clippy/issues/13185
// it seems that the flag --manual-inspect may not be 100% ready yet, as it's giving problems to
// different codes. Maybe we can remove this attribute in the future
#![allow(clippy::manual_inspect)]

use sp_core::H160;
use sp_runtime::traits::{Convert, ConvertBack};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,9 @@ type BalanceOf<Runtime> = <<Runtime as pallet_vesting::Config>::Currency as Curr
<Runtime as frame_system::Config>::AccountId,
>>::Balance;

// TODO: We'll open a PR to parity to include this annotation in the macro expansion, as it's
// effectively creating multiple bounds locations
#[allow(clippy::multiple_bound_locations)]
#[benchmarks(
where
T: Config + pallet_vesting::Config,
Expand Down
5 changes: 5 additions & 0 deletions pallets/treasury-funding/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@
//! - `fund_treasury`: Vest all funds of the vault account and transfer them to the treasury.
#![cfg_attr(not(feature = "std"), no_std)]
// TODO: This line is needed cause from frontier2409 and rust 1.81 onwards, manual inspect clippy
// flag is giving a false positive in all our pallets. From this issue: https://github.com/rust-lang/rust-clippy/issues/13185
// it seems that the flag --manual-inspect may not be 100% ready yet, as it's giving problems to
// different codes. Maybe we can remove this attribute in the future
#![allow(clippy::manual_inspect)]

pub use pallet::*;

Expand Down
2 changes: 1 addition & 1 deletion rust-toolchain
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[toolchain]
channel = "1.79"
channel = "1.81"
components = [ "rustfmt", "clippy", "rust-src" ]
targets = [ "wasm32-unknown-unknown" ]
profile = "minimal"
2 changes: 2 additions & 0 deletions xcm-simulator/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
// You should have received a copy of the GNU General Public License
// along with Polkadot. If not, see <http://www.gnu.org/licenses/>.

#![allow(clippy::manual_inspect)]

mod asset_hub;
mod laosish;
mod parachain;
Expand Down

0 comments on commit 1188ad1

Please sign in to comment.