mirror of
https://git.proxmox.com/git/proxmox-backup
synced 2025-08-03 02:19:01 +00:00
![]() After importing the I/O ops trait via: use crate::tools::io::ops::*; Instead of: let mut buffer = vec![0u8; 65536]; file.read_exact(&mut buffer)?; use: let buffer = file.read_exact_allocated(65536)?; After importing the vector helpers via: use crate::tools::vec::{self, ops::*}; For a buffer which *could* be uninitialized but you prefer zero-initialization anyway for security reasons, instead of: let mut buffer = vec![0u8; len]; use: let mut buffer = vec::undefined(len); which zero-initializes, but, if the `valgrind` feature flag is enabled, marks the vector as having undefined contents, so reading from it will cause valgrind errors. Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com> |
||
---|---|---|
.. | ||
io | ||
vec | ||
acl.rs | ||
async_mutex.rs | ||
borrow.rs | ||
broadcast_future.rs | ||
common_regex.rs | ||
daemon.rs | ||
file_logger.rs | ||
fs.rs | ||
io.rs | ||
process_locker.rs | ||
procfs.rs | ||
read.rs | ||
signalfd.rs | ||
ticket.rs | ||
timer.rs | ||
tty.rs | ||
vec.rs | ||
wrapped_reader_stream.rs | ||
write.rs | ||
xattr.rs |