the part number cannot go above 255 at the moment, but if it ever gets
bumped to a bigger integer type this boundary wouldn't cause a
compile-error. explicitly checking for overflowing u8 makes this a bit
more future-proof, and shuts up clippy as well ;)
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
}
if self.writer.is_none() {
- if self.header.part_number >= 255 {
+ if self.header.part_number == u8::MAX {
proxmox_sys::io_bail!("multi-volume writer: too many parts");
}
self.writer = Some(