From b5fe85d7ddb1f04489761f08873521c36c1130ba Mon Sep 17 00:00:00 2001 From: Lovecraftian Horror Date: Fri, 17 Feb 2023 11:03:35 -0700 Subject: [PATCH] Document panic in get2_mut --- src/lib.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/lib.rs b/src/lib.rs index ec21147..36b88a3 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -726,6 +726,10 @@ impl Slab { /// This function can be used to get two mutable references out of one slab, /// so that you can manipulate both of them at the same time, eg. swap them. /// + /// # Panics + /// + /// This function will panic if `key1` and `key2` are the same. + /// /// # Examples /// /// ```