-
Notifications
You must be signed in to change notification settings - Fork 246
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update Rust version #2576
Update Rust version #2576
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make sense overall.
Seems like there are unintentional white space additions and removals.
Also feels like its going to be chore to extern alloc and put it under a feature over sp_std since that just worked out of the box but I guess I'm being lazy here though
@@ -596,7 +598,7 @@ pub mod pallet { | |||
|
|||
/// Enable storage access for all users. | |||
#[pallet::call_index(5)] | |||
#[pallet::weight(<T as Config>::WeightInfo::enable_authoring_by_anyone())] | |||
#[pallet::weight(< T as Config >::WeightInfo::enable_authoring_by_anyone())] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
are whitespaces in this file expected or unintentional ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is what rustfmt
does for me. Surely not intentional and I'm not happy with what it does actually. Does it not format the same way for you?
@@ -242,10 +246,10 @@ pub enum VerificationError<DomainHash> { | |||
InitializeBlockOrApplyExtrinsicDecode(codec::Error), | |||
/// Failed to decode the storage root produced by verifying `initialize_block` or `apply_extrinsic`. | |||
#[cfg_attr( | |||
feature = "thiserror", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have the same issue with this missing white space when rust format removes them. I dont have a storng opinion either wway but having spaces is pleasing to look at though
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree, let me know if you find the way to make rustfmt
not do this anymore, very annoying
// #[derive(Debug, Clone, Copy)] | ||
// pub(crate) struct GeneralConnectedPeersInstance; | ||
// #[derive(Debug, Clone, Copy)] | ||
// pub(crate) struct SpecialConnectedPeersInstance; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove them instead ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is because there was other code commented-out below and this one was forgotten. I suggested @shamil-gadelshin to remove it from the beginning IIRC.
@@ -341,6 +341,7 @@ impl KnownPeersManager { | |||
.read(true) | |||
.write(true) | |||
.create(true) | |||
.truncate(false) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
was this not a default before or are we being explicit here ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Being explicit due to new lint: https://rust-lang.github.io/rust-clippy/master/index.html#/suspicious_open_options
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No concerns regarding the whitespace. Just curious is all
This updates Rust version and fixes a bunch of related lints (latest nightly REALLY doesn't like when the same type is imported more than once even indirectly).
This also fixes #2575 by simply commenting-out already ignored test
block_building_storage_proof_does_not_include_runtime_by_default
.Latest nightly also changed some features that required bumping versions of a few crated and removing
--locked
fromcargo-nextest
because its latest release still relies on non-fixed versions of dependencies and the only way to get newer compatible ones is to ignore lock file for now.In some places where the same type was imported more than once due to
sp-std
I have replacedsp-std
withalloc
completely. But there are still places wheresp-std
is used and I didn't want to do bigger refactoring/cleanup.The changes in this PR are simple and mechanical, no logic changes anywhere.
Code contributor checklist: