mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-31 01:41:03 +00:00
Fix clippy suggestions. (#179)
* Fix clippy errors. * Cargo fmt. * Enable clippy checks. * Create if does not exist. * Fix warnings and enable sccache for clippy. * chmod +x * Revert and ignore errors. * Update cancel-workflow-action. * Fixes. * Clippy fixes. * Fix compilation. * Fix new clippy warnings. * fmt --all * Fix the rest. * fmt --all * Conditional. * Bump smallvec. * Use separate cache dir for clippy to prevent races. * Remove unused imports in tests * Remove "useless conversion" * Move clippy to main worfklow to avoid clashes. * Fix clippy error. * Fix remaning clippy errors. * cargo fmt --all Co-authored-by: Hernando Castano <castano.ha@gmail.com>
This commit is contained in:
committed by
Bastian Köcher
parent
65852944e3
commit
bdf6901ce2
@@ -70,6 +70,9 @@ pub fn import_headers<S: Storage, PS: PruningStrategy>(
|
||||
Ok((useful, useless))
|
||||
}
|
||||
|
||||
/// A vector of finalized headers and their submitters.
|
||||
pub type FinalizedHeaders<S> = Vec<(HeaderId, Option<<S as Storage>::Submitter>)>;
|
||||
|
||||
/// Imports given header and updates blocks finality (if required).
|
||||
///
|
||||
/// Transactions receipts must be provided if `header_import_requires_receipts()`
|
||||
@@ -84,7 +87,7 @@ pub fn import_header<S: Storage, PS: PruningStrategy>(
|
||||
submitter: Option<S::Submitter>,
|
||||
header: Header,
|
||||
receipts: Option<Vec<Receipt>>,
|
||||
) -> Result<(HeaderId, Vec<(HeaderId, Option<S::Submitter>)>), Error> {
|
||||
) -> Result<(HeaderId, FinalizedHeaders<S>), Error> {
|
||||
// first check that we are able to import this header at all
|
||||
let (header_id, finalized_id) = is_importable_header(storage, &header)?;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user