Upgrade rust/crates/which to 4.0.2 am: e92abd30fa

Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/which/+/1388913

Change-Id: I0fc9ef7e246894e532ca7e41e9308e0e2424d0fa
diff --git a/.cargo_vcs_info.json b/.cargo_vcs_info.json
index eb684ab..a84fc42 100644
--- a/.cargo_vcs_info.json
+++ b/.cargo_vcs_info.json
@@ -1,5 +1,5 @@
 {
   "git": {
-    "sha1": "e5039c15d1202a59b9e35d628263134cf92514fe"
+    "sha1": "b5ab0940278ff0e5a5f864a4138098f5fbd9d868"
   }
 }
diff --git a/Cargo.toml b/Cargo.toml
index d5f14ac..0ba7115 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -12,7 +12,7 @@
 
 [package]
 name = "which"
-version = "4.0.1"
+version = "4.0.2"
 authors = ["Harry Fei <tiziyuanfang@gmail.com>"]
 description = "A Rust equivalent of Unix command \"which\". Locate installed executable in cross platforms."
 documentation = "https://docs.rs/which/"
diff --git a/Cargo.toml.orig b/Cargo.toml.orig
index 34399d6..20f06bf 100644
--- a/Cargo.toml.orig
+++ b/Cargo.toml.orig
@@ -1,6 +1,6 @@
 [package]
 name = "which"
-version = "4.0.1"
+version = "4.0.2"
 authors = ["Harry Fei <tiziyuanfang@gmail.com>"]
 repository = "https://github.com/harryfei/which-rs.git"
 documentation = "https://docs.rs/which/"
diff --git a/METADATA b/METADATA
index 6c5876e..62667a6 100644
--- a/METADATA
+++ b/METADATA
@@ -9,11 +9,11 @@
     type: GIT
     value: "https://github.com/harryfei/which-rs.git"
   }
-  version: "4.0.1"
+  version: "4.0.2"
   license_type: NOTICE
   last_upgrade_date {
     year: 2020
-    month: 7
-    day: 10
+    month: 8
+    day: 4
   }
 }
diff --git a/src/checker.rs b/src/checker.rs
index 817ae2f..94ef31a 100644
--- a/src/checker.rs
+++ b/src/checker.rs
@@ -39,14 +39,17 @@
 }
 
 impl Checker for ExistedChecker {
-    #[cfg(target_os="windows")]
+    #[cfg(target_os = "windows")]
     fn is_valid(&self, path: &Path) -> bool {
         fs::symlink_metadata(path)
-            .map(|metadata| metadata.is_file())
+            .map(|metadata| {
+                let file_type = metadata.file_type();
+                file_type.is_file() || file_type.is_symlink()
+            })
             .unwrap_or(false)
     }
 
-    #[cfg(not(target_os="windows"))]
+    #[cfg(not(target_os = "windows"))]
     fn is_valid(&self, path: &Path) -> bool {
         fs::metadata(path)
             .map(|metadata| metadata.is_file())