Skip to content

Commit

Permalink
Release: Cleanup release.
Browse files Browse the repository at this point in the history
  • Loading branch information
vldm committed May 13, 2023
1 parent f7d1210 commit a41401c
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 10 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "rstml"
description = "Rust templating parser for JSX-like TokenStreams"
version = "0.10.0"
version = "0.10.1"
authors = ["vldm <[email protected]>","stoically <[email protected]>"]
keywords = ["syn", "jsx", "rsx", "html", "macro"]
edition = "2018"
Expand Down
2 changes: 1 addition & 1 deletion benches/bench.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ fn criterion_benchmark(c: &mut Criterion) {
.into_iter()
.collect(),
);
rstml::parse2_with_config(RUST_SITE_SIMPLE.with(|tokens|tokens.clone()), config)
rstml::parse2_with_config(RUST_SITE_SIMPLE.with(|tokens| tokens.clone()), config)
})
});
}
Expand Down
2 changes: 1 addition & 1 deletion examples/html-to-string-macro/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ use std::collections::HashSet;
use proc_macro::TokenStream;
use proc_macro2::{Literal, TokenTree};
use quote::{quote, quote_spanned, ToTokens};
use syn::spanned::Spanned;
use rstml::{Node, NodeAttribute, NodeName, Parser, ParserConfig};
use syn::spanned::Spanned;

#[derive(Default)]
struct WalkNodesOutput<'a> {
Expand Down
8 changes: 5 additions & 3 deletions examples/html-to-string-macro/tests/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ pub mod docs {
}
#[test]
fn test() {

let nightly_unqoted = " Hello world with spaces ";
let stable_unqoted = "Hello world with spaces";
let unquoted_text = if cfg!(feature = "nightly") {
Expand Down Expand Up @@ -37,7 +36,8 @@ fn test() {
</body>
</html>
},
format!(r#"
format!(
r#"
<!DOCTYPE html>
<html>
<head>
Expand All @@ -52,7 +52,9 @@ fn test() {
<div some-attribute-from-rust-block/>
</body>
</html>
"#, unquoted_text)
"#,
unquoted_text
)
.split('\n')
.map(|line| line.trim())
.collect::<Vec<&str>>()
Expand Down
4 changes: 2 additions & 2 deletions src/node/raw_text.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ impl RawText {
/// Return Spans for all unquoted text or nothing.
/// Usefull to detect is `Span::join` is available or not.
pub fn join_spans(&self) -> Option<Span> {
let mut span:Option<Span> = None;
let mut span: Option<Span> = None;
for tt in self.token_stream.clone().into_iter() {
let joined = if let Some(span) = span {
span.join(tt.span())?
Expand All @@ -76,7 +76,7 @@ impl RawText {
};
span = Some(joined);
}
return span
return span;
}

pub fn is_empty(&self) -> bool {
Expand Down
2 changes: 1 addition & 1 deletion tests/recoverable_parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ use std::{convert::TryFrom, str::FromStr};
use eyre::Result;
use proc_macro2::TokenStream;
use quote::quote;
use syn::Block;
use rstml::{Node, NodeAttribute, NodeBlock, Parser, ParserConfig};
use syn::Block;

#[test]
fn test_recover_incorrect_closing_tags() {
Expand Down
2 changes: 1 addition & 1 deletion tests/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ use std::{convert::TryFrom, str::FromStr};
use eyre::Result;
use proc_macro2::TokenStream;
use quote::quote;
use syn::Block;
use rstml::{
parse2, parse2_with_config, KeyedAttribute, Node, NodeAttribute, NodeElement, NodeType,
ParserConfig,
};
use syn::Block;

#[test]
fn test_single_empty_element() -> Result<()> {
Expand Down

0 comments on commit a41401c

Please sign in to comment.