Rust: Change the test copy of the example as well.

This commit is contained in:
Geoffrey White
2025-04-04 09:54:41 +01:00
parent f96b00a62a
commit 44b26e5ae6

View File

@@ -291,7 +291,7 @@ const BUFFER_LIMIT: usize = 10 * 1024;
fn allocate_buffer_good(user_input: String) -> Result<*mut u8, Error> {
let size = user_input.parse::<usize>()?;
if (size > BUFFER_LIMIT) {
if size > BUFFER_LIMIT {
return Err("Size exceeds limit".into());
}
let num_bytes = size * std::mem::size_of::<u64>();