diff options
| author | Ivan Molodetskikh <yalterz@gmail.com> | 2024-03-03 08:04:55 +0400 |
|---|---|---|
| committer | Ivan Molodetskikh <yalterz@gmail.com> | 2024-03-03 08:04:55 +0400 |
| commit | e4f78c26f01bfc857263ae807b63738db28500fb (patch) | |
| tree | e4c592176045464b1fe56c931bd55f0acac5885b | |
| parent | 1548db56ce7cdfcc3bbda4a4cf3603b546f69433 (diff) | |
| download | niri-e4f78c26f01bfc857263ae807b63738db28500fb.tar.gz niri-e4f78c26f01bfc857263ae807b63738db28500fb.tar.bz2 niri-e4f78c26f01bfc857263ae807b63738db28500fb.zip | |
swipe-tracker: Rename retain_recent to trim_history
| -rw-r--r-- | src/swipe_tracker.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/swipe_tracker.rs b/src/swipe_tracker.rs index d7f42778..e4300a72 100644 --- a/src/swipe_tracker.rs +++ b/src/swipe_tracker.rs @@ -42,7 +42,7 @@ impl SwipeTracker { self.history.push_back(Event { delta, timestamp }); self.pos += delta; - self.retain_recent(); + self.trim_history(); } /// Returns the current gesture position. @@ -71,7 +71,7 @@ impl SwipeTracker { self.pos - vel / (1000. * DECELERATION_TOUCHPAD.ln()) } - fn retain_recent(&mut self) { + fn trim_history(&mut self) { let Some(&Event { timestamp, .. }) = self.history.back() else { return; }; |
