diff --git a/src/reader.rs b/src/reader.rs index 3d66eea5..aa50212f 100644 --- a/src/reader.rs +++ b/src/reader.rs @@ -1612,7 +1612,9 @@ impl Reader { } return result; } - } else if self.state.trim.should_trim_fields() { + } + // It should be a record, since we have no headers, trim if necessary + if !self.state.has_headers && self.state.trim.should_trim_fields() { record.trim(); } Ok(ok)