@@ -810,9 +810,9 @@ pub trait Read {
810
810
default_read_exact ( self , buf)
811
811
}
812
812
813
- /// Creates a "by reference" adaptor for this instance of `Read`.
813
+ /// Creates a "by reference" adapter for this instance of `Read`.
814
814
///
815
- /// The returned adaptor also implements `Read` and will simply borrow this
815
+ /// The returned adapter also implements `Read` and will simply borrow this
816
816
/// current reader.
817
817
///
818
818
/// # Examples
@@ -889,7 +889,7 @@ pub trait Read {
889
889
Bytes { inner : self }
890
890
}
891
891
892
- /// Creates an adaptor which will chain this stream with another.
892
+ /// Creates an adapter which will chain this stream with another.
893
893
///
894
894
/// The returned `Read` instance will first read all bytes from this object
895
895
/// until EOF is encountered. Afterwards the output is equivalent to the
@@ -927,7 +927,7 @@ pub trait Read {
927
927
Chain { first : self , second : next, done_first : false }
928
928
}
929
929
930
- /// Creates an adaptor which will read at most `limit` bytes from it.
930
+ /// Creates an adapter which will read at most `limit` bytes from it.
931
931
///
932
932
/// This function returns a new instance of `Read` which will read at most
933
933
/// `limit` bytes, after which it will always return EOF ([`Ok(0)`]). Any
@@ -1326,7 +1326,7 @@ impl Initializer {
1326
1326
/// * The [`write`] method will attempt to write some data into the object,
1327
1327
/// returning how many bytes were successfully written.
1328
1328
///
1329
- /// * The [`flush`] method is useful for adaptors and explicit buffers
1329
+ /// * The [`flush`] method is useful for adapters and explicit buffers
1330
1330
/// themselves for ensuring that all buffered data has been pushed out to the
1331
1331
/// 'true sink'.
1332
1332
///
@@ -1646,12 +1646,12 @@ pub trait Write {
1646
1646
fn write_fmt ( & mut self , fmt : fmt:: Arguments < ' _ > ) -> Result < ( ) > {
1647
1647
// Create a shim which translates a Write to a fmt::Write and saves
1648
1648
// off I/O errors. instead of discarding them
1649
- struct Adaptor < ' a , T : ?Sized + ' a > {
1649
+ struct Adapter < ' a , T : ?Sized + ' a > {
1650
1650
inner : & ' a mut T ,
1651
1651
error : Result < ( ) > ,
1652
1652
}
1653
1653
1654
- impl < T : Write + ?Sized > fmt:: Write for Adaptor < ' _ , T > {
1654
+ impl < T : Write + ?Sized > fmt:: Write for Adapter < ' _ , T > {
1655
1655
fn write_str ( & mut self , s : & str ) -> fmt:: Result {
1656
1656
match self . inner . write_all ( s. as_bytes ( ) ) {
1657
1657
Ok ( ( ) ) => Ok ( ( ) ) ,
@@ -1663,7 +1663,7 @@ pub trait Write {
1663
1663
}
1664
1664
}
1665
1665
1666
- let mut output = Adaptor { inner : self , error : Ok ( ( ) ) } ;
1666
+ let mut output = Adapter { inner : self , error : Ok ( ( ) ) } ;
1667
1667
match fmt:: write ( & mut output, fmt) {
1668
1668
Ok ( ( ) ) => Ok ( ( ) ) ,
1669
1669
Err ( ..) => {
@@ -1677,9 +1677,9 @@ pub trait Write {
1677
1677
}
1678
1678
}
1679
1679
1680
- /// Creates a "by reference" adaptor for this instance of `Write`.
1680
+ /// Creates a "by reference" adapter for this instance of `Write`.
1681
1681
///
1682
- /// The returned adaptor also implements `Write` and will simply borrow this
1682
+ /// The returned adapter also implements `Write` and will simply borrow this
1683
1683
/// current writer.
1684
1684
///
1685
1685
/// # Examples
@@ -2263,7 +2263,7 @@ pub trait BufRead: Read {
2263
2263
}
2264
2264
}
2265
2265
2266
- /// Adaptor to chain together two readers.
2266
+ /// Adapter to chain together two readers.
2267
2267
///
2268
2268
/// This struct is generally created by calling [`chain`] on a reader.
2269
2269
/// Please see the documentation of [`chain`] for more details.
@@ -2414,7 +2414,7 @@ impl<T, U> SizeHint for Chain<T, U> {
2414
2414
}
2415
2415
}
2416
2416
2417
- /// Reader adaptor which limits the bytes read from an underlying reader.
2417
+ /// Reader adapter which limits the bytes read from an underlying reader.
2418
2418
///
2419
2419
/// This struct is generally created by calling [`take`] on a reader.
2420
2420
/// Please see the documentation of [`take`] for more details.
0 commit comments