Skip to content

Commit

Permalink
🩹 Upgrade Rust and cleanup (#417)
Browse files Browse the repository at this point in the history
## What?

Upgrade to Rust 1.81.0 (matching paritytech/srtool@c59ee05), fix the various new (and old) compiler/clippy warnings and remove unused dependencies from the various internal crates.

## Anything Else?

A `cargo clean` is recommended.
  • Loading branch information
lrazovic authored Oct 14, 2024
2 parents 575002d + 9245097 commit 1dccca3
Show file tree
Hide file tree
Showing 33 changed files with 131 additions and 247 deletions.
79 changes: 22 additions & 57 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

28 changes: 12 additions & 16 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,22 +13,19 @@ resolver = "2"

[workspace.lints.clippy]
all = { level = "warn", priority = -1}
#all = { level = "allow", priority = -1}
#pedantic = { level = "warn", priority = -1}
#pedantic = { level = "allow", priority = -1}

inconsistent_digit_grouping = "allow"
zero_prefixed_literal = "allow"
missing_errors_doc = "allow"
must_use_candidate = "allow"
identity_op = "allow"
tabs_in_doc_comments= "allow"

[workspace.lints.rust]
unreachable_patterns = "deny"

[workspace.package]
authors = ['Polimec Foundation <info@polimec.org>']
documentation = "https://wiki.polimec.org/"
documentation = "https://hub.polimec.org/"
edition = "2021"
homepage = "https://www.polimec.org/"
license-file = "LICENSE"
Expand Down Expand Up @@ -89,23 +86,23 @@ substrate-fixed = { git = "https://github.com/encointer/substrate-fixed", defaul
# External (without extra features and with default disabled if necessary)
parity-scale-codec = { version = "3.6.12", default-features = false }
clap = { version = "4.5.3" }
futures = { version = "0.3.28" }
scale-info = { version = "2.11.1", default-features = false, features = [
futures = { version = "0.3.31" }
scale-info = { version = "2.11.3", default-features = false, features = [
"derive",
] }
jsonrpsee = { version = "0.22", features = ["server"] }
jsonrpsee = { version = "0.22.5", features = ["server"] }
hex-literal = "0.4.1"
serde = { version = "1.0.197", default-features = false }
serde_json = "1.0.114"
smallvec = "1.11.0"
log = { version = "0.4.17", default-features = false }
serde = { version = "1.0.204", default-features = false }
serde_json = "1.0.120"
smallvec = "1.13.2"
log = { version = "0.4.22", default-features = false }
itertools = { version = "0.11", default-features = false, features = [
"use_alloc",
] }
array-bytes = { version = "6.2.2", default-features = false }
array-bytes = { version = "6.2.3", default-features = false }
serde-json-core = { version = '0.5.1', default-features = false }
heapless = { version = "0.7", default-features = false }
color-print = "0.3.5"
heapless = { version = "0.8", default-features = false }
color-print = "0.3.6"

# Emulations
xcm-emulator = { version = "0.12.0", default-features = false }
Expand Down Expand Up @@ -203,7 +200,6 @@ parachain-info = { version = "0.14.0", package = 'staging-parachain-info', defau
parachains-common = { version = "14.0.0", default-features = false }
cumulus-primitives-aura = { version = "0.14.0", default-features = false }


# Client-only (with default enabled)
cumulus-client-cli = { version = "0.14.0" }
cumulus-client-collator = { version = "0.14.0" }
Expand Down
Empty file removed clippy.toml
Empty file.
8 changes: 4 additions & 4 deletions integration-tests/src/constants.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ pub struct Prices {
}

// PricesBuilder for optional fields before building Prices
#[derive(Clone, Copy)]
#[derive(Clone, Copy, Default)]
pub struct PricesBuilder {
dot: Option<FixedU128>,
usdc: Option<FixedU128>,
Expand Down Expand Up @@ -463,17 +463,17 @@ pub mod polimec {
];

frame_support::assert_ok!(orml_oracle::Pallet::<PolimecRuntime>::feed_values(
PolimecOrigin::signed(alice.clone().into()),
PolimecOrigin::signed(alice.into()),
values.clone()
));

frame_support::assert_ok!(orml_oracle::Pallet::<PolimecRuntime>::feed_values(
PolimecOrigin::signed(bob.clone().into()),
PolimecOrigin::signed(bob.into()),
values.clone()
));

frame_support::assert_ok!(orml_oracle::Pallet::<PolimecRuntime>::feed_values(
PolimecOrigin::signed(charlie.clone().into()),
PolimecOrigin::signed(charlie.into()),
values.clone()
));
});
Expand Down
1 change: 0 additions & 1 deletion integration-tests/src/tests/credentials.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
use crate::*;
use frame_support::{assert_ok, dispatch::GetDispatchInfo, traits::tokens::currency::VestingSchedule};
use macros::generate_accounts;
use pallet_funding::ParticipationMode::{Classic, OTM};
use polimec_common::credentials::{Did, InvestorType};
use polimec_common_test_utils::{get_fake_jwt, get_mock_jwt_with_cid, get_test_jwt};
use polimec_runtime::PLMC;
Expand Down
6 changes: 5 additions & 1 deletion integration-tests/src/tests/e2e.rs
Original file line number Diff line number Diff line change
Expand Up @@ -792,7 +792,11 @@ fn e2e_test() {
assert_eq!(inst.get_project_details(project_id).status, ProjectStatus::CTMigrationStarted);

for user in UserMigrations::<PolimecRuntime>::iter_key_prefix((project_id,)).collect_vec() {
PolimecFunding::confirm_offchain_migration(PolimecOrigin::signed(issuer.clone()), project_id, user);
assert_ok!(PolimecFunding::confirm_offchain_migration(
PolimecOrigin::signed(issuer.clone()),
project_id,
user
));
}
PolimecFunding::mark_project_ct_migration_as_finished(PolimecOrigin::signed(issuer.clone()), project_id)
.unwrap();
Expand Down
Loading

0 comments on commit 1dccca3

Please sign in to comment.