Skip to content

Commit

Permalink
fix: lint warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
sunng87 committed Oct 4, 2024
1 parent 83a1062 commit f7583b9
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion benches/bench.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ struct CpuProfiler<'a> {
}

#[cfg(unix)]
impl<'a> Profiler for CpuProfiler<'a> {
impl Profiler for CpuProfiler<'_> {
fn start_profiling(&mut self, _benchmark_id: &str, benchmark_dir: &Path) {
create_dir_all(benchmark_dir).unwrap();

Expand Down
2 changes: 1 addition & 1 deletion src/json/value.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ impl<'rc> ScopedJson<'rc> {
}
}

impl<'reg: 'rc, 'rc> From<Json> for ScopedJson<'rc> {
impl<'rc> From<Json> for ScopedJson<'rc> {
fn from(v: Json) -> ScopedJson<'rc> {
ScopedJson::Derived(v)
}
Expand Down
4 changes: 2 additions & 2 deletions src/registry.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ pub struct Registry<'reg> {
HashMap<String, Arc<dyn Source<Item = String, Error = IoError> + Send + Sync + 'reg>>,
}

impl<'reg> Debug for Registry<'reg> {
impl Debug for Registry<'_> {
fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), fmt::Error> {
f.debug_struct("Handlebars")
.field("templates", &self.templates)
Expand All @@ -89,7 +89,7 @@ impl<'reg> Debug for Registry<'reg> {
}
}

impl<'reg> Default for Registry<'reg> {
impl Default for Registry<'_> {
fn default() -> Self {
Self::new()
}
Expand Down
2 changes: 1 addition & 1 deletion src/render.rs
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ impl<'reg: 'rc, 'rc> RenderContext<'reg, 'rc> {
}
}

impl<'reg, 'rc> fmt::Debug for RenderContext<'reg, 'rc> {
impl fmt::Debug for RenderContext<'_, '_> {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> Result<(), fmt::Error> {
f.debug_struct("RenderContextInner")
.field("dev_mode_templates", &self.dev_mode_templates)
Expand Down
2 changes: 1 addition & 1 deletion tests/data_helper.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use serde_json::json;

struct HelperWithBorrowedData<'a>(&'a String);

impl<'a> HelperDef for HelperWithBorrowedData<'a> {
impl HelperDef for HelperWithBorrowedData<'_> {
fn call<'_reg: '_rc, '_rc>(
&self,
_: &Helper<'_rc>,
Expand Down

0 comments on commit f7583b9

Please sign in to comment.