[gnome-tour: 1/2] src/widgets/paginator.rs: Simplify if statement using clippy




commit b53b12ca57b68453f2c3bc0264760b08d0e74674
Author: Joshua Peisach <itzswirlz2020 outlook com>
Date:   Tue Feb 16 17:34:44 2021 -0500

    src/widgets/paginator.rs: Simplify if statement using clippy
    
    (cargo-clippy lint tool)

 src/widgets/paginator.rs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/src/widgets/paginator.rs b/src/widgets/paginator.rs
index fa8a897..d489c82 100644
--- a/src/widgets/paginator.rs
+++ b/src/widgets/paginator.rs
@@ -76,7 +76,7 @@ impl PaginatorWidget {
         let last_page = n_pages - 1.0;
 
         let (opacity_finish, opacity_previous, opacity_start, opacity_next) =
-            if (0.0 <= position) && (position < 1.0) {
+            if (0.0..1.0).contains(&position) {
                 (0.0, position, 1.0, position)
             } else if (0.0 <= position) && (position <= forelast_page) {
                 (0.0, 1.0, 1f64 - position, 1.0)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]