MCPcopy Index your code
hub / github.com/aws/clock-bound / pop

Function pop

clock-bound/src/daemon/clock_sync_algorithm/ring_buffer.rs:303–313  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

301
302 #[test]
303 fn pop() {
304 let mut buffer = RingBuffer::new(NonZeroUsize::new(3).unwrap());
305 buffer.push(1);
306 buffer.push(2);
307 buffer.push(3);
308
309 assert_eq!(buffer.pop(), Some(1));
310 assert_eq!(buffer.pop(), Some(2));
311 assert_eq!(buffer.pop(), Some(3));
312 assert_eq!(buffer.pop(), None);
313 }
314
315 #[test]
316 fn min_rtt() {

Callers

nothing calls this directly

Calls 2

newFunction · 0.50
pushMethod · 0.45

Tested by

no test coverage detected