Run cargo fmt on the whole code base (#9394)

* Run cargo fmt on the whole code base

* Second run

* Add CI check

* Fix compilation

* More unnecessary braces

* Handle weights

* Use --all

* Use correct attributes...

* Fix UI tests

* AHHHHHHHHH

* 🤦

* Docs

* Fix compilation

* 🤷

* Please stop

* 🤦 x 2

* More

* make rustfmt.toml consistent with polkadot

Co-authored-by: André Silva <andrerfosilva@gmail.com>
This commit is contained in:
Bastian Köcher
2021-07-21 16:32:32 +02:00
committed by GitHub
parent d451c38c1c
commit 7b56ab15b4
1010 changed files with 53339 additions and 51208 deletions
+14 -18
View File
@@ -15,22 +15,23 @@
// See the License for the specific language governing permissions and
// limitations under the License.
use frame_support::sp_runtime::generic;
use frame_support::sp_runtime::traits::{BlakeTwo256, Verify};
use frame_support::codec::{Encode, Decode};
use sp_core::{H256, sr25519};
use serde::{Serialize, Deserialize};
use frame_support::{
codec::{Decode, Encode},
sp_runtime::{
generic,
traits::{BlakeTwo256, Verify},
},
};
use serde::{Deserialize, Serialize};
use sp_core::{sr25519, H256};
mod system;
mod module {
use super::*;
pub type Request<T> = (
<T as system::Config>::AccountId,
Role,
<T as system::Config>::BlockNumber,
);
pub type Request<T> =
(<T as system::Config>::AccountId, Role, <T as system::Config>::BlockNumber);
pub type Requests<T> = Vec<Request<T>>;
#[derive(Encode, Decode, Copy, Clone, Eq, PartialEq, Debug)]
@@ -89,14 +90,12 @@ mod module {
#[derive(Encode, Decode, Copy, Clone, Serialize, Deserialize)]
pub struct Data<T: Config> {
pub data: T::BlockNumber,
pub data: T::BlockNumber,
}
impl<T: Config> Default for Data<T> {
fn default() -> Self {
Self {
data: T::BlockNumber::default(),
}
Self { data: T::BlockNumber::default() }
}
}
@@ -185,9 +184,6 @@ frame_support::construct_runtime!(
#[test]
fn create_genesis_config() {
GenesisConfig {
module: module::GenesisConfig {
request_life_time: 0,
enable_storage_role: true,
}
module: module::GenesisConfig { request_life_time: 0, enable_storage_role: true },
};
}