MCPcopy Create free account
hub / github.com/hashintel/hash / try_scan_empty

Function try_scan_empty

libs/@local/hashql/core/src/intern/beef.rs:893–903  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

891
892 #[test]
893 fn try_scan_empty() {
894 let heap = Heap::new();
895 let interner = InternSet::new(&heap);
896 let original = interner.intern_slice(&[] as &[i32]);
897
898 let mut beef = Beef::new(original);
899 let result: Result<(), &str> = beef.try_scan(|_prev, x| Ok(x * 2));
900
901 assert_eq!(result, Ok(()));
902 assert_eq!(beef.as_slice(), &[] as &[i32]);
903 }
904
905 #[test]
906 fn try_scan_cumulative_sum() {

Callers

nothing calls this directly

Calls 3

OkInterface · 0.85
intern_sliceMethod · 0.80
try_scanMethod · 0.80

Tested by

no test coverage detected