Skip to content

Commit

Permalink
csv: fix mutability warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
BurntSushi committed Oct 13, 2017
1 parent db35a5c commit bc43a96
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/byte_record.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ pub fn as_parts(
) -> (&mut Vec<u8>, &mut Vec<usize>) {
// TODO(burntsushi): Use `pub(crate)` when it stabilizes.
// (&mut record.fields, &mut record.bounds.ends)
let mut inner = &mut *record.0;
let inner = &mut *record.0;
(&mut inner.fields, &mut inner.bounds.ends)
}

Expand Down
2 changes: 1 addition & 1 deletion src/deserializer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ impl<'r> DeRecord<'r> for DeByteRecord<'r> {
macro_rules! deserialize_int {
($method:ident, $visit:ident) => {
fn $method<V: Visitor<'de>>(
mut self,
self,
visitor: V,
) -> Result<V::Value, Self::Error> {
visitor.$visit(
Expand Down
2 changes: 1 addition & 1 deletion src/reader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1593,7 +1593,7 @@ impl<R: io::Read> Reader<R> {
loop {
let (res, nin, nout, nend) = {
let input = self.rdr.fill_buf()?;
let (mut fields, mut ends) = byte_record::as_parts(record);
let (fields, ends) = byte_record::as_parts(record);
self.core.read_record(
input, &mut fields[outlen..], &mut ends[endlen..])
};
Expand Down

0 comments on commit bc43a96

Please sign in to comment.