You've already forked KernelSU-Next
mirror of
https://github.com/KernelSU-Next/KernelSU-Next.git
synced 2025-08-27 23:46:34 +00:00
ksud: fix clippy warning/error
This commit is contained in:
@@ -14,7 +14,7 @@ fn get_git_version() -> Result<(u32, String), std::io::Error> {
|
||||
let version_code: u32 = version_code
|
||||
.trim()
|
||||
.parse()
|
||||
.map_err(|_| std::io::Error::new(std::io::ErrorKind::Other, "Failed to parse git count"))?;
|
||||
.map_err(|_| std::io::Error::other("Failed to parse git count"))?;
|
||||
let version_code = 10000 + 200 + version_code; // For historical reasons
|
||||
|
||||
let version_name = String::from_utf8(
|
||||
@@ -23,12 +23,8 @@ fn get_git_version() -> Result<(u32, String), std::io::Error> {
|
||||
.output()?
|
||||
.stdout,
|
||||
)
|
||||
.map_err(|_| {
|
||||
std::io::Error::new(
|
||||
std::io::ErrorKind::Other,
|
||||
"Failed to read git describe stdout",
|
||||
)
|
||||
})?;
|
||||
.map_err(|_| std::io::Error::other("Failed to read git describe stdout"))?;
|
||||
|
||||
let version_name = version_name.trim_start_matches('v').to_string();
|
||||
Ok((version_code, version_name))
|
||||
}
|
||||
|
||||
@@ -192,6 +192,7 @@ fn is_ok_empty(dir: &str) -> bool {
|
||||
}
|
||||
}
|
||||
|
||||
#[allow(deprecated)]
|
||||
fn find_temp_path() -> String {
|
||||
use std::result::Result::Ok;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user