Skip to content

Commit 53c851b

Browse files
committed
x
1 parent 6e9e2a1 commit 53c851b

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

crates/stdlib/src/overlapped.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@ mod _overlapped {
309309
let mut addr: SOCKADDR_IN = unsafe { core::mem::zeroed() };
310310
addr.sin_family = AF_INET;
311311

312-
let host_wide: Vec<u16> = host.as_str().encode_utf16().chain([0]).collect();
312+
let host_wide: Vec<u16> = host.as_wtf8().encode_wide().chain([0]).collect();
313313
let mut addr_len = core::mem::size_of::<SOCKADDR_IN>() as i32;
314314

315315
let ret = unsafe {
@@ -348,7 +348,7 @@ mod _overlapped {
348348
let mut addr: SOCKADDR_IN6 = unsafe { core::mem::zeroed() };
349349
addr.sin6_family = AF_INET6;
350350

351-
let host_wide: Vec<u16> = host.as_str().encode_utf16().chain([0]).collect();
351+
let host_wide: Vec<u16> = host.as_wtf8().encode_wide().chain([0]).collect();
352352
let mut addr_len = core::mem::size_of::<SOCKADDR_IN6>() as i32;
353353

354354
let ret = unsafe {

crates/vm/src/stdlib/typevar.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,10 +66,9 @@ pub(crate) mod typevar {
6666
// Special handling for certain module names
6767
if let Ok(name_str) = module_name.str(vm)
6868
&& let Some(name) = name_str.to_str()
69+
&& (name == "builtins" || name.starts_with('<'))
6970
{
70-
if name == "builtins" || name.starts_with('<') {
71-
return Ok(());
72-
}
71+
return Ok(());
7372
}
7473
module_name
7574
} else {

0 commit comments

Comments
 (0)