We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c1441a5 commit b3833cfCopy full SHA for b3833cf
crates/libs/core/src/strings/pcwstr.rs
@@ -32,15 +32,15 @@ impl PCWSTR {
32
///
33
/// The `PCWSTR`'s pointer needs to be valid for reads up until and including the next `\0`.
34
pub unsafe fn len(&self) -> usize {
35
- #[cfg(target_os = "windows")]
+ #[cfg(windows)]
36
let len = {
37
extern "C" {
38
fn wcslen(s: *const u16) -> usize;
39
}
40
wcslen(self.0)
41
};
42
43
- #[cfg(not(target_os = "windows"))]
+ #[cfg(not(windows))]
44
45
let mut len = 0;
46
let mut ptr = self.0;
0 commit comments