Remove no-op question mark and Ok()

This commit is contained in:
Hugo Osvaldo Barrera
2023-06-18 17:09:59 +02:00
committed by Kenny Levinsen
parent 7525628028
commit 9c97b6aa2c

View File

@@ -29,9 +29,7 @@ fn get_distro_name() -> Result<String, Box<dyn std::error::Error>> {
let os_release = fs::read_to_string("/etc/os-release")?; let os_release = fs::read_to_string("/etc/os-release")?;
let parsed = inish::parse(&os_release)?; let parsed = inish::parse(&os_release)?;
let general = parsed.get("").ok_or("no general section")?; let general = parsed.get("").ok_or("no general section")?;
Ok(maybe_unquote( maybe_unquote(general.get("PRETTY_NAME").ok_or("no pretty name")?)
general.get("PRETTY_NAME").ok_or("no pretty name")?,
)?)
} }
fn get_issue() -> Result<String, Box<dyn std::error::Error>> { fn get_issue() -> Result<String, Box<dyn std::error::Error>> {