diff --git a/src/dc_array.rs b/src/dc_array.rs index 66bdac279..7bff7823f 100644 --- a/src/dc_array.rs +++ b/src/dc_array.rs @@ -256,8 +256,7 @@ pub fn dc_array_new(initsize: size_t) -> *mut dc_array_t { } pub fn dc_array_new_typed(type_0: libc::c_int, initsize: size_t) -> *mut dc_array_t { - let capacity = if initsize < 1 { 1 } else { initsize as usize }; - let mut array = dc_array_t::new(capacity); + let mut array = dc_array_t::new(initsize); array.type_0 = type_0; array.as_ptr() }