forge
Explore
Log in

Don't you dare go Hollow

swipe-tracker: Rename retain_recent to trim_history

Browse files at this commit

e4f78c26f01bfc857263ae807b63738db28500fbIvan MolodetskikhParent: 1548db5
src/swipe_tracker.rsmodified+2 -2
@@ -42,7 +42,7 @@ impl SwipeTracker {
42 self.history.push_back(Event { delta, timestamp });42 self.history.push_back(Event { delta, timestamp });
43 self.pos += delta;43 self.pos += delta;
44 44
45- self.retain_recent();45+ self.trim_history();
46 }46 }
47 47
48 /// Returns the current gesture position.48 /// Returns the current gesture position.
@@ -71,7 +71,7 @@ impl SwipeTracker {
71 self.pos - vel / (1000. * DECELERATION_TOUCHPAD.ln())71 self.pos - vel / (1000. * DECELERATION_TOUCHPAD.ln())
72 }72 }
73 73
74- fn retain_recent(&mut self) {74+ fn trim_history(&mut self) {
75 let Some(&Event { timestamp, .. }) = self.history.back() else {75 let Some(&Event { timestamp, .. }) = self.history.back() else {
76 return;76 return;
77 };77 };