warn(Error::TBD);
continue;
};
- for (value, label) in record.labels.into_iter() {
- let value = Value::
- variable.value_labels.insert(value)
+ let Some(width) = variable.width.as_string_width() else {
+ warn(Error::TBD);
+ continue;
+ };
+ for (mut value, label) in record.labels.into_iter() {
+ // XXX warn about too-long value?
+ value.0.resize(width, b' ');
+ // XXX warn abouat duplicat value labels?
+ variable
+ .value_labels
+ .insert(Value::String(value.0.into_boxed_slice()), label);
}
}