MCPcopy Create free account
hub / github.com/cosdata/cosdata / last

Method last

src/models/atomic_array.rs:66–74  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

64 }
65
66 pub fn last(&self) -> Option<*mut T> {
67 for i in (0..N).rev() {
68 let ptr = self.items[i].load(Ordering::SeqCst);
69 if !ptr.is_null() {
70 return Some(ptr);
71 }
72 }
73 None
74 }
75
76 pub fn get(&self, idx: usize) -> Option<*mut T> {
77 if idx >= N {

Callers

nothing calls this directly

Calls 1

loadMethod · 0.80

Tested by

no test coverage detected