aee08b5
diff --git a/cargo.sh b/cargo.sh
aee08b5
index c4be97b..9ba7ed7 100755
aee08b5
--- a/cargo.sh
aee08b5
+++ b/cargo.sh
aee08b5
@@ -14,9 +14,5 @@ export CARGO_TARGET_DIR
80357c2
 
aee08b5
 cd "$SOURCE_DIR"
80357c2
 
aee08b5
-# the 'run" command takes arguments at the end,
aee08b5
-# so --manifest-path must not be last
aee08b5
-CMD="$1"
aee08b5
-shift
aee08b5
-cargo "$CMD" --manifest-path "$CARGO_TARGET_DIR"/Cargo.toml "$@"
aee08b5
+cargo "$@"
80357c2
 
aee08b5
diff --git a/meson.build b/meson.build
aee08b5
index 559bb30..12cb612 100644
aee08b5
--- a/meson.build
aee08b5
+++ b/meson.build
aee08b5
@@ -61,32 +61,6 @@ summary = [
aee08b5
 ]
aee08b5
 message('\n'.join(summary))
80357c2
 
aee08b5
-# Rust deps are changing, depending on compile flags. Cargo can't handle it alone.
aee08b5
-cargo_toml_in = files('Cargo.toml.in')
aee08b5
-path_data = configuration_data()
aee08b5
-path_data.set('path', meson.source_root())
aee08b5
-cargo_toml_base = configure_file(
aee08b5
-    input: 'Cargo.toml.in',
aee08b5
-    output: 'Cargo.toml.base',
aee08b5
-    configuration: path_data,
aee08b5
-)
aee08b5
-
aee08b5
-
aee08b5
-cargo_deps = files('Cargo.deps')
aee08b5
-
aee08b5
-if get_option('legacy') == true
aee08b5
-    cargo_build_flags += ['--features', 'gtk_v0_5,gio_v0_5']
aee08b5
-    cargo_deps = files('Cargo.deps.legacy')
aee08b5
-endif
aee08b5
-    
aee08b5
-cat = find_program('cat')
aee08b5
-cargo_toml = custom_target(
aee08b5
-    'Cargo.toml',
aee08b5
-    output: 'Cargo.toml',
aee08b5
-    command: [cat, cargo_toml_base, cargo_deps],
aee08b5
-    capture: true,
aee08b5
-)
aee08b5
-
aee08b5
 dep_cargo = find_program('cargo')
aee08b5
 cargo_script = find_program('cargo.sh')
aee08b5
 cargo_build = find_program('cargo_build.sh')
8961911
diff --git a/src/layout.rs b/src/layout.rs
aee08b5
index 41515bc..b1cae8e 100644
8961911
--- a/src/layout.rs
8961911
+++ b/src/layout.rs
aee08b5
@@ -107,8 +107,8 @@ pub mod c {
8961911
 
8961911
     impl Bounds {
8961911
         pub fn contains(&self, point: &Point) -> bool {
8961911
-            (point.x > self.x && point.x < self.x + self.width
8961911
-                && point.y > self.y && point.y < self.y + self.height)
8961911
+            point.x > self.x && point.x < self.x + self.width
8961911
+                && point.y > self.y && point.y < self.y + self.height
8961911
         }
8961911
     }
8961911
 
aee08b5
diff --git a/src/meson.build b/src/meson.build
aee08b5
index 0106381..31bda17 100644
aee08b5
--- a/src/meson.build
aee08b5
+++ b/src/meson.build
aee08b5
@@ -56,8 +56,7 @@ rslibs = custom_target(
aee08b5
     output: ['librs.a'],
aee08b5
     install: false,
aee08b5
     console: true,
aee08b5
-    command: [cargo_build] + ['@OUTPUT@', '--lib'] + cargo_build_flags,
aee08b5
-    depends: cargo_toml,
aee08b5
+    command: [cargo_build] + ['@OUTPUT@', '--lib'] + cargo_build_flags
aee08b5
 )
aee08b5
 
aee08b5
 build_rstests = custom_target(
aee08b5
@@ -72,7 +71,7 @@ build_rstests = custom_target(
aee08b5
     install: false,
aee08b5
     console: true,
aee08b5
     command: [cargo_script, 'test', '--no-run'] + cargo_build_flags,
aee08b5
-    depends: [rslibs, cargo_toml], # no point building tests if the code itself fails
aee08b5
+    depends: rslibs # no point building tests if the code itself fails
aee08b5
 )
aee08b5
 
aee08b5
 test(
aee08b5
@@ -81,7 +80,7 @@ test(
aee08b5
     args: ['test'] + cargo_build_flags,
aee08b5
     # this is a whole Carg-based test suite, let it run for a while
aee08b5
     timeout: 900,
aee08b5
-    depends: [build_rstests, cargo_toml],
aee08b5
+    depends: build_rstests,
aee08b5
 )
aee08b5
 
aee08b5
 libsqueekboard = static_library('libsqueekboard',
80357c2
diff --git a/src/popover.rs b/src/popover.rs
aee08b5
index 65551a2..4077b8a 100644
80357c2
--- a/src/popover.rs
80357c2
+++ b/src/popover.rs
aee08b5
@@ -14,12 +14,9 @@ use ::resources;
aee08b5
 // Traits
80357c2
 use gio::ActionMapExt;
80357c2
 use gio::SettingsExt;
aee08b5
-#[cfg(feature = "gio_v0_5")]
80357c2
-use gio::SimpleActionExt;
80357c2
+use gtk::prelude::BuilderExtManual;
80357c2
 use glib::translate::FromGlibPtrNone;
80357c2
 use glib::variant::ToVariant;
aee08b5
-#[cfg(not(feature = "gtk_v0_5"))]
aee08b5
-use gtk::BuilderExtManual;
80357c2
 use gtk::PopoverExt;
aee08b5
 use gtk::WidgetExt;
aee08b5
 use std::io::Write;
aee08b5
@@ -131,7 +128,7 @@ fn make_menu_builder(inputs: Vec<(&str, OwnedTranslation)>) -> gtk::Builder {
d3e167b
   </menu>
d3e167b
 </interface>"
d3e167b
     ).unwrap();
d3e167b
-    gtk::Builder::new_from_string(
d3e167b
+    gtk::Builder::from_string(
d3e167b
         &String::from_utf8(xml).expect("Bad menu definition")
d3e167b
     )
d3e167b
 }
aee08b5
@@ -158,7 +155,7 @@ fn get_settings(schema_name: &str) -> Option<gio::Settings> {
80357c2
 fn set_layout(kind: String, name: String) {
8961911
     let settings = get_settings("org.gnome.desktop.input-sources");
8961911
     if let Some(settings) = settings {
8961911
-        let inputs = settings.get_value("sources").unwrap();
aee08b5
+    	let inputs = settings.get_value("sources");
8961911
         let current = (kind.clone(), name.clone());
8961911
         let inputs = variants::get_tuples(inputs).into_iter()
8961911
             .filter(|t| t != ¤t;;
aee08b5
@@ -312,7 +309,7 @@ pub fn show(
8961911
     let settings = get_settings("org.gnome.desktop.input-sources");
8961911
     let inputs = settings
8961911
         .map(|settings| {
8961911
-            let inputs = settings.get_value("sources").unwrap();
8961911
+            let inputs = settings.get_value("sources");
8961911
             variants::get_tuples(inputs)
8961911
         })
8961911
         .unwrap_or_else(|| Vec::new());
aee08b5
@@ -365,7 +362,7 @@ pub fn show(
d3e167b
     // than add items imperatively
d3e167b
     let model: gio::MenuModel = builder.get_object("app-menu").unwrap();
d3e167b
 
d3e167b
-    let menu = gtk::Popover::new_from_model(Some(&window), &model);
d3e167b
+    let menu = gtk::Popover::from_model(Some(&window), &model);
d3e167b
     menu.set_pointing_to(&gtk::Rectangle {
d3e167b
         x: position.x.ceil() as i32,
d3e167b
         y: position.y.ceil() as i32,
80357c2
diff --git a/src/style.rs b/src/style.rs
aee08b5
index 153431a..2d7d539 100644
80357c2
--- a/src/style.rs
80357c2
+++ b/src/style.rs
80357c2
@@ -99,13 +99,13 @@ fn get_theme_name(settings: &gtk::Settings) -> GtkTheme {
80357c2
             name: {
80357c2
                 settings.get_property("gtk-theme-name")
80357c2
                     .or_print(logging::Problem::Surprise, "No theme name")
80357c2
-                    .and_then(|value| value.get::<String>())
80357c2
+                    .and_then(|value| value.get::<String>().unwrap())
80357c2
                     .unwrap_or(DEFAULT_THEME_NAME.into())
80357c2
             },
80357c2
             variant: {
80357c2
                 settings.get_property("gtk-application-prefer-dark-theme")
80357c2
                     .or_print(logging::Problem::Surprise, "No settings key")
80357c2
-                    .and_then(|value| value.get::<bool>())
80357c2
+                    .and_then(|value| value.get::<bool>().unwrap())
80357c2
                     .and_then(|dark_preferred| match dark_preferred {
80357c2
                         true => Some("dark".into()),
80357c2
                         false => None,
aee08b5
diff --git a/tools/meson.build b/tools/meson.build
aee08b5
index 75a7e17..cc8b83b 100644
aee08b5
--- a/tools/meson.build
aee08b5
+++ b/tools/meson.build
aee08b5
@@ -15,6 +15,5 @@ test_layout = custom_target('squeekboard-test-layout',
aee08b5
     command: [cargo_build, '--rename', 'test_layout', '@OUTPUT@', '--bin', 'test_layout']
aee08b5
         + cargo_build_flags,
aee08b5
     install: true,
aee08b5
-    install_dir: bindir,
aee08b5
-    depends: cargo_toml,
aee08b5
+    install_dir: bindir
411c953
 )
411c953