Skip to content

Commit

Permalink
chore: silence a new Clippy lint, run cargo fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexTMjugador committed Oct 23, 2023
1 parent 50f509d commit 8a34d08
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
5 changes: 1 addition & 4 deletions lang-quote/src/tokenize.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1521,10 +1521,7 @@ fn tokenize_jump_statement(j: &ast::JumpStatement) -> TokenStream {
ast::JumpStatementData::Break => quote! { glsl_lang::ast::JumpStatementData::Break },
ast::JumpStatementData::Discard => quote! { glsl_lang::ast::JumpStatementData::Discard },
ast::JumpStatementData::Return(ref e) => {
let e = e
.as_ref()
.map(|e| (&tokenize_expr(e)).quote())
.quote();
let e = e.as_ref().map(|e| (&tokenize_expr(e)).quote()).quote();
quote! { glsl_lang::ast::JumpStatementData::Return(#e) }
}
};
Expand Down
1 change: 1 addition & 0 deletions lang/src/parse.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ pub trait HasParser: Sized {
}

/// GLSL language parsing functions
#[allow(clippy::result_large_err)]
pub trait Parse: HasParser {
/// Parse the input source
fn parse<'i, L: LangLexer<'i>>(
Expand Down
3 changes: 3 additions & 0 deletions lang/src/parse/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ impl<'i, 'o, 'c, 'p, L: LangLexer<'i>, T: HasParser> ParseBuilder<'i, 'o, 'c, 'p
}

/// Execute the parsing operation
#[allow(clippy::result_large_err)]
fn parse_source(
source: L::Input,
opts: Option<&'o ParseOptions>,
Expand Down Expand Up @@ -93,6 +94,7 @@ impl<'i, 'o, 'c, 'p, L: LangLexer<'i>, T: HasParser> ParseBuilder<'i, 'o, 'c, 'p
}

/// Execute the parsing operation
#[allow(clippy::result_large_err)]
pub fn parse(self) -> ParseResult<L::Iter, <L::Iter as HasLexerError>::Error, T> {
Self::parse_source(
self.source,
Expand All @@ -104,6 +106,7 @@ impl<'i, 'o, 'c, 'p, L: LangLexer<'i>, T: HasParser> ParseBuilder<'i, 'o, 'c, 'p
}

/// Execute the parsing operation, and extract the wanted node
#[allow(clippy::result_large_err)]
pub fn extract<U: Extractable<T>>(
self,
) -> ParseResult<L::Iter, <L::Iter as HasLexerError>::Error, Option<U>> {
Expand Down

0 comments on commit 8a34d08

Please sign in to comment.