MCPcopy Create free account
hub / github.com/bytecodealliance/wasmtime / slice_shifting

Function slice_shifting

cranelift/bforest/src/lib.rs:171–182  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

169
170 #[test]
171 fn slice_shifting() {
172 let mut a = ['a', 'b', 'c', 'd'];
173
174 slice_shift(&mut a[0..1], 1);
175 assert_eq!(a, ['a', 'b', 'c', 'd']);
176
177 slice_shift(&mut a[1..], 1);
178 assert_eq!(a, ['a', 'c', 'd', 'd']);
179
180 slice_shift(&mut a, 2);
181 assert_eq!(a, ['d', 'd', 'd', 'd']);
182 }
183}

Callers

nothing calls this directly

Calls 1

slice_shiftFunction · 0.85

Tested by

no test coverage detected