Skip to content

Commit b3833cf

Browse files
committed
Use simpler #[cfg(windows)]
1 parent c1441a5 commit b3833cf

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

crates/libs/core/src/strings/pcwstr.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,15 +32,15 @@ impl PCWSTR {
3232
///
3333
/// The `PCWSTR`'s pointer needs to be valid for reads up until and including the next `\0`.
3434
pub unsafe fn len(&self) -> usize {
35-
#[cfg(target_os = "windows")]
35+
#[cfg(windows)]
3636
let len = {
3737
extern "C" {
3838
fn wcslen(s: *const u16) -> usize;
3939
}
4040
wcslen(self.0)
4141
};
4242

43-
#[cfg(not(target_os = "windows"))]
43+
#[cfg(not(windows))]
4444
let len = {
4545
let mut len = 0;
4646
let mut ptr = self.0;

0 commit comments

Comments
 (0)