diff --git a/src/curr/generated.rs b/src/curr/generated.rs index cbc42fbf..fc532a94 100644 --- a/src/curr/generated.rs +++ b/src/curr/generated.rs @@ -1326,7 +1326,7 @@ impl ReadXdr for VecM { return Err(Error::LengthExceedsMax); } - let mut vec = Vec::with_capacity(len as usize); + let mut vec = Vec::new(); for _ in 0..len { let t = T::read_xdr(r)?; vec.push(t); diff --git a/src/next/generated.rs b/src/next/generated.rs index 6fde8785..998abefc 100644 --- a/src/next/generated.rs +++ b/src/next/generated.rs @@ -1326,7 +1326,7 @@ impl ReadXdr for VecM { return Err(Error::LengthExceedsMax); } - let mut vec = Vec::with_capacity(len as usize); + let mut vec = Vec::new(); for _ in 0..len { let t = T::read_xdr(r)?; vec.push(t);