Skip to content

Commit 3d2e978

Browse files
authored
refactor: remove generic from TableCollection::simplify (#465)
* The generic was unsound and could lead to UB if sizeof(type) and ABI of type were not identical to NodeId BREAKING CHANGE: removing the generic changes fn signature
1 parent 09f9d4a commit 3d2e978

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/table_collection.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -947,9 +947,9 @@ impl TableCollection {
947947
/// in length to the input node table. For each input node,
948948
/// this vector either contains the node's new index or [`NodeId::NULL`]
949949
/// if the input node is not part of the simplified history.
950-
pub fn simplify<N: Into<NodeId>, O: Into<SimplificationOptions>>(
950+
pub fn simplify<O: Into<SimplificationOptions>>(
951951
&mut self,
952-
samples: &[N],
952+
samples: &[NodeId],
953953
options: O,
954954
idmap: bool,
955955
) -> Result<Option<&[NodeId]>, TskitError> {

0 commit comments

Comments
 (0)