We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 88b7a88 commit be8ca30Copy full SHA for be8ca30
1 file changed
src/lib.rs
@@ -16,7 +16,7 @@ impl InfracostExtension {
16
}
17
18
if let Some(path) = &self.cached_binary_path {
19
- if fs::metadata(path).map_or(false, |stat| stat.is_file()) {
+ if fs::metadata(path).is_ok_and(|stat| stat.is_file()) {
20
return Ok(path.clone());
21
22
@@ -58,7 +58,7 @@ impl InfracostExtension {
58
let version_dir = format!("infracost-ls-{version}");
59
let binary_path = format!("{version_dir}/infracost-ls");
60
61
- if !fs::metadata(&binary_path).map_or(false, |stat| stat.is_file()) {
+ if !fs::metadata(&binary_path).is_ok_and(|stat| stat.is_file()) {
62
zed::set_language_server_installation_status(
63
language_server_id,
64
&zed::LanguageServerInstallationStatus::Downloading,
0 commit comments