Ran clippy
This commit is contained in:
parent
85a85a3810
commit
c3324f203b
@ -26,11 +26,10 @@ impl Item {
|
||||
for c in res {
|
||||
write!(sha256sum, "{c:02x}")?;
|
||||
}
|
||||
let node = Node::read_data_to_tar(&data, &filename, &meta, owner)?;
|
||||
let mode = meta.mode();
|
||||
Ok(Self {
|
||||
entry: Entry::File { path, sha256sum, mode, size },
|
||||
node,
|
||||
node: Node::read_data_to_tar(&data, &filename, &meta, owner)?,
|
||||
})
|
||||
} else if meta.is_dir() {
|
||||
let mode = meta.mode();
|
||||
|
@ -272,7 +272,7 @@ impl Header {
|
||||
header.mtime[..mtime.len()].copy_from_slice(mtime.as_bytes());
|
||||
header.link_indicator[0] = FileType::from(meta) as u8;
|
||||
if header.link_indicator[0] == FileType::Symlink as u8 {
|
||||
let link = fs::read_link(&filename)?.to_str().unwrap().to_string();
|
||||
let link = fs::read_link(filename)?.to_str().unwrap().to_string();
|
||||
header.link_name[..link.len()].copy_from_slice(link.as_bytes());
|
||||
} else if header.link_indicator[0] == FileType::Block as u8 {
|
||||
let major = format!("{:07o}", meta.st_dev());
|
||||
|
Loading…
Reference in New Issue
Block a user