From 1842257814919fa62e81bdecd5e8f95be2839dbb Mon Sep 17 00:00:00 2001 From: Alex Abdugafarov Date: Tue, 17 Oct 2023 20:11:58 +0500 Subject: [PATCH] Fixed `Hole::get` marked as unsafe in `exception-safety.md` (#427) --- src/exception-safety.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/exception-safety.md b/src/exception-safety.md index 8404bb85..762b38b9 100644 --- a/src/exception-safety.md +++ b/src/exception-safety.md @@ -172,7 +172,7 @@ impl<'a, T> Hole<'a, T> { fn removed(&self) -> &T { self.elt.as_ref().unwrap() } - unsafe fn get(&self, index: usize) -> &T { &self.data[index] } + fn get(&self, index: usize) -> &T { &self.data[index] } unsafe fn move_to(&mut self, index: usize) { let index_ptr: *const _ = &self.data[index];