mirror of
https://github.com/servo/servo.git
synced 2025-08-05 21:50:18 +01:00
Eliminate pointless copies of ImageResponseMsg in the image task.
This commit is contained in:
parent
10d9bad973
commit
853d7c4819
1 changed files with 5 additions and 6 deletions
|
@ -58,13 +58,12 @@ pub enum ImageResponseMsg {
|
|||
|
||||
impl Eq for ImageResponseMsg {
|
||||
fn eq(&self, other: &ImageResponseMsg) -> bool {
|
||||
// FIXME: Bad copies
|
||||
match (self.clone(), other.clone()) {
|
||||
(ImageReady(..), ImageReady(..)) => fail!("unimplemented comparison"),
|
||||
(ImageNotReady, ImageNotReady) => true,
|
||||
(ImageFailed, ImageFailed) => true,
|
||||
match (self, other) {
|
||||
(&ImageReady(..), &ImageReady(..)) => fail!("unimplemented comparison"),
|
||||
(&ImageNotReady, &ImageNotReady) => true,
|
||||
(&ImageFailed, &ImageFailed) => true,
|
||||
|
||||
(ImageReady(..), _) | (ImageNotReady, _) | (ImageFailed, _) => false
|
||||
(&ImageReady(..), _) | (&ImageNotReady, _) | (&ImageFailed, _) => false
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue