refactor(clippy): apply new rust lint fixes

This commit is contained in:
LGUG2Z
2025-04-03 08:41:55 -07:00
parent f4bbee0a2e
commit 7d821cd3db
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -490,7 +490,7 @@ pub fn resolve_home_path<P: AsRef<Path>>(path: P) -> Result<PathBuf> {
Ok(if parent.is_dir() { Ok(if parent.is_dir() {
let file = resolved_path let file = resolved_path
.components() .components()
.last() .next_back()
.ok_or_else(|| anyhow!("cannot parse filename"))?; .ok_or_else(|| anyhow!("cannot parse filename"))?;
dunce::canonicalize(parent)?.join(file) dunce::canonicalize(parent)?.join(file)
} else { } else {
+1 -1
View File
@@ -939,7 +939,7 @@ impl WindowsApi {
pub fn exe(handle: HANDLE) -> Result<String> { pub fn exe(handle: HANDLE) -> Result<String> {
Ok(Self::exe_path(handle)? Ok(Self::exe_path(handle)?
.split('\\') .split('\\')
.last() .next_back()
.ok_or_else(|| anyhow!("there is no last element"))? .ok_or_else(|| anyhow!("there is no last element"))?
.to_string()) .to_string())
} }