Skip to content

Commit

Permalink
fix: rename attribute html to yarte
Browse files Browse the repository at this point in the history
  • Loading branch information
zzau13 committed Jul 29, 2023
1 parent fa72fff commit 2c56a4d
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions examples/bytes/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

use std::io::{stdout, Write};

use yarte::*;
use yarte::yarte;

struct Card<'a> {
title: &'a str,
Expand All @@ -19,7 +19,7 @@ fn main() {
body: "My Body",
};
let mut buffer = Vec::with_capacity(2048);
#[html(buffer)]
#[yarte(buffer)]
"{{> hello my_card }}";

println!("Proc macro attribute");
Expand All @@ -29,13 +29,13 @@ fn main() {
println!("Proc macro attribute auto");

_write_str(
#[html]
#[yarte]
"{{> hello my_card }}",
);

println!();

let buffer: String = #[html]
let buffer: String = #[yarte]
"{{> hello my_card }}";

println!("Proc macro attribute auto");
Expand Down
4 changes: 2 additions & 2 deletions examples/extra-renders/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
use std::io::{stdout, Write};

use uuid::Uuid;
use yarte::*;
use yarte::yarte;

/// without comma or error
/// `message: stable/nightly mismatch`
Expand All @@ -15,7 +15,7 @@ fn nightly(uuid: &Uuid) {
// without comma or error
// `message: stable/nightly mismatch`
#[rustfmt::skip]
write_str(#[html] "{{> hello }}");
write_str(#[yarte] "{{> hello }}");
}

fn main() {
Expand Down
2 changes: 1 addition & 1 deletion yarte/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ pub use yarte_derive::auto;
))]
pub use yarte_derive::ywrite_min;
#[cfg(any(feature = "bytes-buf", feature = "bytes-buf-tokio2"))]
pub use yarte_derive::{html, ywrite, ywrite_html};
pub use yarte_derive::{yarte, ywrite, ywrite_html};
pub use yarte_derive::{yformat, yformat_html};
pub use yarte_helpers::at_helpers::*;
pub use yarte_helpers::{
Expand Down
2 changes: 1 addition & 1 deletion yarte_derive/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,7 @@ impl syn::parse::Parse for TemplateArg {

#[proc_macro_attribute]
#[cfg(feature = "bytes-buf")]
pub fn html(args: TokenStream, input: TokenStream) -> TokenStream {
pub fn yarte(args: TokenStream, input: TokenStream) -> TokenStream {
const PARENT: &str = "yarte";

let args_is_empty = args.is_empty();
Expand Down

0 comments on commit 2c56a4d

Please sign in to comment.