Unnamed repository; edit this file 'description' to name the repository.
refactor: remove boxing
shogo-nakano-desu 2023-09-20
parent 96c3332 · commit dd84306
-rw-r--r--crates/flycheck/src/lib.rs6
1 files changed, 2 insertions, 4 deletions
diff --git a/crates/flycheck/src/lib.rs b/crates/flycheck/src/lib.rs
index 6143331392..2de719af92 100644
--- a/crates/flycheck/src/lib.rs
+++ b/crates/flycheck/src/lib.rs
@@ -488,9 +488,7 @@ impl CargoActor {
// Skip certain kinds of messages to only spend time on what's useful
JsonMessage::Cargo(message) => match message {
cargo_metadata::Message::CompilerArtifact(artifact) if !artifact.fresh => {
- self.sender
- .send(CargoMessage::CompilerArtifact(Box::new(artifact)))
- .unwrap();
+ self.sender.send(CargoMessage::CompilerArtifact(artifact)).unwrap();
}
cargo_metadata::Message::CompilerMessage(msg) => {
self.sender.send(CargoMessage::Diagnostic(msg.message)).unwrap();
@@ -535,7 +533,7 @@ impl CargoActor {
}
enum CargoMessage {
- CompilerArtifact(Box<cargo_metadata::Artifact>),
+ CompilerArtifact(cargo_metadata::Artifact),
Diagnostic(Diagnostic),
}