More doc comments, better TemplateMacro debug formatting #53
clippy
4 errors
Details
Results
Message level | Amount |
---|---|
Internal compiler error | 0 |
Error | 4 |
Warning | 0 |
Note | 0 |
Help | 0 |
Versions
- rustc 1.73.0 (cc66ad468 2023-10-03)
- cargo 1.73.0 (9c4383fb5 2023-08-26)
- clippy 0.1.73 (cc66ad4 2023-10-03)
Annotations
Check failure on line 558 in src/lazy/expanded/template.rs
github-actions / clippy
this expression creates a reference which is immediately dereferenced by the compiler
error: this expression creates a reference which is immediately dereferenced by the compiler
--> src/lazy/expanded/template.rs:558:77
|
558 | expr_index += 1 + Self::fmt_expr(f, indentation, host_template, &value)?;
| ^^^^^^ help: change this to: `value`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
= note: `-D clippy::needless-borrow` implied by `-D warnings`
Check failure on line 109 in src/lazy/expanded/template.rs
github-actions / clippy
called `.as_ref().map(String::as_str)` on an Option value. This can be done more directly by calling `self.name.as_deref()` instead
error: called `.as_ref().map(String::as_str)` on an Option value. This can be done more directly by calling `self.name.as_deref()` instead
--> src/lazy/expanded/template.rs:107:9
|
107 | / self.name
108 | | .as_ref()
109 | | .map(String::as_str)
| |________________________________^ help: try using as_deref instead: `self.name.as_deref()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_as_ref_deref
= note: `-D clippy::option-as-ref-deref` implied by `-D warnings`
Check failure on line 558 in src/lazy/expanded/template.rs
github-actions / clippy
this expression creates a reference which is immediately dereferenced by the compiler
error: this expression creates a reference which is immediately dereferenced by the compiler
--> src/lazy/expanded/template.rs:558:77
|
558 | expr_index += 1 + Self::fmt_expr(f, indentation, host_template, &value)?;
| ^^^^^^ help: change this to: `value`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
= note: `-D clippy::needless-borrow` implied by `-D warnings`
Check failure on line 109 in src/lazy/expanded/template.rs
github-actions / clippy
called `.as_ref().map(String::as_str)` on an Option value. This can be done more directly by calling `self.name.as_deref()` instead
error: called `.as_ref().map(String::as_str)` on an Option value. This can be done more directly by calling `self.name.as_deref()` instead
--> src/lazy/expanded/template.rs:107:9
|
107 | / self.name
108 | | .as_ref()
109 | | .map(String::as_str)
| |________________________________^ help: try using as_deref instead: `self.name.as_deref()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_as_ref_deref
= note: `-D clippy::option-as-ref-deref` implied by `-D warnings`