From 20b31be19efa74afb84a383f31ae156eb1c4dfc5 Mon Sep 17 00:00:00 2001 From: hodasemi Date: Mon, 21 Aug 2023 12:26:30 +0200 Subject: [PATCH] glib fixes --- rust/serial_reader/src/main.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/rust/serial_reader/src/main.rs b/rust/serial_reader/src/main.rs index 8d571e3..4ad423f 100644 --- a/rust/serial_reader/src/main.rs +++ b/rust/serial_reader/src/main.rs @@ -11,7 +11,7 @@ use gtk::{Application, ApplicationWindow}; use gtk::{Button, Entry, Orientation, ScrolledWindow}; -use glib; +use glib::{self, source::Priority, ControlFlow}; mod port; use port::*; @@ -54,7 +54,7 @@ fn main() { master_box.pack_end(&scrolled_window, true, true, 3); master_box.pack_end(&top_bar_box, false, true, 3); - let (tx, rx) = glib::MainContext::channel(glib::PRIORITY_DEFAULT); + let (tx, rx) = glib::MainContext::channel(Priority::DEFAULT); std::thread::spawn(move || { // loop forever @@ -147,7 +147,7 @@ fn main() { serial_info.scroll_to_iter(&mut buffer.end_iter(), 0.0, true, 0.0, 0.0); } - glib::Continue(true) + ControlFlow::Continue }); window.add(&master_box);