instance: None,
},
Some((col, instance)) => Entry {
- col: String::from(col),
- instance: Some(String::from(instance)),
+ col: String::from(col.trim()),
+ instance: Some(String::from(instance.trim())),
},
}
}
instance: Some(String::from("bar"))
}
);
+ assert_eq!(
+ Entry::from("foo: bar"),
+ Entry {
+ col: String::from("foo"),
+ instance: Some(String::from("bar"))
+ }
+ );
}
#[test]