🎨 Mejora la página de bienvenida y el tema básico #6
2 changed files with 4 additions and 5 deletions
|
@ -9,10 +9,9 @@ use crate::{builder_fn, join};
|
||||||
|
|
||||||
use std::collections::HashMap;
|
use std::collections::HashMap;
|
||||||
use std::error::Error;
|
use std::error::Error;
|
||||||
|
use std::fmt::{self, Display};
|
||||||
use std::str::FromStr;
|
use std::str::FromStr;
|
||||||
|
|
||||||
use std::fmt;
|
|
||||||
|
|
||||||
/// Operaciones para modificar el contexto ([`Context`]) del documento.
|
/// Operaciones para modificar el contexto ([`Context`]) del documento.
|
||||||
pub enum AssetsOp {
|
pub enum AssetsOp {
|
||||||
// Favicon.
|
// Favicon.
|
||||||
|
@ -43,7 +42,7 @@ pub enum ErrorParam {
|
||||||
ParseError(String),
|
ParseError(String),
|
||||||
}
|
}
|
||||||
|
|
||||||
impl fmt::Display for ErrorParam {
|
impl Display for ErrorParam {
|
||||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||||
match self {
|
match self {
|
||||||
ErrorParam::NotFound => write!(f, "Parameter not found"),
|
ErrorParam::NotFound => write!(f, "Parameter not found"),
|
||||||
|
|
|
@ -6,7 +6,7 @@ use crate::service::{HttpRequest, HttpResponse};
|
||||||
|
|
||||||
use super::Page;
|
use super::Page;
|
||||||
|
|
||||||
use std::fmt;
|
use std::fmt::{self, Display};
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
pub enum ErrorPage {
|
pub enum ErrorPage {
|
||||||
|
@ -19,7 +19,7 @@ pub enum ErrorPage {
|
||||||
Timeout(HttpRequest),
|
Timeout(HttpRequest),
|
||||||
}
|
}
|
||||||
|
|
||||||
impl fmt::Display for ErrorPage {
|
impl Display for ErrorPage {
|
||||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||||
match self {
|
match self {
|
||||||
// Error 304.
|
// Error 304.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue