MCPcopy Create free account
hub / github.com/clockworklabs/SpacetimeDB / installed_versions

Method installed_versions

crates/paths/src/cli.rs:56–70  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

54 }
55
56 pub fn installed_versions(&self) -> anyhow::Result<Vec<String>> {
57 self.read_dir()?
58 .filter_map(|r| match r {
59 Ok(entry) => {
60 let name = entry.file_name();
61 if name == Self::CURRENT_VERSION_DIR_NAME {
62 None
63 } else {
64 entry.file_name().into_string().ok().map(Ok)
65 }
66 }
67 Err(e) => Some(Err(e.into())),
68 })
69 .collect()
70 }
71}
72
73path_type!(VersionBinDir: dir);

Callers 1

execMethod · 0.80

Calls 5

ErrFunction · 0.50
collectMethod · 0.45
mapMethod · 0.45
okMethod · 0.45
into_stringMethod · 0.45

Tested by

no test coverage detected