mirror of
https://github.com/uutils/coreutils.git
synced 2026-06-10 15:48:22 -07:00
cp: replace match by is_ok_and
This commit is contained in:
@@ -192,12 +192,7 @@ where
|
||||
/// Checks whether an existing destination is a fifo
|
||||
fn check_dest_is_fifo(dest: &Path) -> bool {
|
||||
// If our destination file exists and its a fifo , we do a standard copy .
|
||||
let file_type = std::fs::metadata(dest);
|
||||
match file_type {
|
||||
Ok(f) => f.file_type().is_fifo(),
|
||||
|
||||
_ => false,
|
||||
}
|
||||
std::fs::metadata(dest).is_ok_and(|f| f.file_type().is_fifo())
|
||||
}
|
||||
|
||||
/// Copy the contents of a stream from `source` to `dest`.
|
||||
|
||||
Reference in New Issue
Block a user