From b472d4e6a40be857c24dbbd66758674b6a51796c Mon Sep 17 00:00:00 2001 From: vthg2themax Date: Sun, 16 Jun 2024 05:05:41 -0400 Subject: [PATCH] Last Minute Changes For The Beta Version --- Cargo.lock | 8 ++++---- README.md | 2 +- docs/en/docs/installation.md | 2 +- examples/Cargo.toml | 2 +- sailfish-compiler/Cargo.toml | 2 +- sailfish-macros/Cargo.toml | 4 ++-- sailfish-tests/fuzzing-tests/Cargo.toml | 2 +- sailfish-tests/integration-tests/Cargo.toml | 2 +- sailfish-tests/integration-tests/tests/template.rs | 12 ++++++++++-- .../integration-tests/tests/template_simple.rs | 1 - sailfish/Cargo.toml | 4 ++-- 11 files changed, 24 insertions(+), 17 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index f651f38..cb78fc9 100755 --- a/Cargo.lock +++ b/Cargo.lock @@ -80,7 +80,7 @@ dependencies = [ [[package]] name = "integration-tests" -version = "0.8.3" +version = "0.9.0-beta" dependencies = [ "pretty_assertions", "sailfish", @@ -165,7 +165,7 @@ checksum = "1ad4cc8da4ef723ed60bced201181d83791ad433213d8c24efffda1eec85d741" [[package]] name = "sailfish" -version = "0.8.3" +version = "0.9.0-beta" dependencies = [ "itoap", "ryu", @@ -177,7 +177,7 @@ dependencies = [ [[package]] name = "sailfish-compiler" -version = "0.8.3" +version = "0.9.0-beta" dependencies = [ "filetime", "home", @@ -192,7 +192,7 @@ dependencies = [ [[package]] name = "sailfish-macros" -version = "0.8.3" +version = "0.9.0-beta" dependencies = [ "proc-macro2", "sailfish-compiler", diff --git a/README.md b/README.md index bc17a70..e8af338 100755 --- a/README.md +++ b/README.md @@ -31,7 +31,7 @@ Dependencies: ```toml [dependencies] -sailfish = "0.8.3" +sailfish = "0.9.0-beta" ``` You can choose to use `TemplateSimple` to access fields directly: diff --git a/docs/en/docs/installation.md b/docs/en/docs/installation.md index f37f9c5..5fce83d 100755 --- a/docs/en/docs/installation.md +++ b/docs/en/docs/installation.md @@ -4,7 +4,7 @@ In order to use sailfish templates, you have add two dependencies in your `Cargo ``` toml [dependencies] -sailfish = "0.8.3" +sailfish = "0.9.0-beta" ``` ## Feature Flags diff --git a/examples/Cargo.toml b/examples/Cargo.toml index 8da3d24..ea1f222 100755 --- a/examples/Cargo.toml +++ b/examples/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sailfish-examples" -version = "0.8.3" +version = "0.9.0-beta" authors = ["Ryohei Machida "] edition = "2018" publish = false diff --git a/sailfish-compiler/Cargo.toml b/sailfish-compiler/Cargo.toml index 3a89559..c72b26c 100755 --- a/sailfish-compiler/Cargo.toml +++ b/sailfish-compiler/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sailfish-compiler" -version = "0.8.3" +version = "0.9.0-beta" authors = ["Ryohei Machida "] description = "Simple, small, and extremely fast template engine for Rust" homepage = "https://github.com/rust-sailfish/sailfish" diff --git a/sailfish-macros/Cargo.toml b/sailfish-macros/Cargo.toml index 39e0aca..b35635a 100755 --- a/sailfish-macros/Cargo.toml +++ b/sailfish-macros/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sailfish-macros" -version = "0.8.3" +version = "0.9.0-beta" authors = ["Ryohei Machida "] description = "Simple, small, and extremely fast template engine for Rust" homepage = "https://github.com/rust-sailfish/sailfish" @@ -30,6 +30,6 @@ proc-macro2 = "1.0.56" [dependencies.sailfish-compiler] path = "../sailfish-compiler" -version = "0.8.3" +version = "0.9.0-beta" default-features = false features = ["procmacro"] diff --git a/sailfish-tests/fuzzing-tests/Cargo.toml b/sailfish-tests/fuzzing-tests/Cargo.toml index 4505d25..2efa5a7 100755 --- a/sailfish-tests/fuzzing-tests/Cargo.toml +++ b/sailfish-tests/fuzzing-tests/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "fuzzing-tests" -version = "0.8.3" +version = "0.9.0-beta" authors = ["Ryohei Machida "] edition = "2018" publish = false diff --git a/sailfish-tests/integration-tests/Cargo.toml b/sailfish-tests/integration-tests/Cargo.toml index 4c8b7a7..f309919 100755 --- a/sailfish-tests/integration-tests/Cargo.toml +++ b/sailfish-tests/integration-tests/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "integration-tests" -version = "0.8.3" +version = "0.9.0-beta" authors = ["Ryohei Machida "] edition = "2018" publish = false diff --git a/sailfish-tests/integration-tests/tests/template.rs b/sailfish-tests/integration-tests/tests/template.rs index 37e6093..0ac9c5b 100644 --- a/sailfish-tests/integration-tests/tests/template.rs +++ b/sailfish-tests/integration-tests/tests/template.rs @@ -1,9 +1,8 @@ -#[macro_use] extern crate sailfish_macros; use integration_tests::assert_string_eq; use sailfish::runtime::RenderResult; -use sailfish::{Template, TemplateMut, TemplateOnce}; +use sailfish::{Template, TemplateMut, TemplateOnce, TemplateSimple}; use std::path::PathBuf; fn assert_render_result(name: &str, result: RenderResult) { @@ -47,6 +46,15 @@ trait ConflictWithSailFishRender { impl ConflictWithSailFishRender for u8 {} impl ConflictWithSailFishRender for u16 {} +#[derive(TemplateSimple)] +#[template(path = "empty.stpl")] +struct EmptySimple {} + +#[test] +fn empty_simple() { + assert_render_once("empty", Empty {}); +} + #[derive(Template)] #[template(path = "empty.stpl")] struct Empty {} diff --git a/sailfish-tests/integration-tests/tests/template_simple.rs b/sailfish-tests/integration-tests/tests/template_simple.rs index c53f073..a397d73 100644 --- a/sailfish-tests/integration-tests/tests/template_simple.rs +++ b/sailfish-tests/integration-tests/tests/template_simple.rs @@ -1,4 +1,3 @@ -#[macro_use] extern crate sailfish_macros; use integration_tests::assert_string_eq; diff --git a/sailfish/Cargo.toml b/sailfish/Cargo.toml index c977b80..ecaed96 100755 --- a/sailfish/Cargo.toml +++ b/sailfish/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sailfish" -version = "0.8.3" +version = "0.9.0-beta" authors = ["Ryohei Machida "] description = "Simple, small, and extremely fast template engine for Rust" homepage = "https://github.com/rust-sailfish/sailfish" @@ -31,7 +31,7 @@ serde_json = { version = "1.0.95", optional = true } [dependencies.sailfish-macros] path = "../sailfish-macros" -version = "0.8.3" +version = "0.9.0-beta" default-features = false optional = true