mirror of
https://gitlab.com/gabmus/envision.git
synced 2025-04-19 19:14:53 +00:00
chore: clippy
This commit is contained in:
parent
2fc33b10b0
commit
25c90d175f
2 changed files with 5 additions and 5 deletions
|
@ -49,13 +49,13 @@ impl LinuxDistro {
|
|||
Ok(_) if buf.starts_with("PRETTY_NAME=\"") => {
|
||||
return buf
|
||||
.split('=')
|
||||
.last()
|
||||
.next_back()
|
||||
.map(|b| b.trim().trim_matches('"').trim().to_string());
|
||||
}
|
||||
Ok(_) if buf.starts_with("NAME=\"") => {
|
||||
name = buf
|
||||
.split('=')
|
||||
.last()
|
||||
.next_back()
|
||||
.map(|b| b.trim().trim_matches('"').trim().to_string());
|
||||
}
|
||||
_ => {}
|
||||
|
@ -79,7 +79,7 @@ impl LinuxDistro {
|
|||
{
|
||||
let name = buf
|
||||
.split('=')
|
||||
.last()
|
||||
.next_back()
|
||||
.unwrap_or_default()
|
||||
.trim()
|
||||
.trim_matches('"')
|
||||
|
|
|
@ -33,7 +33,7 @@ pub fn create_about_dialog() -> adw::AboutDialog {
|
|||
const UNKNOWN: &str = "UNKNOWN";
|
||||
|
||||
pub fn populate_debug_info(dialog: &adw::AboutDialog, vkinfo: Option<&VulkanInfo>) {
|
||||
if dialog.debug_info().len() > 0 {
|
||||
if !dialog.debug_info().is_empty() {
|
||||
return;
|
||||
}
|
||||
let distro_family = LinuxDistro::get();
|
||||
|
@ -70,7 +70,7 @@ pub fn populate_debug_info(dialog: &adw::AboutDialog, vkinfo: Option<&VulkanInfo
|
|||
.and_then(|s| {
|
||||
s.split("\n")
|
||||
.find(|line| line.starts_with("model name"))
|
||||
.map(|line| line.split(':').last().map(|s| s.trim().to_string()))
|
||||
.map(|line| line.split(':').next_back().map(|s| s.trim().to_string()))
|
||||
})
|
||||
.flatten()
|
||||
.unwrap_or(UNKNOWN.into())
|
||||
|
|
Loading…
Add table
Reference in a new issue