Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upMove code to exit servo after writing a screenshot out of composite_specific_target. #7875
Conversation
|
@glennw does something like this seem sensible? I didn't fully test it yet… |
| @@ -478,7 +478,8 @@ impl<Window: WindowMethods> IOCompositor<Window> { | |||
| } | |||
|
|
|||
| (Msg::CreatePng(reply), ShutdownState::NotShuttingDown) => { | |||
| let img = self.composite_specific_target(CompositeTarget::WindowAndPng); | |||
| let res = self.composite_specific_target(CompositeTarget::WindowAndPng); | |||
| let img = res.ok().and_then(|x| x); | |||
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
jgraham
Oct 5, 2015
Author
Contributor
It unwraps a level of Option i.e. Some(Some(img)) becomes Some(img)
This comment has been minimized.
This comment has been minimized.
jgraham
Oct 5, 2015
Author
Contributor
But I guess I'm looking for unwrap_or. The Result and Option APIs are huge :(
|
@jgraham It looks reasonable to me - did you want to do any more testing / changes on it, or is it ready? |
…pecific_target. The structure of this function was confusing, so move some parts out into the caller where they seem like a more natural fit and add documentation of the functions
|
I think it's ready for review. |
|
@bors-servo r+ |
|
|
Move code to exit servo after writing a screenshot out of composite_specific_target. The structure of this function was confusing, so move some parts out into the caller where they seem like a more natural fit and add documentation of the functions <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7875) <!-- Reviewable:end -->
|
|
|
@bors-servo: retry |
|
|
|
|
|
@bors-servo: retry |
|
|
|
|
|
@bors-servo: retry |
|
|
|
|
|
Well, it's the same test that fails each time… |
|
@bors-servo: retry
|
|
Ah, the other kind of OK |
Move code to exit servo after writing a screenshot out of composite_specific_target. The structure of this function was confusing, so move some parts out into the caller where they seem like a more natural fit and add documentation of the functions <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7875) <!-- Reviewable:end -->
|
|
jgraham commentedOct 5, 2015
The structure of this function was confusing, so move some parts out into the
caller where they seem like a more natural fit and add documentation of the
functions