mirror of
https://github.com/servo/servo.git
synced 2025-08-24 14:48:21 +01:00
Change ToNsCssValue to take the ownership of value.
This commit is contained in:
parent
f733958f2e
commit
138fa4ca08
4 changed files with 41 additions and 41 deletions
|
@ -191,7 +191,7 @@ impl nsCSSValue {
|
|||
}
|
||||
|
||||
/// Generic set from any value that implements the ToNsCssValue trait.
|
||||
pub fn set_from<T: ToNsCssValue>(&mut self, value: &T) {
|
||||
pub fn set_from<T: ToNsCssValue>(&mut self, value: T) {
|
||||
value.convert(self)
|
||||
}
|
||||
|
||||
|
@ -311,5 +311,5 @@ impl IndexMut<usize> for nsCSSValue_Array {
|
|||
/// Generic conversion to nsCSSValue
|
||||
pub trait ToNsCssValue {
|
||||
/// Convert
|
||||
fn convert(&self, nscssvalue: &mut nsCSSValue);
|
||||
fn convert(self, nscssvalue: &mut nsCSSValue);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue