Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/ImageOptim/libimagequant
/ try_zero_vec
Function
try_zero_vec
src/image.rs:341–346 ·
view source on GitHub ↗
(len: usize)
Source
from the content-addressed store, hash-verified
339
}
340
341
fn try_zero_vec(len: usize) -> Result<Vec<u8>, Error> {
342
let mut vec = Vec::new();
343
vec.try_reserve_exact(len)?;
344
vec.resize(len, 0);
345
Ok(vec)
346
}
Callers
1
contrast_maps
Method · 0.85
Calls
1
new
Function · 0.85
Tested by
no test coverage detected