Use the correct to-static impl for sending escaped strings via hotreload (#2753)

This commit is contained in:
Jonathan Kelley authored and GitHub committed 2024-07-30 23:06:44 -05:00
1 parent 828cc502f1
commit 189772a17b
3 files changed
+16 -16

No files matched your search

+9
View File
@@ -408,4 +408,13 @@ mod tests {
println!("{}", input.to_string_with_quotes());
assert!(input.is_static());
}
#[test]
fn to_static() {
let input = syn::parse2::<IfmtInput>(quote! { "body {{ background: red; }}" }).unwrap();
assert_eq!(
input.to_static(),
Some("body { background: red; }".to_string())
);
}
}