Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit f0b95fc

Browse files
committedJun 23, 2024
fix build
1 parent eb265d0 commit f0b95fc

File tree

1 file changed

+1
-2
lines changed
  • std/src/sys/pal/unix

1 file changed

+1
-2
lines changed
 

‎std/src/sys/pal/unix/os.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -748,8 +748,7 @@ pub fn home_dir() -> Option<PathBuf> {
748748
&mut result,
749749
) {
750750
0 if !result.is_null() => {
751-
let passwd = p.assume_init();
752-
let ptr = passwd.pw_dir as *const _;
751+
let ptr = (*result).pw_dir as *const _;
753752
let bytes = CStr::from_ptr(ptr).to_bytes().to_vec();
754753
Some(OsStringExt::from_vec(bytes))
755754
}

0 commit comments

Comments
 (0)
Failed to load comments.