From 5281dc08be00d174effb420d5c0269598718f9ee Mon Sep 17 00:00:00 2001 From: Alessandro Passaro Date: Fri, 30 Jun 2023 14:50:37 +0000 Subject: [PATCH] fix fmt Signed-off-by: Alessandro Passaro --- mountpoint-s3/tests/fuse_tests/write_test.rs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/mountpoint-s3/tests/fuse_tests/write_test.rs b/mountpoint-s3/tests/fuse_tests/write_test.rs index 7f0bd8b1a..a38e13dba 100644 --- a/mountpoint-s3/tests/fuse_tests/write_test.rs +++ b/mountpoint-s3/tests/fuse_tests/write_test.rs @@ -1,5 +1,5 @@ use std::fs::{metadata, read, read_dir, File}; -use std::io::{ErrorKind, Read, Write, Seek}; +use std::io::{ErrorKind, Read, Seek, Write}; use std::os::unix::prelude::OpenOptionsExt; use std::path::Path; use std::time::Duration; @@ -301,24 +301,24 @@ where let mut body = vec![0u8; OBJECT_SIZE]; rng.fill(&mut body[..]); - let part1 = &body[..(OBJECT_SIZE/2)]; - let part2 = &body[(OBJECT_SIZE/2)..]; + let part1 = &body[..(OBJECT_SIZE / 2)]; + let part2 = &body[(OBJECT_SIZE / 2)..]; - f.write_all(&part1).unwrap(); + f.write_all(part1).unwrap(); // Attempt to seek to start and write over. f.seek(std::io::SeekFrom::Start(0)).unwrap(); - let err = f.write_all(&part2).expect_err("out of order write should fail"); + let err = f.write_all(part2).expect_err("out of order write should fail"); assert_eq!(err.raw_os_error(), Some(libc::EINVAL)); // Attempt to seek beyond end and write. f.seek(std::io::SeekFrom::Start((part1.len() + 1) as u64)).unwrap(); - let err = f.write_all(&part2).expect_err("out of order write should fail"); + let err = f.write_all(part2).expect_err("out of order write should fail"); assert_eq!(err.raw_os_error(), Some(libc::EINVAL)); // Seek where we left off and write sequentially. f.seek(std::io::SeekFrom::Start((part1.len()) as u64)).unwrap(); - f.write_all(&part2).unwrap(); + f.write_all(part2).unwrap(); drop(f);