Skip to content

Commit

Permalink
refactor: get rid of warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
deltaDelete committed Aug 9, 2023
1 parent 4d835c8 commit 8a07b24
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ pub mod built_info {
include!(concat!(env!("OUT_DIR"), "/built.rs"));
}

fn activate(application: &gtk::Application, args: &Args) {
fn activate(application: &Application, args: &Args) {
// Create a normal GTK window
let window = gtk::Window::builder()
.application(application)
Expand Down Expand Up @@ -96,10 +96,6 @@ impl VlshExt for gtk::Window {
}
}

fn default_monitor() -> u32 {
0
}

struct Args {
/// id of a monitor
monitor: u32,
Expand Down Expand Up @@ -135,12 +131,12 @@ impl Args {
}

fn main() -> ExitCode {
let application = gtk::Application::new(
let application = Application::new(
Some(APP_ID),
gio::ApplicationFlags::HANDLES_COMMAND_LINE,
);

application.connect_activate(|app| {
application.connect_activate(|_app| {
println!("Running in the background");
});

Expand Down Expand Up @@ -207,7 +203,7 @@ fn main() -> ExitCode {
return application.run();
}

fn handle_options(app: &Application, options: &VariantDict) -> i32 {
fn handle_options(_app: &Application, options: &VariantDict) -> i32 {
if options.contains("version") {
println!("{}", built_info::GIT_VERSION.unwrap());
return 0;
Expand Down

0 comments on commit 8a07b24

Please sign in to comment.