@@ -321,7 +321,7 @@ pub unsafe trait IntoErasedSendSync<'a> {
321
321
/////////////////////////////////////////////////////////////////////////////
322
322
323
323
impl < O , T : ?Sized > OwningRef < O , T > {
324
- /// Creates a new owning reference from a owner
324
+ /// Creates a new owning reference from an owner
325
325
/// initialized to the direct dereference of it.
326
326
///
327
327
/// # Example
@@ -368,7 +368,7 @@ impl<O, T: ?Sized> OwningRef<O, T> {
368
368
/// fn main() {
369
369
/// let owning_ref = OwningRef::new(Box::new([1, 2, 3, 4]));
370
370
///
371
- /// // create a owning reference that points at the
371
+ /// // create an owning reference that points at the
372
372
/// // third element of the array.
373
373
/// let owning_ref = owning_ref.map(|array| &array[2]);
374
374
/// assert_eq!(*owning_ref, 3);
@@ -396,7 +396,7 @@ impl<O, T: ?Sized> OwningRef<O, T> {
396
396
/// fn main() {
397
397
/// let owning_ref = OwningRef::new(Box::new([1, 2, 3, 4]));
398
398
///
399
- /// // create a owning reference that points at the
399
+ /// // create an owning reference that points at the
400
400
/// // third element of the array.
401
401
/// let owning_ref = owning_ref.try_map(|array| {
402
402
/// if array[2] == 3 { Ok(&array[2]) } else { Err(()) }
@@ -430,7 +430,7 @@ impl<O, T: ?Sized> OwningRef<O, T> {
430
430
/// in an additional `Box<O>`.
431
431
///
432
432
/// This can be used to safely erase the owner of any `OwningRef<O, T>`
433
- /// to a `OwningRef<Box<Erased>, T>`.
433
+ /// to an `OwningRef<Box<Erased>, T>`.
434
434
pub fn map_owner_box ( self ) -> OwningRef < Box < O > , T > {
435
435
OwningRef { reference : self . reference , owner : Box :: new ( self . owner ) }
436
436
}
@@ -511,7 +511,7 @@ impl<O, T: ?Sized> OwningRef<O, T> {
511
511
}
512
512
513
513
impl < O , T : ?Sized > OwningRefMut < O , T > {
514
- /// Creates a new owning reference from a owner
514
+ /// Creates a new owning reference from an owner
515
515
/// initialized to the direct dereference of it.
516
516
///
517
517
/// # Example
@@ -558,7 +558,7 @@ impl<O, T: ?Sized> OwningRefMut<O, T> {
558
558
/// fn main() {
559
559
/// let owning_ref_mut = OwningRefMut::new(Box::new([1, 2, 3, 4]));
560
560
///
561
- /// // create a owning reference that points at the
561
+ /// // create an owning reference that points at the
562
562
/// // third element of the array.
563
563
/// let owning_ref = owning_ref_mut.map(|array| &array[2]);
564
564
/// assert_eq!(*owning_ref, 3);
@@ -586,7 +586,7 @@ impl<O, T: ?Sized> OwningRefMut<O, T> {
586
586
/// fn main() {
587
587
/// let owning_ref_mut = OwningRefMut::new(Box::new([1, 2, 3, 4]));
588
588
///
589
- /// // create a owning reference that points at the
589
+ /// // create an owning reference that points at the
590
590
/// // third element of the array.
591
591
/// let owning_ref_mut = owning_ref_mut.map_mut(|array| &mut array[2]);
592
592
/// assert_eq!(*owning_ref_mut, 3);
@@ -614,7 +614,7 @@ impl<O, T: ?Sized> OwningRefMut<O, T> {
614
614
/// fn main() {
615
615
/// let owning_ref_mut = OwningRefMut::new(Box::new([1, 2, 3, 4]));
616
616
///
617
- /// // create a owning reference that points at the
617
+ /// // create an owning reference that points at the
618
618
/// // third element of the array.
619
619
/// let owning_ref = owning_ref_mut.try_map(|array| {
620
620
/// if array[2] == 3 { Ok(&array[2]) } else { Err(()) }
@@ -644,7 +644,7 @@ impl<O, T: ?Sized> OwningRefMut<O, T> {
644
644
/// fn main() {
645
645
/// let owning_ref_mut = OwningRefMut::new(Box::new([1, 2, 3, 4]));
646
646
///
647
- /// // create a owning reference that points at the
647
+ /// // create an owning reference that points at the
648
648
/// // third element of the array.
649
649
/// let owning_ref_mut = owning_ref_mut.try_map_mut(|array| {
650
650
/// if array[2] == 3 { Ok(&mut array[2]) } else { Err(()) }
@@ -678,7 +678,7 @@ impl<O, T: ?Sized> OwningRefMut<O, T> {
678
678
/// in an additional `Box<O>`.
679
679
///
680
680
/// This can be used to safely erase the owner of any `OwningRefMut<O, T>`
681
- /// to a `OwningRefMut<Box<Erased>, T>`.
681
+ /// to an `OwningRefMut<Box<Erased>, T>`.
682
682
pub fn map_owner_box ( self ) -> OwningRefMut < Box < O > , T > {
683
683
OwningRefMut { reference : self . reference , owner : Box :: new ( self . owner ) }
684
684
}
@@ -970,7 +970,7 @@ where
970
970
}
971
971
}
972
972
973
- // ^ FIXME: Is a Into impl for calling into_inner() possible as well?
973
+ // ^ FIXME: Is an Into impl for calling into_inner() possible as well?
974
974
975
975
impl < O , T : ?Sized > Debug for OwningRef < O , T >
976
976
where
@@ -1139,27 +1139,27 @@ impl<T: 'static> ToHandleMut for RefCell<T> {
1139
1139
// about which handle creation to use (i.e., read() vs try_read()) as well as
1140
1140
// what to do with error results.
1141
1141
1142
- /// Typedef of a owning reference that uses a `Box` as the owner.
1142
+ /// Typedef of an owning reference that uses a `Box` as the owner.
1143
1143
pub type BoxRef < T , U = T > = OwningRef < Box < T > , U > ;
1144
- /// Typedef of a owning reference that uses a `Vec` as the owner.
1144
+ /// Typedef of an owning reference that uses a `Vec` as the owner.
1145
1145
pub type VecRef < T , U = T > = OwningRef < Vec < T > , U > ;
1146
- /// Typedef of a owning reference that uses a `String` as the owner.
1146
+ /// Typedef of an owning reference that uses a `String` as the owner.
1147
1147
pub type StringRef = OwningRef < String , str > ;
1148
1148
1149
- /// Typedef of a owning reference that uses a `Rc` as the owner.
1149
+ /// Typedef of an owning reference that uses a `Rc` as the owner.
1150
1150
pub type RcRef < T , U = T > = OwningRef < Rc < T > , U > ;
1151
- /// Typedef of a owning reference that uses a `Arc` as the owner.
1151
+ /// Typedef of an owning reference that uses an `Arc` as the owner.
1152
1152
pub type ArcRef < T , U = T > = OwningRef < Arc < T > , U > ;
1153
1153
1154
- /// Typedef of a owning reference that uses a `Ref` as the owner.
1154
+ /// Typedef of an owning reference that uses a `Ref` as the owner.
1155
1155
pub type RefRef < ' a , T , U = T > = OwningRef < Ref < ' a , T > , U > ;
1156
- /// Typedef of a owning reference that uses a `RefMut` as the owner.
1156
+ /// Typedef of an owning reference that uses a `RefMut` as the owner.
1157
1157
pub type RefMutRef < ' a , T , U = T > = OwningRef < RefMut < ' a , T > , U > ;
1158
- /// Typedef of a owning reference that uses a `MutexGuard` as the owner.
1158
+ /// Typedef of an owning reference that uses a `MutexGuard` as the owner.
1159
1159
pub type MutexGuardRef < ' a , T , U = T > = OwningRef < MutexGuard < ' a , T > , U > ;
1160
- /// Typedef of a owning reference that uses a `RwLockReadGuard` as the owner.
1160
+ /// Typedef of an owning reference that uses a `RwLockReadGuard` as the owner.
1161
1161
pub type RwLockReadGuardRef < ' a , T , U = T > = OwningRef < RwLockReadGuard < ' a , T > , U > ;
1162
- /// Typedef of a owning reference that uses a `RwLockWriteGuard` as the owner.
1162
+ /// Typedef of an owning reference that uses a `RwLockWriteGuard` as the owner.
1163
1163
pub type RwLockWriteGuardRef < ' a , T , U = T > = OwningRef < RwLockWriteGuard < ' a , T > , U > ;
1164
1164
1165
1165
/// Typedef of a mutable owning reference that uses a `Box` as the owner.
@@ -1219,11 +1219,11 @@ unsafe impl<'a, T: Send + Sync + 'a> IntoErasedSendSync<'a> for Arc<T> {
1219
1219
}
1220
1220
}
1221
1221
1222
- /// Typedef of a owning reference that uses an erased `Box` as the owner.
1222
+ /// Typedef of an owning reference that uses an erased `Box` as the owner.
1223
1223
pub type ErasedBoxRef < U > = OwningRef < Box < dyn Erased > , U > ;
1224
- /// Typedef of a owning reference that uses an erased `Rc` as the owner.
1224
+ /// Typedef of an owning reference that uses an erased `Rc` as the owner.
1225
1225
pub type ErasedRcRef < U > = OwningRef < Rc < dyn Erased > , U > ;
1226
- /// Typedef of a owning reference that uses an erased `Arc` as the owner.
1226
+ /// Typedef of an owning reference that uses an erased `Arc` as the owner.
1227
1227
pub type ErasedArcRef < U > = OwningRef < Arc < dyn Erased > , U > ;
1228
1228
1229
1229
/// Typedef of a mutable owning reference that uses an erased `Box` as the owner.
0 commit comments