Skip to content

Commit

Permalink
fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
lwshang committed Oct 5, 2023
1 parent 73b6bad commit 5becf38
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions rust/candid/src/types/value.rs
Original file line number Diff line number Diff line change
Expand Up @@ -443,8 +443,7 @@ impl<'de> Visitor<'de> for IDLValueVisitor {
5u8 => {
use std::io::Read;
let len = leb128::read::unsigned(&mut bytes).map_err(E::custom)? as usize;
let mut buf = Vec::new();
buf.resize(len, 0);
let mut buf = vec![0; len];
bytes.read_exact(&mut buf).map_err(E::custom)?;
let meth = String::from_utf8(buf).map_err(E::custom)?;
let id = crate::Principal::try_from(bytes).map_err(E::custom)?;
Expand Down

0 comments on commit 5becf38

Please sign in to comment.