Skip to content

Commit 4984aca

Browse files
authored
refactor: macros only use newtype public API. (#420)
1 parent 28f5eb8 commit 4984aca

File tree

1 file changed

+19
-19
lines changed

1 file changed

+19
-19
lines changed

src/_macros.rs

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -619,9 +619,9 @@ macro_rules! node_table_add_row_details {
619619
$crate::bindings::tsk_node_table_add_row(
620620
&mut $table,
621621
$flags.into().bits(),
622-
$time.into().0,
623-
$population.into().0,
624-
$individual.into().0,
622+
$time.into().into(),
623+
$population.into().into(),
624+
$individual.into().into(),
625625
$metadata,
626626
$metadata_len,
627627
)
@@ -699,10 +699,10 @@ macro_rules! edge_table_add_row_details {
699699
let rv = unsafe {
700700
$crate::bindings::tsk_edge_table_add_row(
701701
&mut $table,
702-
$left.into().0,
703-
$right.into().0,
704-
$parent.into().0,
705-
$child.into().0,
702+
$left.into().into(),
703+
$right.into().into(),
704+
$parent.into().into(),
705+
$child.into().into(),
706706
$metadata,
707707
$metadata_len,
708708
)
@@ -882,10 +882,10 @@ macro_rules! mutation_table_add_row_details {
882882
let rv = unsafe {
883883
$crate::bindings::tsk_mutation_table_add_row(
884884
&mut $table,
885-
$site.into().0,
886-
$node.into().0,
887-
$parent.into().0,
888-
$time.into().0,
885+
$site.into().into(),
886+
$node.into().into(),
887+
$parent.into().into(),
888+
$time.into().into(),
889889
dstate.0,
890890
dstate.1,
891891
$metadata,
@@ -963,7 +963,7 @@ macro_rules! site_table_add_row_details {
963963
let rv = unsafe {
964964
$crate::bindings::tsk_site_table_add_row(
965965
&mut $table,
966-
$position.into().0,
966+
$position.into().into(),
967967
astate.0,
968968
astate.1,
969969
$metadata,
@@ -1020,12 +1020,12 @@ macro_rules! migration_table_add_row_details {
10201020
let rv = unsafe {
10211021
$crate::bindings::tsk_migration_table_add_row(
10221022
&mut $table,
1023-
$span.0.into().0,
1024-
$span.1.into().0,
1025-
$node.into().0,
1026-
$source_dest.0.into().0,
1027-
$source_dest.1.into().0,
1028-
$time.into().0,
1023+
$span.0.into().into(),
1024+
$span.1.into().into(),
1025+
$node.into().into(),
1026+
$source_dest.0.into().into(),
1027+
$source_dest.1.into().into(),
1028+
$time.into().into(),
10291029
$metadata,
10301030
$metadata_len,
10311031
)
@@ -1136,7 +1136,7 @@ macro_rules! raw_metadata_getter_for_tables {
11361136
self,
11371137
self.as_ref().metadata,
11381138
self.as_ref().metadata_offset,
1139-
row.0,
1139+
row.into(),
11401140
self.num_rows().into(),
11411141
self.as_ref().metadata_length,
11421142
)

0 commit comments

Comments
 (0)