Skip to content

Commit

Permalink
Refactor waveform follow type selection to use first() for improved…
Browse files Browse the repository at this point in the history
… readability
  • Loading branch information
samclane committed Dec 13, 2024
1 parent 4002cde commit 3f512fb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/ui.rs
Original file line number Diff line number Diff line change
Expand Up @@ -281,11 +281,11 @@ pub fn handle_screencap(
let selected_text = match &waveform.follow_type {
FollowType::All => "All".to_string(),
FollowType::Monitor(monitors) => monitors
.get(0)
.first()
.map(|m| m.name().to_string())
.unwrap_or("Monitor".to_string()),
FollowType::Window(windows) => windows
.get(0)
.first()
.map(|w| w.title().to_string())
.unwrap_or("Window".to_string()),
FollowType::Subregion(_) => "Subregion".to_string(),
Expand Down

0 comments on commit 3f512fb

Please sign in to comment.