MCPcopy Create free account
hub / github.com/bendudson/EuraliOS / next

Method next

edit/src/main.rs:120–130  ·  view source on GitHub ↗
(&self, cursor: Cursor)

Source from the content-addressed store, hash-verified

118 }
119
120 fn next(&self, cursor: Cursor) -> Option<Cursor> {
121 if cursor.piece == self.pieces.len() {
122 return None; // End of the file
123 }
124 if cursor.pos == self.pieces[cursor.piece].len() - 1 {
125 return Some(Cursor{piece: cursor.piece + 1,
126 pos: 0});
127 }
128 Some(Cursor{piece: cursor.piece,
129 pos: cursor.pos + 1})
130 }
131
132 fn previous(&self, cursor: Cursor) -> Option<Cursor> {
133 if cursor.pos == 0 {

Callers 10

queryMethod · 0.45
mainFunction · 0.45
queryMethod · 0.45
write_stringMethod · 0.45
sys_execFunction · 0.45
initMethod · 0.45
set_ipv4_addrFunction · 0.45
findMethod · 0.45
displayFunction · 0.45
mainFunction · 0.45

Calls 1

lenMethod · 0.45

Tested by

no test coverage detected