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 {
52
52
/// or any other error occurred.
53
53
/// It can be used as `home_for_user` parameter in [`Path::interpolate()`][crate::Path::interpolate()].
54
54
#[ cfg_attr( windows, allow( unused_variables) ) ]
55
+ #[ cfg_attr( all( target_family = "wasm" , not( target_os = "emscripten" ) ) , allow( unused_variables) ) ]
55
56
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
+ ) ) ) ]
57
62
{
58
63
let cname = std:: ffi:: CString :: new ( name) . ok ( ) ?;
59
64
// SAFETY: calling this in a threaded program that modifies the pw database is not actually safe.
@@ -71,7 +76,11 @@ pub mod interpolate {
71
76
Some ( std:: ffi:: OsStr :: from_bytes ( cstr. to_bytes ( ) ) . into ( ) )
72
77
}
73
78
}
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
+ ) ) ]
75
84
{
76
85
None
77
86
}
You can’t perform that action at this time.
0 commit comments