Resolve clippy errors and warnings

This commit is contained in:
topjohnwu
2023-05-30 22:23:11 -07:00
parent 665c6bdc4b
commit 9ea9f01933
7 changed files with 246 additions and 282 deletions

View File

@@ -95,7 +95,7 @@ pub fn ptr_to_str_result<'a, T>(ptr: *const T) -> Result<&'a str, StrErr> {
} else {
unsafe { CStr::from_ptr(ptr.cast()) }
.to_str()
.map_err(|e| StrErr::from(e))
.map_err(StrErr::from)
}
}