Merge pull request 'fix(cli): remove need for debug in harmony-cli' (#15) from harmony-cli-remove-debug into master

Reviewed-on: https://git.nationtech.io/NationTech/harmony/pulls/15
Reviewed-by: johnride <jg@nationtech.io>
This commit is contained in:
johnride 2025-04-23 18:55:06 +00:00
commit ff830486af

View File

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