servo/rust-azure — pull request #94 by dotdash (2014-08-16 15:42:01+00:00)
Title: Fix dangling pointer causing corrupted output in fill_rect

The `draw_options` variable within the match expression is only valid
for the duration of the match expression, but by using an unsafe pointer
the code manages to violate the lifetime rules and creates a pointer
to it that's outlives the match expression.

Instead of creating a copy of the AzDrawOptions in the match, we can get
a ref to the one contained in the Option and hand out of pointer to that
one, which lives long enough.

Refs servo/servo#3084.