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

Function find_asset

packages/csskit_zed/src/lib.rs:37–39  ·  view source on GitHub ↗
(assets: &'a [zed::GithubReleaseAsset], expected: &str)

Source from the content-addressed store, hash-verified

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}"))
39}
40
41fn installed_version() -> Option<String> {
42 let version = fs::read_to_string(VERSION_FILE).ok()?;

Callers 3

test_find_asset_foundFunction · 0.85

Calls 1

iterMethod · 0.80

Tested by 2

test_find_asset_foundFunction · 0.68