Skip to content

Commit

Permalink
clippy,nits: remove needless lifetimes
Browse files Browse the repository at this point in the history
clippy complains about these lifetimes as they can be removed by
relying on lifetime elision instead.

Signed-off-by: Mimoja <[email protected]>
  • Loading branch information
Mimoja committed Jun 24, 2024
1 parent a484d2e commit 5f1a173
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/dict_management.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ use zstd::dict::{DecoderDictionary, EncoderDictionary};

// TODO: the rust interface currently requires a level when preparing a dictionary, but the zstd interface (ZSTD_CCtx_loadDictionary) does not.
// TODO: Using LruCache here isn't very smart
pub fn encoder_dict_from_ctx<'a>(
ctx: &'a Context,
pub fn encoder_dict_from_ctx(
ctx: &Context,
arg_index: usize,
level: i32,
) -> anyhow::Result<Arc<EncoderDictionary<'static>>> {
Expand Down Expand Up @@ -48,8 +48,8 @@ pub fn encoder_dict_from_ctx<'a>(
Ok(res)
}

pub fn decoder_dict_from_ctx<'a>(
ctx: &'a Context,
pub fn decoder_dict_from_ctx(
ctx: &Context,
arg_index: usize,
) -> anyhow::Result<Arc<DecoderDictionary<'static>>> {
use lru_time_cache::LruCache;
Expand Down

0 comments on commit 5f1a173

Please sign in to comment.