Clarify constructor failures and borrowed API contracts

This commit is contained in:
Samuel Onoja committed 2026-10-22 01:28:03 +01:00
1 parent 23e280a6b4
commit a7fcd69897
55 files changed
+332 -102

No files matched your search

+2
View File
@@ -24,6 +24,7 @@ impl Default for MotionSettings {
}
impl MotionSettings {
#[must_use]
pub fn motion_enabled(self) -> bool {
self.enabled && !self.reduced_motion
}
@@ -53,6 +54,7 @@ impl MotionSettings {
}
/// Only small opacity changes should use a timed duration.
#[must_use]
pub fn duration(self, milliseconds: f64) -> std::time::Duration {
if !self.motion_enabled() {
return std::time::Duration::ZERO;