Skip to content

Commit

Permalink
chore: bump zed_extension_api to 0.2.0 (#35)
Browse files Browse the repository at this point in the history
* chore: bump zed_extension_api to 0.2.0

no breaking changes

* chore: use is_ok_and instead of map_or

resolves clippy error "this `map_or` is redundant"
  • Loading branch information
sspaink authored Feb 12, 2025
1 parent dbf337a commit 0bb2501
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ path = "src/lib.rs"
crate-type = ["cdylib"]

[dependencies]
zed_extension_api = "0.0.6"
zed_extension_api = "0.2.0"
4 changes: 2 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ impl Rego {
}

if let Some(path) = &self.cached_binary_path {
if fs::metadata(path).map_or(false, |stat| stat.is_file()) {
if fs::metadata(path).is_ok_and(|stat| stat.is_file()) {
return Ok(path.clone());
}
}
Expand Down Expand Up @@ -59,7 +59,7 @@ impl Rego {

let binary_path = format!("{version_dir}/{asset_name}");

if !fs::metadata(&binary_path).map_or(false, |stat| stat.is_file()) {
if !fs::metadata(&binary_path).is_ok_and(|stat| stat.is_file()) {
zed::set_language_server_installation_status(
language_server_id,
&zed::LanguageServerInstallationStatus::Downloading,
Expand Down

0 comments on commit 0bb2501

Please sign in to comment.