Skip to content

Commit

Permalink
NodeTable::metadata now uses Into<NodeId>. (#134)
Browse files Browse the repository at this point in the history
Missed this in #129
  • Loading branch information
molpopgen authored Jul 21, 2021
1 parent 3ac3d50 commit 8bf7d4b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/node_table.rs
Original file line number Diff line number Diff line change
Expand Up @@ -141,11 +141,11 @@ impl<'a> NodeTable<'a> {
unsafe_tsk_column_access!(row.into().0, 0, self.num_rows(), self.table_.individual)
}

pub fn metadata<T: metadata::MetadataRoundtrip>(
pub fn metadata<N: Into<crate::NodeId>, T: metadata::MetadataRoundtrip>(
&'a self,
row: tsk_id_t,
row: N,
) -> Result<Option<T>, TskitError> {
let buffer = metadata_to_vector!(self, row)?;
let buffer = metadata_to_vector!(self, row.into().0)?;
decode_metadata_row!(T, buffer)
}

Expand Down

0 comments on commit 8bf7d4b

Please sign in to comment.