MCPcopy Create free account
hub / github.com/dfinity/orbit / sort

Method sort

libs/orbit-essentials/src/repository.rs:329–336  ·  view source on GitHub ↗
(&self, ids: &mut [Self::IdType])

Source from the content-addressed store, hash-verified

327 type IdType = UUID;
328
329 fn sort(&self, ids: &mut [Self::IdType]) {
330 let direction = self.direction.unwrap_or(SortDirection::Ascending);
331
332 ids.sort_by(|a, b| match direction {
333 SortDirection::Ascending => a.cmp(b),
334 SortDirection::Descending => b.cmp(a),
335 });
336 }
337}
338
339#[cfg(test)]

Callers 9

sortEntriesFunction · 0.45
fetchSNSAssetsFunction · 0.45
fetchCkTokensFunction · 0.45
supportedLocalesFunction · 0.45
sortedNotificationsFunction · 0.45
mapConfiguredMethodCallsFunction · 0.45
assert_controllers_eqFunction · 0.45

Calls 1

sort_byMethod · 0.80

Tested by

no test coverage detected