index : static-web-server.git

ascending towards madness

author Jose Quintana <joseluisquintana20@gmail.com> 2020-04-26 22:51:34.0 +00:00:00
committer Jose Quintana <joseluisquintana20@gmail.com> 2020-04-26 22:51:34.0 +00:00:00
commit
1b1174d1d021d0959b04a6a8fe396436985cd365 [patch]
tree
0e948b6ce3a62fefc8e4b7f9cabd99a8d8e79772
parent
77bf53829b7a713cd5130531e620547f8b2d6d55
download
1b1174d1d021d0959b04a6a8fe396436985cd365.tar.gz

refactor: prefer const over static on default error page content



Diff

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

diff --git a/src/error_page.rs b/src/error_page.rs
index 1f43564..82f8608 100644
--- a/src/error_page.rs
+++ b/src/error_page.rs
@@ -5,9 +5,9 @@ use iron::AfterMiddleware;
use std::fs;
use std::path::Path;

static PAGE_404: &str = "<h2>404</h2><p>Content could not found</p>";
static PAGE_50X: &str =
    "<h2>50x</h2><p>Service is temporarily unavailable due an unexpected error</p>";
const PAGE_404: &str = "<h2>404</h2><p>Content could not found</p>";
const PAGE_50X: &str =
    "<h2>50x</h2><p>SERVICE is temporarily unavailable due an unexpected error</p>";

/// Custom Error pages middleware for Iron
pub struct ErrorPage {