get rid of warnings

This commit is contained in:
Ward from fusion-voyager-3 2024-06-22 19:48:53 +03:00
parent 112f56ad9c
commit 9e5e1c6770
6 changed files with 8 additions and 26 deletions

View File

@ -2,12 +2,10 @@ use crate::APP_GITHUB;
use crate::APP_ICON;
use crate::APP_ID;
use crate::VERSION;
use crate::{content, kernel_pkg, sched_ext, KernelBranch};
use crate::{content, KernelBranch};
use adw::prelude::*;
use adw::*;
use glib::property::PropertyGet;
use glib::{clone, MainContext};
use gtk::prelude::*;
use gtk::*;
use std::cell::RefCell;
use std::process::Command;

View File

@ -1,11 +1,8 @@
use crate::{kernel_pkg, sched_ext, KernelBranch, RunningKernelInfo};
use adw::prelude::*;
use adw::ExpanderRow;
use async_channel::Receiver;
use duct::cmd;
use glib::property::PropertyGet;
use glib::*;
use gtk::prelude::*;
use gtk::*;
use homedir::get_my_home;
use std::cell::RefCell;
@ -408,7 +405,7 @@ fn get_kernel_branches() -> Result<Vec<KernelBranch>, reqwest::Error> {
println!("{}", t!("db_download_complete"));
println!("{} {} {}", t!("db_init_script_run_p1"), &branch.name, t!("db_init_script_run_p2"));
match cmd!("bash", "-c", &branch.init_script).run() {
Ok(t) => println!("{} {}", &branch.name, t!("db_init_script_successful")),
Ok(_) => println!("{} {}", &branch.name, t!("db_init_script_successful")),
_ => println!("{} {}", &branch.name, t!("db_init_script_failed")),
};
kernel_branches_array.push(branch)

View File

@ -1,9 +1,9 @@
use std::{cell::RefCell, env, rc::Rc, sync::OnceLock};
use std::{cell::RefCell, sync::OnceLock};
use adw::*;
use adw::{prelude::*, subclass::prelude::*, *};
use glib::{clone, subclass::Signal, Properties};
use gtk::{glib, Orientation::Horizontal};
use adw::{prelude::*, subclass::prelude::*};
use glib::{subclass::Signal, Properties};
use gtk::{glib};
// ANCHOR: custom_button
// Object holding the state

View File

@ -1,14 +1,10 @@
use crate::content::get_running_kernel_info;
use crate::{kernel_package_row, KernelBranch, RunningKernelInfo};
use crate::{kernel_package_row, KernelBranch};
use adw::prelude::*;
use duct::cmd;
use glib::*;
use gtk::prelude::*;
use gtk::*;
use std::cell::RefCell;
use std::error::Error;
use std::fs;
use std::fs::*;
use std::io::BufRead;
use std::io::BufReader;
use std::process::Command;

View File

@ -8,7 +8,6 @@ use std::fs;
use rust_i18n::Backend;
use std::collections::HashMap;
use std::env;
use std::fmt::format;
use adw::prelude::*;
use gtk::{gio,gdk,CssProvider};
@ -61,6 +60,7 @@ struct RunningKernelInfo {
sched: String,
}
#[allow(dead_code)]
#[derive(Clone)]
struct KernelBranch {
name: String,

View File

@ -1,14 +1,9 @@
use crate::content::get_running_kernel_info;
use crate::{KernelBranch, RunningKernelInfo};
use adw::prelude::*;
use duct::cmd;
use glib::*;
use gtk::prelude::*;
use gtk::AccessibleRole::Command;
use gtk::*;
use std::cell::RefCell;
use std::fs::*;
use std::process::Stdio;
use std::rc::Rc;
use std::time::Duration;
use std::{fs, io, thread};
@ -20,10 +15,6 @@ pub fn sched_ext_page(content_stack: &gtk::Stack, window: &adw::ApplicationWindo
.orientation(Orientation::Vertical)
.build();
let kernel_badges_size_group = gtk::SizeGroup::new(SizeGroupMode::Both);
let kernel_badges_size_group0 = gtk::SizeGroup::new(SizeGroupMode::Both);
let kernel_badges_size_group1 = gtk::SizeGroup::new(SizeGroupMode::Both);
let main_icon = gtk::Image::builder()
.pixel_size(128)
.halign(Align::Center)