Skip to content

Commit f77a22b

Browse files
committed
Fix clippy/rustdoc in lrlex
1 parent 4470e22 commit f77a22b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lrlex/src/lib/ctbuilder.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ pub enum RustEdition {
8383
/// and the inner value for `Some(inner_value)`.
8484
///
8585
/// This wrapper instead emits both `Some` and `None` variants.
86-
/// See: https://github.com/dtolnay/quote/issues/20
86+
/// See: [quote #20](https://github.com/dtolnay/quote/issues/20)
8787
struct QuoteOption<T>(Option<T>);
8888

8989
impl<T: ToTokens> ToTokens for QuoteOption<T> {
@@ -109,7 +109,7 @@ impl<A: ToTokens, B: ToTokens> ToTokens for QuoteTuple<(A, B)> {
109109
/// The wrapped `&str` value will be emitted with a call to `to_string()`
110110
struct QuoteToString<'a>(&'a str);
111111

112-
impl<'a> ToTokens for QuoteToString<'a> {
112+
impl ToTokens for QuoteToString<'_> {
113113
fn to_tokens(&self, tokens: &mut TokenStream) {
114114
let x = &self.0;
115115
tokens.append_all(quote! { #x.to_string() });
@@ -545,7 +545,7 @@ pub fn lexerdef() -> {lexerdef_type} {{
545545
// Individual rules
546546
for r in lexerdef.iter_rules() {
547547
let tok_id = QuoteOption(r.tok_id);
548-
let n = QuoteOption(r.name().map(|n| QuoteToString(n)));
548+
let n = QuoteOption(r.name().map(QuoteToString));
549549
let target_state = QuoteOption(r.target_state().map(|(x, y)| QuoteTuple((x, y))));
550550
let n_span = r.name_span();
551551
let regex = QuoteToString(&r.re_str);

0 commit comments

Comments
 (0)