MCPcopy Create free account
hub / github.com/emwalker/digraph / try_convert

Function try_convert

backend/src/psql/organization.rs:41–48  ·  view source on GitHub ↗
(rows: Vec<Row>)

Source from the content-addressed store, hash-verified

39}
40
41fn try_convert(rows: Vec<Row>) -> Result<HashMap<String, Organization>> {
42 let mut map: HashMap<String, Organization> = HashMap::new();
43 for row in rows {
44 map.insert(row.id.to_string(), row.try_into()?);
45 }
46
47 Ok(map)
48}
49
50impl Loader<String> for OrganizationLoader {
51 type Value = Organization;

Callers 1

loadMethod · 0.85

Calls 2

insertMethod · 0.80
try_intoMethod · 0.45

Tested by

no test coverage detected