Incorpora y revisa código para pruebas unitarias

This commit is contained in:
Manuel Cillero 2024-12-05 14:32:10 +01:00
parent 7bf89ca90d
commit c5b0c529ef
9 changed files with 31 additions and 14 deletions

View file

@ -57,7 +57,7 @@
//! Then, use the [`include_config!`](crate::include_config) macro to initialize your settings with
//! type-safe structures and predefined values:
//!
//! ```
//! ```rust#ignore
//! use pagetop::prelude::*;
//! use serde::Deserialize;
//!
@ -101,7 +101,7 @@
//!
//! Access the settings directly in your code:
//!
//! ```
//! ```rust#ignore
//! use pagetop::prelude::*;
//! use crate::config;
//!

View file

@ -34,7 +34,7 @@ mod escape;
///
/// # Example
///
/// ```rust
/// ```rust#ignore
/// use maud::Escaper;
/// use std::fmt::Write;
/// let mut s = String::new();
@ -72,7 +72,7 @@ impl<'a> fmt::Write for Escaper<'a> {
///
/// # Example
///
/// ```rust
/// ```rust#ignore
/// use maud::{html, Markup, Render};
///
/// /// Provides a shorthand for linking to a CSS stylesheet.
@ -188,7 +188,7 @@ impl_render_with_itoa! {
///
/// # Example
///
/// ```rust
/// ```rust#ignore
/// use maud::html;
/// use std::net::Ipv4Addr;
///
@ -259,7 +259,7 @@ impl<T: AsRef<str> + Default> Default for PreEscaped<T> {
///
/// A minimal web page:
///
/// ```rust
/// ```rust#ignore
/// use maud::{DOCTYPE, html};
///
/// let markup = html! {

View file

@ -29,7 +29,7 @@
//!
//! # ⚡️ Quick start
//!
//! ```rust
//! ```rust#ignore
//! use pagetop::prelude::*;
//!
//! struct HelloWorld;

View file

@ -70,7 +70,7 @@
//! [`include_locales!`](crate::include_locales) macro to integrate them into your module or
//! application. If your resources are located in the `"src/locale"` directory, simply declare:
//!
//! ```
//! ```rust#ignore
//! use pagetop::prelude::*;
//!
//! include_locales!(LOCALES_SAMPLE);
@ -78,7 +78,7 @@
//!
//! But if they are in another directory, then you can use:
//!
//! ```
//! ```rust#ignore
//! use pagetop::prelude::*;
//!
//! include_locales!(LOCALES_SAMPLE from "path/to/locale");

View file

@ -103,7 +103,7 @@ impl TypeInfo {
///
/// # Examples
///
/// ```
/// ```rust#ignore
/// let root = "/home/user";
/// let relative = "documents";
/// let abs_dir = absolute_dir(root, relative).unwrap();