From 14c0066a534ebdd72ed68b2723bfece58f383e64 Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Mon, 28 Dec 2020 13:19:37 +1000 Subject: [PATCH] simplify NoteField init in test; add other bad chars --- rslib/src/notetype/fields.rs | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/rslib/src/notetype/fields.rs b/rslib/src/notetype/fields.rs index 99e855e0f..008f17a10 100644 --- a/rslib/src/notetype/fields.rs +++ b/rslib/src/notetype/fields.rs @@ -56,12 +56,7 @@ mod test { #[test] fn name() { - let mut field = NoteField { - ord: None, - name: String::new(), - config: NoteFieldConfig::default(), - }; - field.name = " # / te{st} ".into(); + let mut field = NoteField::new(" # /^ t:e{s\"t} "); field.fix_name(); assert_eq!(&field.name, "test"); }