From e2285f55b309f17dc2dccc820a499dcf1f4d30fb Mon Sep 17 00:00:00 2001 From: Christopher Young Date: Tue, 3 Oct 2023 08:48:40 +0800 Subject: [PATCH 1/2] impl Scribe for std::convert::Infallible --- crates/core/src/writing/mod.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/crates/core/src/writing/mod.rs b/crates/core/src/writing/mod.rs index 1448aba21..0fc8787de 100644 --- a/crates/core/src/writing/mod.rs +++ b/crates/core/src/writing/mod.rs @@ -117,6 +117,11 @@ impl Scribe for String { res.write_body(self).ok(); } } +impl Scribe for std::convert::Infallible { + #[inline] + fn render(self, res: &mut Response) { + } +} #[cfg(test)] mod tests { From 67c9ee8b08c4db62a36a0bdf8262c0b60b6bcfe2 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 3 Oct 2023 00:49:19 +0000 Subject: [PATCH 2/2] Format Rust code using rustfmt --- crates/core/src/writing/mod.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/crates/core/src/writing/mod.rs b/crates/core/src/writing/mod.rs index 0fc8787de..6abf2c9b3 100644 --- a/crates/core/src/writing/mod.rs +++ b/crates/core/src/writing/mod.rs @@ -119,8 +119,7 @@ impl Scribe for String { } impl Scribe for std::convert::Infallible { #[inline] - fn render(self, res: &mut Response) { - } + fn render(self, res: &mut Response) {} } #[cfg(test)]