mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-27 19:47:59 +00:00
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:
@@ -18,9 +18,9 @@
|
||||
//! Implementation of the `generate-node-key` subcommand
|
||||
|
||||
use crate::Error;
|
||||
use structopt::StructOpt;
|
||||
use std::{path::PathBuf, fs};
|
||||
use libp2p::identity::{ed25519 as libp2p_ed25519, PublicKey};
|
||||
use std::{fs, path::PathBuf};
|
||||
use structopt::StructOpt;
|
||||
|
||||
/// The `generate-node-key` command
|
||||
#[derive(Debug, StructOpt)]
|
||||
@@ -59,15 +59,14 @@ impl GenerateNodeKeyCmd {
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
use tempfile::Builder;
|
||||
use std::io::Read;
|
||||
use tempfile::Builder;
|
||||
|
||||
#[test]
|
||||
fn generate_node_key() {
|
||||
let mut file = Builder::new().prefix("keyfile").tempfile().unwrap();
|
||||
let file_path = file.path().display().to_string();
|
||||
let generate =
|
||||
GenerateNodeKeyCmd::from_iter(&["generate-node-key", "--file", &file_path]);
|
||||
let generate = GenerateNodeKeyCmd::from_iter(&["generate-node-key", "--file", &file_path]);
|
||||
assert!(generate.run().is_ok());
|
||||
let mut buf = String::new();
|
||||
assert!(file.read_to_string(&mut buf).is_ok());
|
||||
|
||||
Reference in New Issue
Block a user