quote_into 0.2.0

Easily & efficiently generate code by quoting it in a macro
Documentation
use proc_macro2::TokenStream;
use quote_into::quote_into;

#[test]
fn quote_ident() {
    let mut s = TokenStream::new();
    quote_into!(s += hello);
    assert_eq!(s.to_string(), "hello");
}

#[test]
fn quote_literal_string() {
    let mut s = TokenStream::new();
    quote_into!(s += "hello");
    assert_eq!(s.to_string(), "\"hello\"");
}

#[test]
fn quote_literal_integers() {
    let mut s = TokenStream::new();
    quote_into!(s += 1 2u8 3i8 4u16 5i16 6u32 7i32 8u64 9i64 10u128 11i128);
    assert_eq!(
        s.to_string(),
        "1 2u8 3i8 4u16 5i16 6u32 7i32 8u64 9i64 10u128 11i128"
    );
}

#[test]
fn quote_literal_float() {
    let mut s = TokenStream::new();
    quote_into!(s += 0.1 0.0001 1e10 1f32 2f64 );
    assert_eq!(s.to_string(), "0.1 0.0001 1e10 1f32 2f64");
}
#[test]
fn quote_punct() {
    let mut s = TokenStream::new();
    quote_into!(s += + = += );
    assert_eq!(s.to_string(), "+ = +=");
}

#[test]
fn quote_group() {
    let mut s = TokenStream::new();
    quote_into!(s += () [] {});
    assert_eq!(s.to_string(), "() [] { }");
}

#[test]
fn quote_group_nested() {
    let mut s = TokenStream::new();
    quote_into!(s += ([], [], ({3, 4})));
    assert_eq!(s.to_string(), "([] , [] , ({ 3 , 4 }))");
}