MCPcopy Create free account
hub / github.com/csskit/csskit / needs_download

Function needs_download

packages/csskit_zed/src/lib.rs:30–35  ·  view source on GitHub ↗
(installed_version: Option<&str>, release_version: &str, binary_exists: bool)

Source from the content-addressed store, hash-verified

28}
29
30fn needs_download(installed_version: Option<&str>, release_version: &str, binary_exists: bool) -> bool {
31 match installed_version {
32 Some(v) if v == release_version && binary_exists => false,
33 _ => true,
34 }
35}
36
37fn find_asset<'a>(assets: &'a [zed::GithubReleaseAsset], expected: &str) -> Result<&'a zed::GithubReleaseAsset> {
38 assets.iter().find(|a| a.name == expected).ok_or_else(|| format!("no asset found matching {expected}"))

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected