Update gtk-rs deps for return value nullability trust

This commit is contained in:
Christopher Davis 2022-01-08 22:18:12 -08:00
parent be09d49756
commit fc6d3668c0
3 changed files with 30 additions and 32 deletions

View file

@ -327,7 +327,7 @@ impl LpImageView {
// FIXME: Rework all of this after reading https://cairographics.org/manual/cairo-Image-Surfaces.html
// Since I don't know cairo; See also eog-print.c
operation.connect_draw_page(clone!(@weak pb => move |_, ctx, _| {
let cr = ctx.cairo_context().expect("No cairo context for print context");
let cr = ctx.cairo_context();
cr.set_source_pixbuf(&pb, 0.0, 0.0);
let _ = cr.paint();
}));

View file

@ -364,9 +364,7 @@ impl LpWindow {
}
let display = gdk::Display::default().unwrap();
let monitor = display
.monitor_at_surface(&self.native().unwrap().surface().unwrap())
.unwrap();
let monitor = display.monitor_at_surface(&self.native().unwrap().surface());
let monitor_geometry = monitor.geometry();
let monitor_width = monitor_geometry.width();