[fractal/fractal-next] qr-code: Use self direclty



commit 5d83951e715a5d06497b9dc9c6560f2842ac5daa
Author: Julian Sparber <julian sparber net>
Date:   Mon Dec 6 15:17:57 2021 +0100

    qr-code: Use self direclty

 src/contrib/qr_code.rs | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
---
diff --git a/src/contrib/qr_code.rs b/src/contrib/qr_code.rs
index 44cbde8c..28a37f95 100644
--- a/src/contrib/qr_code.rs
+++ b/src/contrib/qr_code.rs
@@ -119,13 +119,11 @@ pub(crate) mod imp {
             orientation: gtk::Orientation,
             for_size: i32,
         ) -> (i32, i32, i32, i32) {
-            let self_ = imp::QRCode::from_instance(widget);
-
             let stride = widget.block_size() as i32;
 
             let minimum = match orientation {
-                gtk::Orientation::Horizontal => self_.data.borrow().width * stride,
-                gtk::Orientation::Vertical => self_.data.borrow().height * stride,
+                gtk::Orientation::Horizontal => self.data.borrow().width * stride,
+                gtk::Orientation::Vertical => self.data.borrow().height * stride,
                 _ => unreachable!(),
             };
             let natural = std::cmp::max(for_size, minimum);


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