Skip to content

Commit fc3e2d7

Browse files
committed
chore: Cleanup, cargo clippy fixes and fmt
1 parent 706f52b commit fc3e2d7

3 files changed

Lines changed: 4 additions & 3 deletions

File tree

crates/pithos_lib/src/helpers/directory.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,8 @@ impl Directory {
140140
return Err(PithosWriterError::PathOccupied(file_entry.path.clone()));
141141
}
142142

143-
Ok(self.files.push(file_entry.clone()))
143+
self.files.push(file_entry.clone());
144+
Ok(())
144145
}
145146

146147
pub fn add_file_to_recipient(

crates/pithos_lib/src/io/pithoswriter.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -370,7 +370,7 @@ impl PithosWriter {
370370
// Process files
371371
let prefix = directory.as_ref().to_str().expect("non-utf8 path");
372372
for entry in entries {
373-
self.process_input(entry, Some(&prefix))?;
373+
self.process_input(entry, Some(prefix))?;
374374
}
375375

376376
Ok(())

crates/pithos_lib/src/io/util.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ pub fn current_timestamp() -> Result<u64, PithosWriterError> {
1717

1818
pub fn get_symlink_target(file: &std::fs::File) -> Result<String, PithosWriterError> {
1919
let fd = file.as_raw_fd();
20-
let proc_path = format!("/proc/self/fd/{}", fd);
20+
let proc_path = format!("/proc/self/fd/{fd}");
2121
Ok(std::fs::read_link(proc_path)?.to_string_lossy().to_string())
2222
}
2323

0 commit comments

Comments
 (0)