From 899709ca3b284b90afeb71673d8cf50f84fc7b23 Mon Sep 17 00:00:00 2001 From: allthemusicllc Date: Wed, 28 Aug 2019 06:24:48 -0500 Subject: [PATCH] Removed function to enforce invariants on partition depth and number of notes in MIDI sequence, moved to utils mod. --- src/directives.rs | 8 -------- 1 file changed, 8 deletions(-) diff --git a/src/directives.rs b/src/directives.rs index 3371e4e8..222692a2 100644 --- a/src/directives.rs +++ b/src/directives.rs @@ -49,12 +49,6 @@ fn parse_max_files_argument<'a>(matches: &clap::ArgMatches<'a>) -> f32 { max_files } -fn enforce_num_notes_partition_depth_relation(num_notes: u32, partition_depth: u32) { - if partition_depth > num_notes { - panic!("Partition depth must not be greater than the length of the provided MIDI note sequence"); - } -} - /****************************/ /***** Single Directive *****/ /****************************/ @@ -130,7 +124,6 @@ impl<'a> From<&clap::ArgMatches<'a>> for BatchDirectiveArgs { // Parse partition_depth argument as integer let partition_depth = parse_partition_depth_argument(matches); - enforce_num_notes_partition_depth_relation(sequence.notes.len() as u32, partition_depth); // Parse max_files argument and set default if not provided let max_files = parse_max_files_argument(matches); @@ -247,7 +240,6 @@ impl<'a> From<&clap::ArgMatches<'a>> for PartitionDirectiveArgs { // Parse partition_depth argument as integer let partition_depth = parse_partition_depth_argument(matches); - enforce_num_notes_partition_depth_relation(sequence.notes.len() as u32, partition_depth); // Parse max_files argument and set default if not provided let max_files = parse_max_files_argument(matches);