Skip to content

Commit

Permalink
fix clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
j-lanson committed Aug 21, 2024
1 parent c9b9f14 commit eb68e05
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 11 deletions.
23 changes: 13 additions & 10 deletions hipcheck/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ use crate::cache::HcCache;
use crate::context::Context as _;
use crate::error::Error;
use crate::error::Result;
use crate::plugin::{HcPluginCore, Plugin, PluginExecutor};
use crate::plugin::{HcPluginCore, Plugin, PluginExecutor, PluginWithConfig};
use crate::session::session::Session;
use crate::setup::{resolve_and_transform_source, SourceType};
use crate::shell::verbosity::Verbosity;
Expand Down Expand Up @@ -642,15 +642,18 @@ fn cmd_plugin() {
let rt = Runtime::new().unwrap();
rt.block_on(async move {
println!("Started executor");
let mut core =
match HcPluginCore::new(plugin_executor, vec![(plugin, serde_json::json!(null))]).await
{
Ok(c) => c,
Err(e) => {
println!("{e}");
return;
}
};
let mut core = match HcPluginCore::new(
plugin_executor,
vec![PluginWithConfig(plugin, serde_json::json!(null))],
)
.await
{
Ok(c) => c,
Err(e) => {
println!("{e}");
return;
}
};
match core.run().await {
Ok(_) => {
println!("HcCore run completed");
Expand Down
2 changes: 1 addition & 1 deletion hipcheck/src/plugin/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ impl HcPluginCore {
}
// @Temporary
pub async fn run(&mut self) -> Result<()> {
let channel = self.plugins.get_mut(&"rand_data".to_owned()).unwrap();
let channel = self.plugins.get_mut("rand_data").unwrap();
match channel
.send(Query {
id: 1,
Expand Down

0 comments on commit eb68e05

Please sign in to comment.