apply clippy corrections

This commit is contained in:
yggverse 2025-06-26 14:19:18 +03:00
parent 33807e03ac
commit aafd3b5db3
2 changed files with 3 additions and 4 deletions

View File

@ -285,15 +285,14 @@ impl Dialog for PreferencesDialog {
g.add(&{ g.add(&{
let c = e.time().difference(info.event[i].time()).as_milliseconds(); // current let c = e.time().difference(info.event[i].time()).as_milliseconds(); // current
let s = e.time().difference(t).as_milliseconds(); // sum let s = e.time().difference(t).as_milliseconds(); // sum
let a = row( row(
e.name(), e.name(),
if c == s { if c == s {
format!("+{c} ms") format!("+{c} ms")
} else { } else {
format!("+{c} / {s} ms") format!("+{c} / {s} ms")
}, },
); )
a
}) })
} }
g g

View File

@ -32,7 +32,7 @@ impl Format for usize {
pub fn uri_to_title(uri: &gtk::glib::Uri) -> gtk::glib::GString { pub fn uri_to_title(uri: &gtk::glib::Uri) -> gtk::glib::GString {
let path = uri.path(); let path = uri.path();
if path.split('/').last().unwrap_or_default().is_empty() { if path.split('/').next_back().unwrap_or_default().is_empty() {
match uri.host() { match uri.host() {
Some(host) => host, Some(host) => host,
None => "Untitled".into(), None => "Untitled".into(),