fn define_multi(&mut self, names: &[Name], value: &Value) {
        if names.len() == 1 {
            self.define(names[0].clone(), &value);
        } else {
            let values = value.clone().iter_items();
            if values.len() > names.len() {
                panic!(
                    "Expected {} values, but got {}",
                    names.len(),
                    values.len(),
                )
            } else {
                let mut values = values.iter();
                for name in names {
                    self.define(
                        name.clone(),
                        &values.next().unwrap_or(&Value::Null),
                    )
                }
            }
        }
    }
/// Define multiple names from a value that is a list.
/// Special case: in names is a single name, value is used directly.
Define multiple names from a value that is a list.
Special case: in names is a single name, value is used directly.
Define multiple names from a value that is a list . Special case : in names is a single name value is used directly .
fn define_multi(&mut self, names: &[Name], value: &Value) {
        if names.len() == 1 {
            self.define(names[0].clone(), &value);
        } else {
            let values = value.clone().iter_items();
            if values.len() > names.len() {
                panic!(
                    "Expected {} values, but got {}",
                    names.len(),
                    values.len(),
                )
            } else {
                let mut values = values.iter();
                for name in names {
                    self.define(
                        name.clone(),
                        &values.next().unwrap_or(&Value::Null),
                    )
                }
            }
        }
    }
fn define_multi ( & mut self , names : & [ Name ] , value : & Value ) { if names . len ( ) == 1 { self . define ( names [ 0 ] . clone ( ) , & value ) ; } else { let values = value . clone ( ) . iter_items ( ) ; if values . len ( ) > names . len ( ) { panic ! ( " " names len ( ) values len ( ) ) } else { let mut values = values . iter ( ) ; for name in names { self . define ( name . clone ( ) , & values . next ( ) . unwrap_or ( & Value :: Null ) , ) } } } }
Define multiple names from a value that is a list.
Define multiple names from a value that is a list .
&mut self
names
&[Name]
value
&Value
&mut self
names
&[Name]
value
&Value