rustyle 0.1.0

A new way to represent the CSS stylesheet in Rust
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use proc_macro::TokenStream;
use quote::quote;
use std::iter::FromIterator;

pub fn css_use_impl(item: TokenStream) -> TokenStream {
  // todo: value inlining
  // println!("CSS USE\n{:?}\n", item);

  // the variable maybe used by rustyle
  // so should ignore the unused warning
  let preamble_tokens = TokenStream::from(quote! {
    #[allow(unused)]
  });

  TokenStream::from_iter(preamble_tokens.into_iter().chain(item).into_iter())
}