Skip to content

Commit

Permalink
Avoid split_off when possible
Browse files Browse the repository at this point in the history
  • Loading branch information
maurolacy committed Oct 25, 2021
1 parent ec2f741 commit 2153df7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/cw0/src/parse_reply.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ fn parse_protobuf_varint(data: &mut Vec<u8>, field_number: u8) -> Result<usize,
field_number
)));
}
*data = data.split_off(i + 1);
*data = data[i + 1..].to_owned();

Ok(len as usize) // Gently fall back to the arch's max addressable size
}
Expand Down

0 comments on commit 2153df7

Please sign in to comment.