Skip to content

Commit

Permalink
Refactor to remove #!feature
Browse files Browse the repository at this point in the history
  • Loading branch information
FieldofClay committed Nov 30, 2023
1 parent 67b09c5 commit c7edb07
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/main.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#![feature(let_chains)]
use hyprland::data::{Monitors, Workspaces};
use hyprland::event_listener::EventListenerMutable as EventListener;
use hyprland::shared::HyprData;
Expand Down Expand Up @@ -68,9 +67,10 @@ fn main() -> Result<()> {
std::process::exit(0);
}
let mon = args[1].to_string();
if let None = Monitors::get()
.expect("unable to get monitors")
.find(|m| m.name == mon) && mon != "_" {
let mon_object = Monitors::get()
.expect("unable to get monitors")
.find(|m| m.name == mon);
if mon_object.is_none() && mon != "_" {
println!("Unable to find monitor {mon}");
std::process::exit(0);
}
Expand Down

0 comments on commit c7edb07

Please sign in to comment.