Skip to content

Commit

Permalink
Win32 structs don't need to implement TypeKind
Browse files Browse the repository at this point in the history
  • Loading branch information
kennykerr committed Dec 10, 2024
1 parent dab0baf commit c89f018
Show file tree
Hide file tree
Showing 270 changed files with 4 additions and 55,261 deletions.
19 changes: 0 additions & 19 deletions crates/libs/bindgen/src/types/cpp_struct.rs
Original file line number Diff line number Diff line change
Expand Up @@ -146,24 +146,6 @@ impl CppStruct {
derive.extend(["Debug", "PartialEq"]);
}

let type_kind = if writer.config.sys {
quote! {}
} else if is_copyable {
quote! {
#cfg
impl windows_core::TypeKind for #name {
type TypeKind = windows_core::CopyType;
}
}
} else {
quote! {
#cfg
impl windows_core::TypeKind for #name {
type TypeKind = windows_core::CloneType;
}
}
};

let default = if writer.config.sys {
quote! {}
} else {
Expand Down Expand Up @@ -230,7 +212,6 @@ impl CppStruct {
#constants
#manual_clone
#default
#type_kind
};

for nested in self.nested.values() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,6 @@ impl Default for HID_XFER_PACKET {
unsafe { core::mem::zeroed() }
}
}
impl windows_core::TypeKind for HID_XFER_PACKET {
type TypeKind = windows_core::CopyType;
}
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct VHF_CONFIG {
Expand Down Expand Up @@ -73,6 +70,3 @@ impl Default for VHF_CONFIG {
unsafe { core::mem::zeroed() }
}
}
impl windows_core::TypeKind for VHF_CONFIG {
type TypeKind = windows_core::CopyType;
}
Loading

0 comments on commit c89f018

Please sign in to comment.