Skip to content

Commit 1dd9a40

Browse files
authored
Simplify implementation signatures for blittable parameters (#1042)
1 parent 700eb26 commit 1dd9a40

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

crates/gen/src/parser/method_signature.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -480,7 +480,7 @@ impl MethodParam {
480480
let kind = self.signature.kind.gen_name(gen);
481481

482482
if self.param.is_input() {
483-
if self.signature.kind.is_primitive() {
483+
if self.signature.kind.is_blittable() {
484484
quote! { #name }
485485
} else {
486486
quote! { &*(&#name as *const <#kind as ::windows::Abi>::Abi as *const <#kind as ::windows::Abi>::DefaultType) }

tests/implement/tests/com_chain.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,7 @@ impl Test {
2121
Ok(())
2222
}
2323

24-
// TODO: should be able to declare BOOL without a reference.
25-
fn Save(&self, _: &Option<IStream>, _: &BOOL) -> Result<()> {
24+
fn Save(&self, _: &Option<IStream>, _: BOOL) -> Result<()> {
2625
Ok(())
2726
}
2827

0 commit comments

Comments
 (0)