diff --git a/src/reader.rs b/src/reader.rs index 395e6e9..c9a2bae 100644 --- a/src/reader.rs +++ b/src/reader.rs @@ -23,7 +23,7 @@ use self::ParseState::{ /// /// Generally, you won't need to use this type because `CRLF` is the default, /// which is by far the most widely used record terminator. -#[derive(Copy)] +#[derive(Clone, Copy)] pub enum RecordTerminator { /// Parses `\r`, `\n` or `\r\n` as a single record terminator. CRLF, @@ -817,7 +817,7 @@ impl Reader { } } -#[derive(Copy)] +#[derive(Clone, Copy)] struct ParseMachine { delimiter: u8, record_terminator: RecordTerminator, @@ -826,7 +826,7 @@ struct ParseMachine { double_quote: bool, } -#[derive(Copy, Eq, PartialEq, Debug)] +#[derive(Clone, Copy, Eq, PartialEq, Debug)] enum ParseState { StartRecord, EndRecord, diff --git a/src/writer.rs b/src/writer.rs index e2b89db..9bd02c4 100644 --- a/src/writer.rs +++ b/src/writer.rs @@ -10,7 +10,7 @@ use { }; /// The quoting style to use when writing CSV data. -#[derive(Copy)] +#[derive(Clone, Copy)] pub enum QuoteStyle { /// This puts quotes around every field. Always. Always,