Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove needless lifetimes #2845

Merged
merged 2 commits into from
May 25, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
10 changes: 6 additions & 4 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 Expand Up @@ -949,7 +949,9 @@ impl<'a> Extension<'a> {
}

if output_pos != rproof_pos {
return Err(ErrorKind::Other(format!("output vs rproof MMRs different pos")).into());
return Err(
ErrorKind::Other(format!("output vs rproof MMRs different pos")).into(),
);
}
}

Expand Down