From 249fe03d5cc309619fa55656c7817680bc59634e Mon Sep 17 00:00:00 2001 From: eupn <36292692+eupn@users.noreply.github.com> Date: Sat, 25 May 2019 23:13:36 +0700 Subject: [PATCH] Remove needless lifetimes (#2845) * Remove lifetimes that could be elided * rustfmt --- api/src/client.rs | 4 ++-- chain/src/txhashset/txhashset.rs | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/api/src/client.rs b/api/src/client.rs index 44a1a9c2a8..60fd1e35bb 100644 --- a/api/src/client.rs +++ b/api/src/client.rs @@ -125,8 +125,8 @@ where } } -fn build_request<'a>( - url: &'a str, +fn build_request( + url: &str, method: &str, api_secret: Option, body: Option, diff --git a/chain/src/txhashset/txhashset.rs b/chain/src/txhashset/txhashset.rs index 793a8e2706..23870f6c10 100644 --- a/chain/src/txhashset/txhashset.rs +++ b/chain/src/txhashset/txhashset.rs @@ -329,7 +329,7 @@ impl TxHashSet { /// of blocks to the txhashset and the checking of the current tree roots. /// /// The unit of work is always discarded (always rollback) as this is read-only. -pub fn extending_readonly<'a, F, T>(trees: &'a mut TxHashSet, inner: F) -> Result +pub fn extending_readonly(trees: &mut TxHashSet, inner: F) -> Result where F: FnOnce(&mut Extension<'_>) -> Result, { @@ -366,7 +366,7 @@ where /// Readonly view on the UTXO set. /// Based on the current txhashset output_pmmr. -pub fn utxo_view<'a, F, T>(trees: &'a TxHashSet, inner: F) -> Result +pub fn utxo_view(trees: &TxHashSet, inner: F) -> Result where F: FnOnce(&UTXOView<'_>) -> Result, { @@ -391,7 +391,7 @@ where /// via last_pos. /// We create a new db batch for this view and discard it (rollback) /// when we are done with the view. -pub fn rewindable_kernel_view<'a, F, T>(trees: &'a TxHashSet, inner: F) -> Result +pub fn rewindable_kernel_view(trees: &TxHashSet, inner: F) -> Result where F: FnOnce(&mut RewindableKernelView<'_>) -> Result, {