diff --git a/examples/basic.rs b/examples/basic.rs
index 6cf1952..38806ee 100644
--- a/examples/basic.rs
+++ b/examples/basic.rs
@@ -1,12 +1,12 @@
use tide::http::mime;
use tide::utils::After;
-use tide::{Request, Response, log};
-use tide_jsx::{view, rsx, component};
+use tide::{log, Request, Response};
use tide_jsx::html::HTML5Doctype;
+use tide_jsx::{component, rsx, view};
#[component]
fn Heading<'title>(title: &'title str) {
- rsx! {
{title}
}
+ rsx! { {title}
}
}
async fn index(_req: Request<()>) -> tide::Result {
diff --git a/src/fragment.rs b/src/fragment.rs
index 4591ddb..cbe940e 100644
--- a/src/fragment.rs
+++ b/src/fragment.rs
@@ -1,4 +1,3 @@
-
use crate::Render;
use std::fmt::{Result, Write};
diff --git a/src/lib.rs b/src/lib.rs
index a237f52..299f7c6 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -8,10 +8,10 @@ mod text_element;
pub use self::render::Render;
pub use fragment::Fragment;
-use tide::{http::mime, StatusCode};
-pub use tide_jsx_impl::{component, html, rsx, view};
pub use simple_element::SimpleElement;
pub use text_element::Raw;
+use tide::{http::mime, StatusCode};
+pub use tide_jsx_impl::{component, html, rsx, view};
impl<'a, T: Render> From> for tide::Response {
fn from(s: SimpleElement<'a, T>) -> Self {
@@ -42,6 +42,3 @@ impl From> for tide::Result {
Ok(s.into())
}
}
-
-
-
diff --git a/tests/lib.rs b/tests/lib.rs
index 642ac9a..c3aabc4 100644
--- a/tests/lib.rs
+++ b/tests/lib.rs
@@ -1,8 +1,8 @@
use pretty_assertions::assert_eq;
+use std::borrow::Cow;
use tide::StatusCode;
-use tide_jsx::{html, rsx, view, component, Render, raw};
use tide_jsx::html::HTML5Doctype;
-use std::borrow::Cow;
+use tide_jsx::{component, html, raw, rsx, view, Render};
#[test]
fn ui() {
@@ -20,7 +20,6 @@ fn works_with_dashes() {
#[test]
fn works_with_raw() {
-
let actual = html! {
{raw!("")}
};
@@ -156,14 +155,17 @@ async fn render_view() -> std::io::Result<()> {
let result = view! { {"hello"}
} as tide::Result;
let mut res = result.unwrap();
assert_eq!(res.status(), StatusCode::Ok);
- assert_eq!(res.header("content-type").unwrap().as_str(), tide::http::mime::HTML.to_string());
+ assert_eq!(
+ res.header("content-type").unwrap().as_str(),
+ tide::http::mime::HTML.to_string()
+ );
assert_eq!(res.take_body().into_string().await.unwrap(), "hello
");
Ok(())
}
mod kaki {
- use crate::{html, rsx, component, HTML5Doctype, Render};
use crate::other::ExternalPage;
+ use crate::{component, html, rsx, HTML5Doctype, Render};
// This can be any layout we want
#[component]