From b2ac3011f7959c8e5b1a9556eb81a213f9277978 Mon Sep 17 00:00:00 2001 From: David Tolnay Date: Wed, 1 May 2019 19:10:39 -0700 Subject: [PATCH] Elide lifetime that can be inferred --- src/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 92c93f0..2b6f68c 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -137,7 +137,7 @@ mod private { pub trait Integer: private::Sealed { // Not public API. #[doc(hidden)] - fn write<'a>(self, buf: &'a mut Buffer) -> &'a str; + fn write(self, buf: &mut Buffer) -> &str; } trait IntegerPrivate { @@ -157,7 +157,7 @@ macro_rules! impl_IntegerCommon { ($max_len:expr, $t:ident) => { impl Integer for $t { #[inline] - fn write<'a>(self, buf: &'a mut Buffer) -> &'a str { + fn write(self, buf: &mut Buffer) -> &str { unsafe { debug_assert!($max_len <= I128_MAX_LEN); let buf = mem::transmute::<&mut [u8; I128_MAX_LEN], &mut [u8; $max_len]>(