Skip to content
Snippets Groups Projects
Commit d5407b2e authored by Raphaël Gomès's avatar Raphaël Gomès
Browse files

rust: leverage improved match ergonomics

Differential Revision: https://phab.mercurial-scm.org/D9137
parent 7bd13bf9
No related branches found
No related tags found
No related merge requests found
......@@ -730,7 +730,7 @@
.symlink_metadata();
match meta {
Ok(ref m)
Ok(m)
if !(m.file_type().is_file()
|| m.file_type().is_symlink()) =>
{
......@@ -749,7 +749,7 @@
);
Ok((Cow::Owned(filename), dispatch))
}
Err(ref e)
Err(e)
if e.kind() == ErrorKind::NotFound
|| e.raw_os_error() == Some(20) =>
{
......@@ -783,7 +783,7 @@
let meta =
self.root_dir.join(filename_as_path).symlink_metadata();
match meta {
Ok(ref m)
Ok(m)
if !(m.file_type().is_file()
|| m.file_type().is_symlink()) =>
{
......@@ -802,7 +802,7 @@
self.options,
),
)),
Err(ref e)
Err(e)
if e.kind() == ErrorKind::NotFound
|| e.raw_os_error() == Some(20) =>
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment