mirror of
https://github.com/chatmail/core.git
synced 2026-04-17 21:46:35 +03:00
Remove unnecessary check in dc_array_new_typed
Allocating Vec with 0 capacity is correct.
This commit is contained in:
@@ -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()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user