]> git.lizzy.rs Git - rust.git/blobdiff - src/shims/windows/foreign_items.rs
some clippy-induced cleanup
[rust.git] / src / shims / windows / foreign_items.rs
index 1a9b2300f723cddf5ad0ef8d11fc1f42fe4df0a7..08a319159bc590c9827428b20f73604724bc5e65 100644 (file)
@@ -28,7 +28,7 @@ fn emulate_foreign_item_by_name(
         // DWORD = ULONG = u32
         // BOOL = i32
         // BOOLEAN = u8
-        match &*link_name.as_str() {
+        match link_name.as_str() {
             // Environment related shims
             "GetEnvironmentVariableW" => {
                 let [name, buf, size] =
@@ -415,6 +415,10 @@ fn emulate_foreign_item_by_name(
                 // There is only one thread, so this always succeeds and returns TRUE.
                 this.write_scalar(Scalar::from_i32(1), dest)?;
             }
+            "GetCurrentThread" if this.frame_in_std() => {
+                let [] = this.check_shim(abi, Abi::System { unwind: false }, link_name, args)?;
+                this.write_scalar(Scalar::from_machine_isize(1, this), dest)?;
+            }
 
             _ => return Ok(EmulateByNameResult::NotSupported),
         }