mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-29 13:48:00 +00:00
Remove redundant calls to borrow() (#1393)
Co-authored-by: Keith Yeung <kungfukeith11@gmail.com> Co-authored-by: Francisco Aguirre <franciscoaguirreperez@gmail.com>
This commit is contained in:
@@ -49,7 +49,6 @@ pub trait UsageProvider<Block: sp_runtime::traits::Block> {
|
||||
pub mod utils {
|
||||
use sp_blockchain::{Error, HeaderBackend, HeaderMetadata};
|
||||
use sp_runtime::traits::Block as BlockT;
|
||||
use std::borrow::Borrow;
|
||||
|
||||
/// Returns a function for checking block ancestry, the returned function will
|
||||
/// return `true` if the given hash (second parameter) is a descendent of the
|
||||
@@ -69,10 +68,8 @@ pub mod utils {
|
||||
return Ok(false)
|
||||
}
|
||||
|
||||
let current = current.as_ref().map(|(c, p)| (c.borrow(), p.borrow()));
|
||||
|
||||
let mut hash = hash;
|
||||
if let Some((current_hash, current_parent_hash)) = current {
|
||||
if let Some((current_hash, current_parent_hash)) = ¤t {
|
||||
if base == current_hash {
|
||||
return Ok(false)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user