don't deref in the macros
This commit is contained in:
parent
5a06b04a6a
commit
621bd9c9ab
|
@ -66,7 +66,7 @@ pub fn initialise_call_frame(stack: &mut Stack, init: uintptr_t, args: &[uintptr
|
|||
.. Registers::new()
|
||||
};
|
||||
|
||||
match into_fields!(regs { rdi, r13, r14, r15 } <- args.iter()) {
|
||||
match into_fields!(regs { rdi, r13, r14, r15 } <- args.iter().cloned()) {
|
||||
Some(mut args) => if args.next().is_some() {
|
||||
panic!("too many arguments")
|
||||
},
|
||||
|
|
|
@ -2,7 +2,7 @@ macro_rules! __into_fields {
|
|||
($x:ident { $field:ident } <- $iter:ident) => {
|
||||
match $iter.next() {
|
||||
Some(value) => {
|
||||
$x.$field = *value;
|
||||
$x.$field = value;
|
||||
Some($iter)
|
||||
}
|
||||
None => None
|
||||
|
@ -11,7 +11,7 @@ macro_rules! __into_fields {
|
|||
($x:ident { $field:ident, $($fields_rest:ident),* } <- $iter:ident) => {
|
||||
match $iter.next() {
|
||||
Some(value) => {
|
||||
$x.$field = *value;
|
||||
$x.$field = value;
|
||||
__into_fields!($x { $($fields_rest),* } <- $iter)
|
||||
}
|
||||
None => None
|
||||
|
|
Loading…
Reference in New Issue