mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-08 09:38:26 +03:00
refactor: remove boxing
This commit is contained in:
@@ -488,9 +488,7 @@ fn run(self) -> io::Result<(bool, String)> {
|
||||
// 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 @@ fn run(self) -> io::Result<(bool, String)> {
|
||||
}
|
||||
|
||||
enum CargoMessage {
|
||||
CompilerArtifact(Box<cargo_metadata::Artifact>),
|
||||
CompilerArtifact(cargo_metadata::Artifact),
|
||||
Diagnostic(Diagnostic),
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user