Skip to content

Commit 94c99d4

Browse files
committed
build: update Rust to 1.88
1 parent 0e459db commit 94c99d4

File tree

5 files changed

+14
-15
lines changed

5 files changed

+14
-15
lines changed

flake.lock

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/app/commands.rs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -84,14 +84,13 @@ where
8484
let image_for_selected_line =
8585
self.image_from_line(line, &document_text).ok_or_else(|| {
8686
Error::parse_error().with_message(format!(
87-
"unable to retrieve image for the selected line: {}",
88-
line
87+
"unable to retrieve image for the selected line: {line}"
8988
))
9089
})?;
9190

9291
self.show_message(
9392
MessageType::INFO,
94-
format!("Starting scan of {}...", image_for_selected_line).as_str(),
93+
format!("Starting scan of {image_for_selected_line}...").as_str(),
9594
)
9695
.await;
9796

@@ -102,7 +101,7 @@ where
102101

103102
self.show_message(
104103
MessageType::INFO,
105-
format!("Finished scan of {}.", image_for_selected_line).as_str(),
104+
format!("Finished scan of {image_for_selected_line}.").as_str(),
106105
)
107106
.await;
108107

@@ -178,7 +177,7 @@ where
178177

179178
self.show_message(
180179
MessageType::INFO,
181-
format!("Starting build of {}...", uri_without_file_path).as_str(),
180+
format!("Starting build of {uri_without_file_path}...").as_str(),
182181
)
183182
.await;
184183

src/app/lsp_server.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ where
4545
async fn initialize_component_factory_with(&self, config: &Value) -> Result<()> {
4646
let Ok(config) = serde_json::from_value::<Config>(config.clone()) else {
4747
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}")));
4949
};
5050

5151
debug!("updating with configuration: {config:?}");
@@ -78,7 +78,7 @@ impl TryFrom<&str> for SupportedCommands {
7878
match value {
7979
"sysdig-lsp.execute-scan" => Ok(SupportedCommands::ExecuteBaseImageScan),
8080
"sysdig-lsp.execute-build-and-scan" => Ok(SupportedCommands::ExecuteBuildAndScan),
81-
_ => Err(format!("command not supported: {}", value)),
81+
_ => Err(format!("command not supported: {value}")),
8282
}
8383
}
8484
}
@@ -264,7 +264,7 @@ where
264264

265265
async fn execute_command(&self, params: ExecuteCommandParams) -> Result<Option<Value>> {
266266
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}"))
268268
})?;
269269

270270
let result = match command {
@@ -355,10 +355,10 @@ async fn execute_command_build_and_scan<C: LSPClient>(
355355
let mut factory = server.component_factory.write().await;
356356

357357
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}"))
359359
})?;
360360
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}"))
362362
})?;
363363

364364
(image_scanner, image_builder)

src/infra/lsp_logger.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,6 @@ impl tracing::field::Visit for StringVisitor {
5555
if !self.message.is_empty() {
5656
self.message.push(' ');
5757
}
58-
self.message.push_str(&format!("{:?}", value));
58+
self.message.push_str(&format!("{value:?}"));
5959
}
6060
}

src/infra/scanner_binary_manager.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ impl ScannerBinaryManager {
177177
fn binary_path_for_version(&self, version: &Version) -> PathBuf {
178178
let mut cache_dir = dirs::cache_dir().unwrap_or_else(|| PathBuf::from("."));
179179
cache_dir.push("sysdig-cli-scanner");
180-
cache_dir.push(format!("sysdig-cli-scanner.{}", version));
180+
cache_dir.push(format!("sysdig-cli-scanner.{version}"));
181181
cache_dir
182182
}
183183
}

0 commit comments

Comments
 (0)