File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed
Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -52,8 +52,13 @@ pub mod interpolate {
5252 /// or any other error occurred.
5353 /// It can be used as `home_for_user` parameter in [`Path::interpolate()`][crate::Path::interpolate()].
5454 #[ cfg_attr( windows, allow( unused_variables) ) ]
55+ #[ cfg_attr( all( target_family = "wasm" , not( target_os = "emscripten" ) ) , allow( unused_variables) ) ]
5556 pub fn home_for_user ( name : & str ) -> Option < PathBuf > {
56- #[ cfg( not( any( target_os = "android" , target_os = "windows" ) ) ) ]
57+ #[ cfg( not( any(
58+ target_os = "android" ,
59+ target_os = "windows" ,
60+ all( target_family = "wasm" , not( target_os = "emscripten" ) )
61+ ) ) ) ]
5762 {
5863 let cname = std:: ffi:: CString :: new ( name) . ok ( ) ?;
5964 // SAFETY: calling this in a threaded program that modifies the pw database is not actually safe.
@@ -71,7 +76,11 @@ pub mod interpolate {
7176 Some ( std:: ffi:: OsStr :: from_bytes ( cstr. to_bytes ( ) ) . into ( ) )
7277 }
7378 }
74- #[ cfg( any( target_os = "android" , target_os = "windows" ) ) ]
79+ #[ cfg( any(
80+ target_os = "android" ,
81+ target_os = "windows" ,
82+ all( target_family = "wasm" , not( target_os = "emscripten" ) )
83+ ) ) ]
7584 {
7685 None
7786 }
You can’t perform that action at this time.
0 commit comments