diff options
Diffstat (limited to 'crates')
-rw-r--r-- | crates/ra_project_model/src/cargo_workspace.rs | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/crates/ra_project_model/src/cargo_workspace.rs b/crates/ra_project_model/src/cargo_workspace.rs index 32592e660..0aea01d83 100644 --- a/crates/ra_project_model/src/cargo_workspace.rs +++ b/crates/ra_project_model/src/cargo_workspace.rs | |||
@@ -323,16 +323,8 @@ pub fn load_extern_resources(cargo_toml: &Path, cargo_features: &CargoFeatures) | |||
323 | 323 | ||
324 | // FIXME: File a better way to know if it is a dylib | 324 | // FIXME: File a better way to know if it is a dylib |
325 | fn is_dylib(path: &Path) -> bool { | 325 | fn is_dylib(path: &Path) -> bool { |
326 | let ext = match path.extension().and_then(OsStr::to_str).map(|it| it.to_string().to_lowercase()) | 326 | match path.extension().and_then(OsStr::to_str).map(|it| it.to_string().to_lowercase()) { |
327 | { | 327 | None => false, |
328 | None => return false, | 328 | Some(ext) => matches!(ext.as_str(), "dll" | "dylib" | "so"), |
329 | Some(ext) => ext, | ||
330 | }; | ||
331 | |||
332 | match ext.as_str() { | ||
333 | "dll" => true, | ||
334 | "dylib" => true, | ||
335 | "so" => true, | ||
336 | _ => false, | ||
337 | } | 329 | } |
338 | } | 330 | } |