mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-13 22:11:06 +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:
@@ -19,9 +19,9 @@
|
||||
//! Keystore (and session key management) for ed25519 based chains like Polkadot.
|
||||
|
||||
#![warn(missing_docs)]
|
||||
use std::io;
|
||||
use sp_core::crypto::KeyTypeId;
|
||||
use sp_keystore::Error as TraitError;
|
||||
use std::io;
|
||||
|
||||
/// Local keystore implementation
|
||||
mod local;
|
||||
@@ -35,19 +35,19 @@ pub enum Error {
|
||||
/// JSON error.
|
||||
Json(serde_json::Error),
|
||||
/// Invalid password.
|
||||
#[display(fmt="Invalid password")]
|
||||
#[display(fmt = "Invalid password")]
|
||||
InvalidPassword,
|
||||
/// Invalid BIP39 phrase
|
||||
#[display(fmt="Invalid recovery phrase (BIP39) data")]
|
||||
#[display(fmt = "Invalid recovery phrase (BIP39) data")]
|
||||
InvalidPhrase,
|
||||
/// Invalid seed
|
||||
#[display(fmt="Invalid seed")]
|
||||
#[display(fmt = "Invalid seed")]
|
||||
InvalidSeed,
|
||||
/// Public key type is not supported
|
||||
#[display(fmt="Key crypto type is not supported")]
|
||||
#[display(fmt = "Key crypto type is not supported")]
|
||||
KeyNotSupported(KeyTypeId),
|
||||
/// Keystore unavailable
|
||||
#[display(fmt="Keystore unavailable")]
|
||||
#[display(fmt = "Keystore unavailable")]
|
||||
Unavailable,
|
||||
}
|
||||
|
||||
@@ -58,9 +58,8 @@ impl From<Error> for TraitError {
|
||||
fn from(error: Error) -> Self {
|
||||
match error {
|
||||
Error::KeyNotSupported(id) => TraitError::KeyNotSupported(id),
|
||||
Error::InvalidSeed | Error::InvalidPhrase | Error::InvalidPassword => {
|
||||
TraitError::ValidationError(error.to_string())
|
||||
},
|
||||
Error::InvalidSeed | Error::InvalidPhrase | Error::InvalidPassword =>
|
||||
TraitError::ValidationError(error.to_string()),
|
||||
Error::Unavailable => TraitError::Unavailable,
|
||||
Error::Io(e) => TraitError::Other(e.to_string()),
|
||||
Error::Json(e) => TraitError::Other(e.to_string()),
|
||||
@@ -77,4 +76,3 @@ impl std::error::Error for Error {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user