remove need for debug in harmony-cli

This commit is contained in:
Taha Hawa 2025-04-23 14:53:36 -04:00
parent 53aa47f91e
commit da83019d85

View File

@ -42,7 +42,7 @@ pub struct Args {
list: bool, list: bool,
} }
fn maestro_scores_filter<T: Topology + std::fmt::Debug + Send + Sync + 'static>( fn maestro_scores_filter<T: Topology>(
maestro: &harmony::maestro::Maestro<T>, maestro: &harmony::maestro::Maestro<T>,
all: bool, all: bool,
filter: Option<String>, filter: Option<String>,
@ -71,9 +71,7 @@ fn maestro_scores_filter<T: Topology + std::fmt::Debug + Send + Sync + 'static>(
} }
// TODO: consider adding doctest for this function // TODO: consider adding doctest for this function
fn list_scores_with_index<T: Topology + std::fmt::Debug + Send + Sync + 'static>( fn list_scores_with_index<T: Topology>(scores_vec: &Vec<Box<dyn Score<T>>>) -> String {
scores_vec: &Vec<Box<dyn Score<T>>>,
) -> String {
let mut display_str = String::new(); let mut display_str = String::new();
for (i, s) in scores_vec.iter().enumerate() { for (i, s) in scores_vec.iter().enumerate() {
let name = s.name(); let name = s.name();
@ -82,7 +80,7 @@ fn list_scores_with_index<T: Topology + std::fmt::Debug + Send + Sync + 'static>
return display_str; return display_str;
} }
pub async fn init<T: Topology + std::fmt::Debug + Send + Sync + 'static>( pub async fn init<T: Topology + Send + Sync + 'static>(
maestro: harmony::maestro::Maestro<T>, maestro: harmony::maestro::Maestro<T>,
args_struct: Option<Args>, args_struct: Option<Args>,
) -> Result<(), Box<dyn std::error::Error>> { ) -> Result<(), Box<dyn std::error::Error>> {
@ -293,8 +291,6 @@ mod test {
let res = crate::maestro_scores_filter(&maestro, false, None, 0); let res = crate::maestro_scores_filter(&maestro, false, None, 0);
println!("{:#?}", res);
assert!(res.len() == 1); assert!(res.len() == 1);
assert!( assert!(
@ -311,8 +307,6 @@ mod test {
let res = crate::maestro_scores_filter(&maestro, false, None, 11); let res = crate::maestro_scores_filter(&maestro, false, None, 11);
println!("{:#?}", res);
assert!(res.len() == 0); assert!(res.len() == 0);
} }
} }