From bfdeeb7c83129a46f694de321c66c90f427b98b5 Mon Sep 17 00:00:00 2001 From: "Kevin R. Thornton" Date: Tue, 31 Jan 2023 10:17:24 -0800 Subject: [PATCH] refactor: remove generic from TableCollection::simplify * 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 --- src/table_collection.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/table_collection.rs b/src/table_collection.rs index 4268970d9..685d3fc3a 100644 --- a/src/table_collection.rs +++ b/src/table_collection.rs @@ -947,9 +947,9 @@ impl TableCollection { /// in length to the input node table. For each input node, /// this vector either contains the node's new index or [`NodeId::NULL`] /// if the input node is not part of the simplified history. - pub fn simplify, O: Into>( + pub fn simplify>( &mut self, - samples: &[N], + samples: &[NodeId], options: O, idmap: bool, ) -> Result, TskitError> {