From f02524b59288d68e78a108e9c9e2ca4c7f662f07 Mon Sep 17 00:00:00 2001 From: Tyler Murphy Date: Tue, 14 Feb 2023 19:28:10 -0500 Subject: friends --- src/public/console.rs | 33 ++++++++++++++++++++------------- 1 file changed, 20 insertions(+), 13 deletions(-) (limited to 'src/public/console.rs') diff --git a/src/public/console.rs b/src/public/console.rs index 16bf4a3..251dbc1 100644 --- a/src/public/console.rs +++ b/src/public/console.rs @@ -84,9 +84,9 @@ impl Formatter for HtmlFormatter { W: ?Sized + io::Write, { let s = if value { - b"true" as &[u8] + b" true " as &[u8] } else { - b"false" as &[u8] + b" false " as &[u8] }; writer.write_all(s) } @@ -95,7 +95,7 @@ impl Formatter for HtmlFormatter { where W: ?Sized + io::Write, { - let buff = format!("{value}"); + let buff = format!(" {value} "); writer.write_all(buff.as_bytes()) } @@ -103,7 +103,7 @@ impl Formatter for HtmlFormatter { where W: ?Sized + io::Write, { - let buff = format!("{value}"); + let buff = format!(" {value} "); writer.write_all(buff.as_bytes()) } @@ -111,7 +111,7 @@ impl Formatter for HtmlFormatter { where W: ?Sized + io::Write, { - let buff = format!("{value}"); + let buff = format!(" {value} "); writer.write_all(buff.as_bytes()) } @@ -119,7 +119,7 @@ impl Formatter for HtmlFormatter { where W: ?Sized + io::Write, { - let buff = format!("{value}"); + let buff = format!(" {value} "); writer.write_all(buff.as_bytes()) } @@ -127,7 +127,7 @@ impl Formatter for HtmlFormatter { where W: ?Sized + io::Write, { - let buff = format!("{value}"); + let buff = format!(" {value} "); writer.write_all(buff.as_bytes()) } @@ -135,7 +135,7 @@ impl Formatter for HtmlFormatter { where W: ?Sized + io::Write, { - let buff = format!("{value}"); + let buff = format!(" {value} "); writer.write_all(buff.as_bytes()) } @@ -143,7 +143,7 @@ impl Formatter for HtmlFormatter { where W: ?Sized + io::Write, { - let buff = format!("{value}"); + let buff = format!(" {value} "); writer.write_all(buff.as_bytes()) } @@ -151,7 +151,7 @@ impl Formatter for HtmlFormatter { where W: ?Sized + io::Write, { - let buff = format!("{value}"); + let buff = format!(" {value} "); writer.write_all(buff.as_bytes()) } @@ -159,7 +159,7 @@ impl Formatter for HtmlFormatter { where W: ?Sized + io::Write, { - let buff = format!("{value}"); + let buff = format!(" {value} "); writer.write_all(buff.as_bytes()) } @@ -167,7 +167,7 @@ impl Formatter for HtmlFormatter { where W: ?Sized + io::Write, { - let buff = format!("{value}"); + let buff = format!(" {value} "); writer.write_all(buff.as_bytes()) } @@ -192,7 +192,7 @@ impl Formatter for HtmlFormatter { if first { writer.write_all(b"") } else { - writer.write_all(b",") + writer.write_all(b",") } } @@ -202,6 +202,13 @@ impl Formatter for HtmlFormatter { { writer.write_all(b"") } + + fn begin_object_value(&mut self, writer: &mut W) -> io::Result<()> + where + W: ?Sized + io::Write, + { + writer.write_all(b" : ") + } } pub fn sanatize(input: &str) -> String { -- cgit v1.2.3-freya