|
45 | 45 | async fn initialize_component_factory_with(&self, config: &Value) -> Result<()> { |
46 | 46 | let Ok(config) = serde_json::from_value::<Config>(config.clone()) else { |
47 | 47 | return Err(Error::internal_error() |
48 | | - .with_message(format!("unable to transform json into config: {}", config))); |
| 48 | + .with_message(format!("unable to transform json into config: {config}"))); |
49 | 49 | }; |
50 | 50 |
|
51 | 51 | debug!("updating with configuration: {config:?}"); |
@@ -78,7 +78,7 @@ impl TryFrom<&str> for SupportedCommands { |
78 | 78 | match value { |
79 | 79 | "sysdig-lsp.execute-scan" => Ok(SupportedCommands::ExecuteBaseImageScan), |
80 | 80 | "sysdig-lsp.execute-build-and-scan" => Ok(SupportedCommands::ExecuteBuildAndScan), |
81 | | - _ => Err(format!("command not supported: {}", value)), |
| 81 | + _ => Err(format!("command not supported: {value}")), |
82 | 82 | } |
83 | 83 | } |
84 | 84 | } |
@@ -264,7 +264,7 @@ where |
264 | 264 |
|
265 | 265 | async fn execute_command(&self, params: ExecuteCommandParams) -> Result<Option<Value>> { |
266 | 266 | let command: SupportedCommands = params.command.as_str().try_into().map_err(|e| { |
267 | | - Error::internal_error().with_message(format!("unable to parse command: {}", e)) |
| 267 | + Error::internal_error().with_message(format!("unable to parse command: {e}")) |
268 | 268 | })?; |
269 | 269 |
|
270 | 270 | let result = match command { |
@@ -355,10 +355,10 @@ async fn execute_command_build_and_scan<C: LSPClient>( |
355 | 355 | let mut factory = server.component_factory.write().await; |
356 | 356 |
|
357 | 357 | let image_scanner = factory.image_scanner().map_err(|e| { |
358 | | - Error::internal_error().with_message(format!("unable to create image scanner: {}", e)) |
| 358 | + Error::internal_error().with_message(format!("unable to create image scanner: {e}")) |
359 | 359 | })?; |
360 | 360 | let image_builder = factory.image_builder().map_err(|e| { |
361 | | - Error::internal_error().with_message(format!("unable to create image builder: {}", e)) |
| 361 | + Error::internal_error().with_message(format!("unable to create image builder: {e}")) |
362 | 362 | })?; |
363 | 363 |
|
364 | 364 | (image_scanner, image_builder) |
|
0 commit comments