Improve code formatting
This commit is contained in:
parent
483b31abd2
commit
b304ddc059
7 changed files with 38 additions and 19 deletions
11
.rustfmt.toml
Normal file
11
.rustfmt.toml
Normal file
|
@ -0,0 +1,11 @@
|
|||
reorder_imports = true
|
||||
reorder_modules = true
|
||||
|
||||
# Automatically fix deprecated style.
|
||||
use_field_init_shorthand = true
|
||||
use_try_shorthand = true
|
||||
|
||||
# unstable features
|
||||
group_imports = "StdExternalCrate"
|
||||
imports_granularity = "Crate"
|
||||
format_code_in_doc_comments = true
|
|
@ -1,10 +1,11 @@
|
|||
use alloc::borrow::Cow;
|
||||
use alloc::vec::Vec;
|
||||
use alloc::{borrow::Cow, vec::Vec};
|
||||
|
||||
use ics23::CommitmentProof;
|
||||
|
||||
use crate::error::ProofError;
|
||||
use crate::verifier::{ics23::Ics23MembershipVerifier, multi::MultiVerifier, Verifier};
|
||||
use crate::{
|
||||
error::ProofError,
|
||||
verifier::{ics23::Ics23MembershipVerifier, multi::MultiVerifier, Verifier},
|
||||
};
|
||||
|
||||
type Key = Vec<u8>;
|
||||
type Value<'a> = Cow<'a, [u8]>;
|
||||
|
|
|
@ -6,8 +6,7 @@ use ics23::{
|
|||
ProofSpec,
|
||||
};
|
||||
|
||||
use crate::error::ProofError;
|
||||
use crate::verifier::Verifier;
|
||||
use crate::{error::ProofError, verifier::Verifier};
|
||||
|
||||
#[derive(Clone, Debug)]
|
||||
pub struct Ics23MembershipVerifier<K, V> {
|
||||
|
|
|
@ -24,8 +24,11 @@ use std::{
|
|||
|
||||
use clap::{Parser, Subcommand};
|
||||
use cosmrs::AccountId;
|
||||
use cw_proof::proof::cw::RawCwProof;
|
||||
use cw_proof::proof::{cw::CwProof, key::CwAbciKey, Proof};
|
||||
use cw_proof::proof::{
|
||||
cw::{CwProof, RawCwProof},
|
||||
key::CwAbciKey,
|
||||
Proof,
|
||||
};
|
||||
use tendermint::{block::Height, AppHash};
|
||||
use tendermint_rpc::{
|
||||
client::HttpClient as TmRpcClient, endpoint::status::Response, Client, HttpClientUrl,
|
||||
|
@ -131,7 +134,7 @@ fn write_proof_to_file(proof_file: PathBuf, proof: RawCwProof) -> Result<(), Box
|
|||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use cw_proof::{proof::cw::RawCwProof, proof::Proof};
|
||||
use cw_proof::proof::{cw::RawCwProof, Proof};
|
||||
use tendermint_rpc::endpoint::abci_query::AbciQuery;
|
||||
|
||||
#[test]
|
||||
|
|
|
@ -21,9 +21,14 @@ use color_eyre::{
|
|||
Report,
|
||||
};
|
||||
use cosmrs::AccountId;
|
||||
use cw_proof::error::ProofError;
|
||||
use cw_proof::proof::cw::RawCwProof;
|
||||
use cw_proof::proof::{cw::CwProof, key::CwAbciKey, Proof};
|
||||
use cw_proof::{
|
||||
error::ProofError,
|
||||
proof::{
|
||||
cw::{CwProof, RawCwProof},
|
||||
key::CwAbciKey,
|
||||
Proof,
|
||||
},
|
||||
};
|
||||
use futures::future::join_all;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use tendermint::{crypto::default::Sha256, evidence::Evidence};
|
||||
|
|
|
@ -20,5 +20,4 @@ mod null_io;
|
|||
mod provider;
|
||||
|
||||
pub use error::Error;
|
||||
pub use provider::make_provider;
|
||||
pub use provider::StatelessProvider;
|
||||
pub use provider::{make_provider, StatelessProvider};
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
use alloc::boxed::Box;
|
||||
use alloc::string::{String, ToString};
|
||||
use alloc::vec::Vec;
|
||||
use alloc::{
|
||||
boxed::Box,
|
||||
string::{String, ToString},
|
||||
vec::Vec,
|
||||
};
|
||||
|
||||
use tendermint::Hash;
|
||||
use tendermint_light_client::{
|
||||
|
@ -14,8 +16,7 @@ use tendermint_light_client::{
|
|||
verifier::ProdVerifier,
|
||||
};
|
||||
|
||||
use crate::error::Error;
|
||||
use crate::null_io::NullIo;
|
||||
use crate::{error::Error, null_io::NullIo};
|
||||
|
||||
/// A interface over a stateless light client instance.
|
||||
#[derive(Debug)]
|
||||
|
|
Loading…
Reference in a new issue