Change get_attr() to get_attr_val_for_layout().

The old code was used by both layout and script, but was erroneously
borrowing for the layout case (which causes parallelism
problems). script now uses only `value_ref()` or `get_attribute()`, and
layout now has its own unsafe version that dances around the borrows of
`@mut Attr`.
This commit is contained in:
Jack Moffitt 2014-01-22 17:02:21 -07:00
parent 539cf58f73
commit c443bcbfff
9 changed files with 50 additions and 34 deletions

View file

@ -65,6 +65,10 @@ impl Attr {
util::swap(&mut self.value, &mut value);
value
}
pub fn value_ref<'a>(&'a self) -> &'a str {
self.value.as_slice()
}
}
impl Attr {