ICFP 2007 Contest: https://web.archive.org/web/20090301164728/https://save-endo.cs.uu.nl/

Get rid of quotes in Template Display, since consecutive groups are common and unnreadable

Changed files
+3 -3
dna2rna
+3 -3
dna2rna/src/template.rs
···
TemplateItem::Base(b) => write!(f, "{}", b.to_char()),
TemplateItem::Ref(n, l) => {
if *l == 0 {
-
write!(f, "\"{}\"", n)
+
write!(f, "{{{}}}", n)
} else {
-
write!(f, "\"{},{}\"", n, l)
+
write!(f, "{{{},{}}}", n, l)
}
}
TemplateItem::Len(n) => {
···
fn test_display_ref() {
assert_eq!(
Template::new(vec![TemplateItem::Ref(3, 2), TemplateItem::Ref(4, 0),]).to_string(),
-
"\"3,2\"\"4\""
+
"{3,2}{4}"
);
}