Skip to content

Commit

Permalink
remove prelude
Browse files Browse the repository at this point in the history
  • Loading branch information
jcornaz committed Nov 1, 2024
1 parent 18d368c commit 4aba441
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 13 deletions.
11 changes: 6 additions & 5 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,16 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).

### Added

* Escape HTML strings
* `id` and `class` attributes
* `Node`, `Attribute` and `Document` types
* `html` function to create an html document
* Attribute values and text nodes are escaped for HTML
* `lang`, `id` and `class` attributes
* Nodes
* Html document (`html`, `head` and `body`)
* Meta (`title`)
* Text (`h1`, `h2`, `h3`, `h4`, `h5`, `h6`, and `text`)
* Text (`h1` to `h6`, and `text`)
* Container (`div`)
* Escape hatches (`raw and `raw_unsafe`)
* `Node`, `Attribute` and `Document` types
* Escape hatches (`raw` and `raw_unsafe`)
* implement `From<(&'static str, Cow<'static, str)>` for `Attribute`
* implement `From<&'static str>` and `From<String>` for `Node`
* implement `From<[Node; N]>` and `From<Vec<Node>>` for `Node` (group nodes without wrapping them in a `div`)
Expand Down
7 changes: 0 additions & 7 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,6 @@
pub mod attributes;
pub mod nodes;

pub mod prelude {
pub use crate::attributes::*;
pub use crate::html;
pub use crate::nodes::*;
pub use crate::{Attribute, Document, Node};
}

use std::{borrow::Cow, fmt::Display};

#[derive(Debug, Clone)]
Expand Down
2 changes: 1 addition & 1 deletion tests/render_spec.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use rstest::rstest;

use fun_html::prelude::*;
use fun_html::{attributes::*, html, nodes::*, Attribute, Document, Node};

#[test]
fn should_render_empty_document() {
Expand Down

0 comments on commit 4aba441

Please sign in to comment.