Skip to content

Commit f1c8e56

Browse files
Format exclude_from_content_indexing
1 parent 9d96a88 commit f1c8e56

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

crates/cargo-util/src/paths.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -685,9 +685,12 @@ fn exclude_from_content_indexing(path: &Path) {
685685
use winapi::um::fileapi::{GetFileAttributesW, SetFileAttributesW};
686686
use winapi::um::winnt::FILE_ATTRIBUTE_NOT_CONTENT_INDEXED;
687687

688-
let lp_path: Vec<u16> = path.as_os_str().encode_wide().chain(once(0)).collect();
688+
let path: Vec<u16> = path.as_os_str().encode_wide().chain(once(0)).collect();
689689
unsafe {
690-
SetFileAttributesW(lp_path.as_ptr(), GetFileAttributesW(lp_path.as_ptr()) | FILE_ATTRIBUTE_NOT_CONTENT_INDEXED);
690+
SetFileAttributesW(
691+
path.as_ptr(),
692+
GetFileAttributesW(path.as_ptr()) | FILE_ATTRIBUTE_NOT_CONTENT_INDEXED
693+
);
691694
}
692695
} else {
693696
let _ = path;

0 commit comments

Comments
 (0)