index : static-web-server.git

ascending towards madness

author Jose Quintana <joseluisquintana20@gmail.com> 2022-01-21 22:25:17.0 +00:00:00
committer Jose Quintana <joseluisquintana20@gmail.com> 2022-01-21 22:25:17.0 +00:00:00
commit
70a16f8fa253ee4f83d736f59b7f8a0abb527be2 [patch]
tree
3a068b6b131650dde45531768ec148dd1a28f779
parent
9ceab19b3fb76d4bfba939320b59065b60e29197
download
70a16f8fa253ee4f83d736f59b7f8a0abb527be2.tar.gz

fix: `to_string` applied to a type that implements `Display`



Diff

 src/error_page.rs | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/error_page.rs b/src/error_page.rs
index 09f3594..7a90487 100644
--- a/src/error_page.rs
+++ b/src/error_page.rs
@@ -71,7 +71,7 @@ impl AfterMiddleware for ErrorPage {
                    if content.is_empty() {
                        content = format!(
                            "<html><head><title>{}</title></head><body><center><h1>{}</h1></center></body></html>",
                            stat.to_string(), stat.to_string());
                            stat, stat);
                    }
                    Response::with((content_type, stat, content))
                }
@@ -88,7 +88,7 @@ impl AfterMiddleware for ErrorPage {
                    let content = if self.page50x.is_empty() {
                        format!(
                            "<html><head><title>{}</title></head><body><center><h1>{}</h1></center></body></html>",
                            stat.to_string(), stat.to_string()
                            stat, stat
                        )
                    } else {
                        self.page50x.clone()