clippy: fix char-comparison and map_or lints
All checks were successful
dev release / build (push) Successful in 1m52s
All checks were successful
dev release / build (push) Successful in 1m52s
(cherry picked from commit 2e393082a744fe85f1ca1f8c6af48ce288e64b6c)
This commit is contained in:
parent
cd7465a18b
commit
9c4205b1b2
2 changed files with 2 additions and 2 deletions
|
|
@ -402,7 +402,7 @@ fn read_crumbs_profile() -> Option<String> {
|
||||||
for line in text.lines() {
|
for line in text.lines() {
|
||||||
if let Some(rest) = line.trim().strip_prefix("profile") {
|
if let Some(rest) = line.trim().strip_prefix("profile") {
|
||||||
let val = rest
|
let val = rest
|
||||||
.trim_start_matches(|c: char| c == ' ' || c == '=')
|
.trim_start_matches([' ', '='])
|
||||||
.trim_matches('"');
|
.trim_matches('"');
|
||||||
if !val.is_empty() {
|
if !val.is_empty() {
|
||||||
return Some(val.to_string());
|
return Some(val.to_string());
|
||||||
|
|
|
||||||
|
|
@ -1023,7 +1023,7 @@ impl SimpleComponent for App {
|
||||||
|
|
||||||
let within_linger = self
|
let within_linger = self
|
||||||
.media_paused_at
|
.media_paused_at
|
||||||
.map_or(true, |t| t.elapsed().as_secs() < 30 * 60);
|
.is_none_or(|t| t.elapsed().as_secs() < 30 * 60);
|
||||||
self.media_last = Some(state);
|
self.media_last = Some(state);
|
||||||
reveal_media(&self.media_widget, within_linger);
|
reveal_media(&self.media_widget, within_linger);
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue