From c5fc4a64a6ea388e33cc4d758fbf2a17269a9e61 Mon Sep 17 00:00:00 2001 From: Kogia-sima Date: Sun, 7 Jun 2020 23:01:24 +0900 Subject: [PATCH] Use `escape_to_string` in tests --- sailfish/src/runtime/escape/mod.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sailfish/src/runtime/escape/mod.rs b/sailfish/src/runtime/escape/mod.rs index 161ed67..c831495 100644 --- a/sailfish/src/runtime/escape/mod.rs +++ b/sailfish/src/runtime/escape/mod.rs @@ -80,9 +80,9 @@ mod tests { use super::*; fn escape(feed: &str) -> String { - let mut buf = Buffer::new(); - escape_to_buf(feed, &mut buf); - buf.into_string() + let mut s = String::new(); + escape_to_string(feed, &mut s); + s } #[test]