From ca9b0fd836a26b61f537c8d8c22a1377d204c91f Mon Sep 17 00:00:00 2001 From: Nathan Whitaker Date: Mon, 22 Aug 2022 20:19:12 -0700 Subject: [PATCH] Appease clippy --- src/eyreish/error.rs | 2 +- src/source_impls.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/eyreish/error.rs b/src/eyreish/error.rs index ef92a0c..a7ed3bd 100644 --- a/src/eyreish/error.rs +++ b/src/eyreish/error.rs @@ -699,7 +699,7 @@ impl ErasedErrorImpl { .deref_mut() } - pub(crate) unsafe fn chain<'a>(this: Ref<'a, Self>) -> Chain<'a> { + pub(crate) unsafe fn chain(this: Ref<'_, Self>) -> Chain<'_> { Chain::new(Self::error(this)) } } diff --git a/src/source_impls.rs b/src/source_impls.rs index 4414595..14fe782 100644 --- a/src/source_impls.rs +++ b/src/source_impls.rs @@ -73,7 +73,7 @@ fn context_info<'a>( } if offset >= (span.offset() + span.len()).saturating_sub(1) { - let starting_offset = before_lines_starts.get(0).copied().unwrap_or_else(|| { + let starting_offset = before_lines_starts.first().copied().unwrap_or_else(|| { if context_lines_before == 0 { span.offset() } else {