Skip to content

Commit

Permalink
Remove needless lifetimes (#2845)
Browse files Browse the repository at this point in the history
* Remove lifetimes that could be elided

* rustfmt
  • Loading branch information
eupn authored and antiochp committed May 25, 2019
1 parent f17dd5f commit 249fe03
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions api/src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,8 @@ where
}
}

fn build_request<'a>(
url: &'a str,
fn build_request(
url: &str,
method: &str,
api_secret: Option<String>,
body: Option<String>,
Expand Down
6 changes: 3 additions & 3 deletions chain/src/txhashset/txhashset.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<T, Error>
pub fn extending_readonly<F, T>(trees: &mut TxHashSet, inner: F) -> Result<T, Error>
where
F: FnOnce(&mut Extension<'_>) -> Result<T, Error>,
{
Expand Down Expand Up @@ -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<T, Error>
pub fn utxo_view<F, T>(trees: &TxHashSet, inner: F) -> Result<T, Error>
where
F: FnOnce(&UTXOView<'_>) -> Result<T, Error>,
{
Expand All @@ -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<T, Error>
pub fn rewindable_kernel_view<F, T>(trees: &TxHashSet, inner: F) -> Result<T, Error>
where
F: FnOnce(&mut RewindableKernelView<'_>) -> Result<T, Error>,
{
Expand Down

0 comments on commit 249fe03

Please sign in to comment.