From 0809a57d7eed51b5dbf59a0cb0e0b56f75a67173 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=90=D1=80=D1=82=D1=91=D0=BC=20=D0=9F=D0=B0=D0=B2=D0=BB?= =?UTF-8?q?=D0=BE=D0=B2=20=5BArtyom=20Pavlov=5D?= Date: Wed, 20 Nov 2024 20:57:54 +0300 Subject: [PATCH] Fix compilation error --- aead/src/buffer.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/aead/src/buffer.rs b/aead/src/buffer.rs index 8e983aea..396d2db7 100644 --- a/aead/src/buffer.rs +++ b/aead/src/buffer.rs @@ -1,4 +1,4 @@ -use crate::{Error, Result}; +use crate::Result; #[cfg(feature = "alloc")] use alloc::vec::Vec; @@ -65,7 +65,7 @@ impl Buffer for ArrayVec { fn resize(&mut self, len: usize) -> Result<()> { if let Some(ext_len) = len.checked_sub(self.len()) { let buf = &[0u8; N][..ext_len]; - self.try_extend_from_slice(buf).map_err(|_| Error) + self.try_extend_from_slice(buf).map_err(|_| crate::Error) } else { self.truncate(len); Ok(()) @@ -73,7 +73,7 @@ impl Buffer for ArrayVec { } fn extend_from_slice(&mut self, other: &[u8]) -> Result<()> { - ArrayVec::try_extend_from_slice(self, other).map_err(|_| Error) + ArrayVec::try_extend_from_slice(self, other).map_err(|_| crate::Error) } fn truncate(&mut self, len: usize) { @@ -84,11 +84,11 @@ impl Buffer for ArrayVec { #[cfg(feature = "heapless")] impl Buffer for heapless::Vec { fn resize(&mut self, len: usize) -> Result<()> { - heapless::Vec::resize(self, len, 0).map_err(|_| Error) + heapless::Vec::resize(self, len, 0).map_err(|_| crate::Error) } fn extend_from_slice(&mut self, other: &[u8]) -> Result<()> { - heapless::Vec::extend_from_slice(self, other).map_err(|_| Error) + heapless::Vec::extend_from_slice(self, other).map_err(|_| crate::Error) } fn truncate(&mut self, len: usize) {