Skip to content

Commit

Permalink
refactor: remove boxing
Browse files Browse the repository at this point in the history
  • Loading branch information
shogo-nakano-desu committed Sep 20, 2023
1 parent 96c3332 commit dd84306
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions crates/flycheck/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -535,7 +533,7 @@ impl CargoActor {
}

enum CargoMessage {
CompilerArtifact(Box<cargo_metadata::Artifact>),
CompilerArtifact(cargo_metadata::Artifact),
Diagnostic(Diagnostic),
}

Expand Down

0 comments on commit dd84306

Please sign in to comment.