Commit 54b81b9a authored by Bilal Elmoussaoui's avatar Bilal Elmoussaoui

Use and_downcast where possible

parent 32c01173
...@@ -33,7 +33,7 @@ mod imp { ...@@ -33,7 +33,7 @@ mod imp {
let obj = self.obj(); let obj = self.obj();
let layout_manager = obj let layout_manager = obj
.layout_manager() .layout_manager()
.map(|l| l.downcast::<gtk::BoxLayout>().unwrap()) .and_downcast::<gtk::BoxLayout>()
.unwrap(); .unwrap();
layout_manager.set_orientation(gtk::Orientation::Vertical); layout_manager.set_orientation(gtk::Orientation::Vertical);
obj.add_css_class("page"); obj.add_css_class("page");
......
...@@ -47,7 +47,7 @@ mod imp { ...@@ -47,7 +47,7 @@ mod imp {
let obj = self.obj(); let obj = self.obj();
let layout_manager = obj let layout_manager = obj
.layout_manager() .layout_manager()
.map(|l| l.downcast::<gtk::BoxLayout>().unwrap()) .and_downcast::<gtk::BoxLayout>()
.unwrap(); .unwrap();
layout_manager.set_orientation(gtk::Orientation::Vertical); layout_manager.set_orientation(gtk::Orientation::Vertical);
self.carousel self.carousel
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment