mirror of
https://gitlab.com/gabmus/envision.git
synced 2025-08-03 14:49:04 +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=\"") => {
|
Ok(_) if buf.starts_with("PRETTY_NAME=\"") => {
|
||||||
return buf
|
return buf
|
||||||
.split('=')
|
.split('=')
|
||||||
.last()
|
.next_back()
|
||||||
.map(|b| b.trim().trim_matches('"').trim().to_string());
|
.map(|b| b.trim().trim_matches('"').trim().to_string());
|
||||||
}
|
}
|
||||||
Ok(_) if buf.starts_with("NAME=\"") => {
|
Ok(_) if buf.starts_with("NAME=\"") => {
|
||||||
name = buf
|
name = buf
|
||||||
.split('=')
|
.split('=')
|
||||||
.last()
|
.next_back()
|
||||||
.map(|b| b.trim().trim_matches('"').trim().to_string());
|
.map(|b| b.trim().trim_matches('"').trim().to_string());
|
||||||
}
|
}
|
||||||
_ => {}
|
_ => {}
|
||||||
|
@ -79,7 +79,7 @@ impl LinuxDistro {
|
||||||
{
|
{
|
||||||
let name = buf
|
let name = buf
|
||||||
.split('=')
|
.split('=')
|
||||||
.last()
|
.next_back()
|
||||||
.unwrap_or_default()
|
.unwrap_or_default()
|
||||||
.trim()
|
.trim()
|
||||||
.trim_matches('"')
|
.trim_matches('"')
|
||||||
|
|
|
@ -33,7 +33,7 @@ pub fn create_about_dialog() -> adw::AboutDialog {
|
||||||
const UNKNOWN: &str = "UNKNOWN";
|
const UNKNOWN: &str = "UNKNOWN";
|
||||||
|
|
||||||
pub fn populate_debug_info(dialog: &adw::AboutDialog, vkinfo: Option<&VulkanInfo>) {
|
pub fn populate_debug_info(dialog: &adw::AboutDialog, vkinfo: Option<&VulkanInfo>) {
|
||||||
if dialog.debug_info().len() > 0 {
|
if !dialog.debug_info().is_empty() {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
let distro_family = LinuxDistro::get();
|
let distro_family = LinuxDistro::get();
|
||||||
|
@ -70,7 +70,7 @@ pub fn populate_debug_info(dialog: &adw::AboutDialog, vkinfo: Option<&VulkanInfo
|
||||||
.and_then(|s| {
|
.and_then(|s| {
|
||||||
s.split("\n")
|
s.split("\n")
|
||||||
.find(|line| line.starts_with("model name"))
|
.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()
|
.flatten()
|
||||||
.unwrap_or(UNKNOWN.into())
|
.unwrap_or(UNKNOWN.into())
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue