diff --git a/src/tests.rs b/src/tests.rs index 3b9df58..571550a 100644 --- a/src/tests.rs +++ b/src/tests.rs @@ -109,5 +109,5 @@ fn test_custom_tests() { let func1 = PluginTestFunc::new(func1, "henlo"); let func2 = PluginTestFunc::new(func2, "fail"); let funcs = vec![func1, func2]; - plugin_tests("libtest",funcs); + plugin_tests(String::from("libtest"), funcs); } diff --git a/src/utils/plugin.rs b/src/utils/plugin.rs index 73f8625..435c72d 100644 --- a/src/utils/plugin.rs +++ b/src/utils/plugin.rs @@ -116,7 +116,7 @@ impl FnOnce<()> for PluginTestFunc { unsafe impl Send for PluginTestFunc {} unsafe impl Sync for PluginTestFunc {} -pub fn plugin_tests(plugig_name: &'static str, tests: Vec) { +pub fn plugin_tests(plugin_name: impl AsRef, tests: Vec) { use std::thread; let mut running = String::from(""); @@ -146,7 +146,7 @@ pub fn plugin_tests(plugig_name: &'static str, tests: Vec) { let mut buffer = String::from(""); buffer += &format!( "\n----------- Plugin Tests for {} -----------\n\n", - plugig_name + plugin_name.as_ref() ); buffer += &format!("running {} tests:\n", running_index); buffer += &running;