@@ -1442,20 +1442,20 @@ impl<T, A: Allocator + Clone> BTreeSet<T, A> {
1442
1442
///
1443
1443
/// let mut set = BTreeSet::from([1, 2, 3, 4]);
1444
1444
///
1445
- /// let mut cursor = unsafe { set.upper_bound_mut(Bound::Included(&3)) } ;
1445
+ /// let mut cursor = set.upper_bound_mut(Bound::Included(&3));
1446
1446
/// assert_eq!(cursor.peek_prev(), Some(&3));
1447
1447
/// assert_eq!(cursor.peek_next(), Some(&4));
1448
1448
///
1449
- /// let mut cursor = unsafe { set.upper_bound_mut(Bound::Excluded(&3)) } ;
1449
+ /// let mut cursor = set.upper_bound_mut(Bound::Excluded(&3));
1450
1450
/// assert_eq!(cursor.peek_prev(), Some(&2));
1451
1451
/// assert_eq!(cursor.peek_next(), Some(&3));
1452
1452
///
1453
- /// let mut cursor = unsafe { set.upper_bound_mut(Bound::Unbounded) } ;
1453
+ /// let mut cursor = set.upper_bound_mut(Bound::Unbounded);
1454
1454
/// assert_eq!(cursor.peek_prev(), Some(&4));
1455
1455
/// assert_eq!(cursor.peek_next(), None);
1456
1456
/// ```
1457
1457
#[ unstable( feature = "btree_cursors" , issue = "107540" ) ]
1458
- pub unsafe fn upper_bound_mut < Q : ?Sized > ( & mut self , bound : Bound < & Q > ) -> CursorMut < ' _ , T , A >
1458
+ pub fn upper_bound_mut < Q : ?Sized > ( & mut self , bound : Bound < & Q > ) -> CursorMut < ' _ , T , A >
1459
1459
where
1460
1460
T : Borrow < Q > + Ord ,
1461
1461
Q : Ord ,
0 commit comments