Verified Commit 0c28509b authored by Jordan Petridis's avatar Jordan Petridis 🌱

Rustfmt: ignore problematic function

This causes rustfmt(still happens as of 0.99.3) to error without
any output on the diff.
parent 6396cb13
......@@ -137,6 +137,7 @@ mod parser;
/// ```
///
#[proc_macro]
#[rustfmt::skip]
pub fn gobject_gen(input: proc_macro::TokenStream) -> proc_macro::TokenStream {
let ast_program = match parser::parse_program(input) {
Ok(p) => p,
......
......@@ -11,7 +11,9 @@ fn param_name_is_valid(name: &str) -> bool {
(bytes[0] >= b'A' && bytes[0] <= b'Z') || (bytes[0] >= b'a' && bytes[0] <= b'z');
first_byte_valid && bytes[1..].iter().all(|&c| {
c == b'-' || (c >= b'0' && c <= b'9') || (c >= b'A' && c <= b'Z')
c == b'-'
|| (c >= b'0' && c <= b'9')
|| (c >= b'A' && c <= b'Z')
|| (c >= b'a' && c <= b'z')
})
}
......@@ -281,8 +281,8 @@ fn keyword<'a>(name: &'static str) -> impl Fn(Cursor<'a>) -> PResult<Ident> {
}
pub mod tests {
use super::*;
use super::super::ident_ext::IdentExt;
use super::*;
use quote::ToTokens;
use syn::parse_str;
......@@ -316,7 +316,6 @@ pub mod tests {
foo : u32,
bar : u32,
baz : u32
\
}";
let class = parse_str::<ast::Class>(raw).unwrap();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment