Change ToNsCssValue to take the ownership of value.

This commit is contained in:
Xidorn Quan 2017-05-16 09:47:22 +10:00
parent f733958f2e
commit 138fa4ca08
4 changed files with 41 additions and 41 deletions

View file

@ -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);
}