io: Add traits
So that our `io` crate is not surprising it seems we should generally, unless there is a good reason not to, follow `std::io`. Copy the derived trait implementations from `std::io` for `Cursor`, `Sink`, and `Take`. Done while investigating C-COMMON-TRAITS
This commit is contained in:
parent
72aceb32db
commit
6cf90132bc
|
@ -192,7 +192,7 @@ impl BufRead for &[u8] {
|
|||
}
|
||||
|
||||
/// Wraps an in memory reader providing the `position` function.
|
||||
#[derive(Debug)]
|
||||
#[derive(Clone, Debug, Default, Eq, PartialEq)]
|
||||
pub struct Cursor<T> {
|
||||
inner: T,
|
||||
pos: u64,
|
||||
|
@ -331,7 +331,7 @@ impl Write for &mut [u8] {
|
|||
/// A sink to which all writes succeed. See [`std::io::Sink`] for more info.
|
||||
///
|
||||
/// Created using `io::sink()`.
|
||||
#[derive(Debug)]
|
||||
#[derive(Clone, Copy, Debug, Default)]
|
||||
pub struct Sink;
|
||||
|
||||
impl Write for Sink {
|
||||
|
|
Loading…
Reference in New Issue