File tree Expand file tree Collapse file tree 1 file changed +5
-0
lines changed
Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -27,6 +27,11 @@ pub struct Tree {
2727impl Tree {
2828 #[ time( "debug" , "Tree::{}" ) ]
2929 pub fn new ( lineages : Vec < String > , sequences : Vec < Vec < u8 > > ) -> Result < Self > {
30+ assert ! ( u32 :: try_from( lineages. len( ) ) . is_ok( ) ,
31+ "Hello Future!! Seems like we are finally having Billions of sequences in our databases. Neat!\n
32+ This unfortunately breaks some stuff, but don't despair!\n
33+ Just change u32 to usize for the data structures storing sequence indices in the Tree-struct and fix any casting errors.\n
34+ P.S. If you bring this to my attention I will put you on a leaderboard or something!" ) ;
3035 let mut root = Node :: new ( String :: from ( "root" ) , 0 , NodeType :: Inner ) ;
3136 let mut sequence_map: HashMap < Vec < u8 > , Vec < u32 > > =
3237 sequences. iter ( ) . map ( |s| ( s. clone ( ) , Vec :: new ( ) ) ) . collect ( ) ;
You can’t perform that action at this time.
0 commit comments