Use Pin
and a union to avoid UB in `TemplateBuf
#105
clippy
16 warnings
Details
Results
Message level | Amount |
---|---|
Internal compiler error | 0 |
Error | 0 |
Warning | 16 |
Note | 0 |
Help | 0 |
Versions
- rustc 1.83.0 (90b35a623 2024-11-26)
- cargo 1.83.0 (5ffbef321 2024-10-29)
- clippy 0.1.83 (90b35a6 2024-11-26)
Annotations
Check warning on line 444 in src/template/mod.rs
github-actions / clippy
deref which would be done by auto-deref
warning: deref which would be done by auto-deref
--> src/template/mod.rs:444:12
|
444 | source: &*source,
| ^^^^^^^^ help: try: `&source`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref
Check warning on line 373 in src/template/mod.rs
github-actions / clippy
deref which would be done by auto-deref
warning: deref which would be done by auto-deref
--> src/template/mod.rs:373:43
|
373 | let template = ByteTemplate::from_slice(&*source)?;
| ^^^^^^^^ help: try: `&source`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref
Check warning on line 334 in src/template/mod.rs
github-actions / clippy
deref which would be done by auto-deref
warning: deref which would be done by auto-deref
--> src/template/mod.rs:334:12
|
334 | source: &*source,
| ^^^^^^^^ help: try: `&source`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref
Check warning on line 217 in src/template/mod.rs
github-actions / clippy
deref which would be done by auto-deref
warning: deref which would be done by auto-deref
--> src/template/mod.rs:217:12
|
217 | source: &*source,
| ^^^^^^^^ help: try: `&source`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref
Check warning on line 149 in src/template/mod.rs
github-actions / clippy
deref which would be done by auto-deref
warning: deref which would be done by auto-deref
--> src/template/mod.rs:149:37
|
149 | let template = Template::from_str(&*source)?;
| ^^^^^^^^ help: try: `&source`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref
Check warning on line 112 in src/template/mod.rs
github-actions / clippy
deref which would be done by auto-deref
warning: deref which would be done by auto-deref
--> src/template/mod.rs:112:12
|
112 | source: &*source,
| ^^^^^^^^ help: try: `&source`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref
= note: `#[warn(clippy::explicit_auto_deref)]` on by default
Check warning on line 463 in src/error.rs
github-actions / clippy
this manual char comparison can be written more succinctly
warning: this manual char comparison can be written more succinctly
--> src/error.rs:463:32
|
463 | match source[position..].find(|c| c == '\n' || c == '\r') {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using an array of `char`: `['\n', '\r']`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_pattern_char_comparison
Check warning on line 456 in src/error.rs
github-actions / clippy
this manual char comparison can be written more succinctly
warning: this manual char comparison can be written more succinctly
--> src/error.rs:456:33
|
456 | match source[..position].rfind(|c| c == '\n' || c == '\r') {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using an array of `char`: `['\n', '\r']`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_pattern_char_comparison
= note: `#[warn(clippy::manual_pattern_char_comparison)]` on by default
Check warning on line 444 in src/template/mod.rs
github-actions / clippy
deref which would be done by auto-deref
warning: deref which would be done by auto-deref
--> src/template/mod.rs:444:12
|
444 | source: &*source,
| ^^^^^^^^ help: try: `&source`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref
Check warning on line 373 in src/template/mod.rs
github-actions / clippy
deref which would be done by auto-deref
warning: deref which would be done by auto-deref
--> src/template/mod.rs:373:43
|
373 | let template = ByteTemplate::from_slice(&*source)?;
| ^^^^^^^^ help: try: `&source`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref
Check warning on line 334 in src/template/mod.rs
github-actions / clippy
deref which would be done by auto-deref
warning: deref which would be done by auto-deref
--> src/template/mod.rs:334:12
|
334 | source: &*source,
| ^^^^^^^^ help: try: `&source`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref
Check warning on line 217 in src/template/mod.rs
github-actions / clippy
deref which would be done by auto-deref
warning: deref which would be done by auto-deref
--> src/template/mod.rs:217:12
|
217 | source: &*source,
| ^^^^^^^^ help: try: `&source`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref
Check warning on line 149 in src/template/mod.rs
github-actions / clippy
deref which would be done by auto-deref
warning: deref which would be done by auto-deref
--> src/template/mod.rs:149:37
|
149 | let template = Template::from_str(&*source)?;
| ^^^^^^^^ help: try: `&source`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref
Check warning on line 112 in src/template/mod.rs
github-actions / clippy
deref which would be done by auto-deref
warning: deref which would be done by auto-deref
--> src/template/mod.rs:112:12
|
112 | source: &*source,
| ^^^^^^^^ help: try: `&source`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref
= note: `#[warn(clippy::explicit_auto_deref)]` on by default
Check warning on line 463 in src/error.rs
github-actions / clippy
this manual char comparison can be written more succinctly
warning: this manual char comparison can be written more succinctly
--> src/error.rs:463:32
|
463 | match source[position..].find(|c| c == '\n' || c == '\r') {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using an array of `char`: `['\n', '\r']`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_pattern_char_comparison
Check warning on line 456 in src/error.rs
github-actions / clippy
this manual char comparison can be written more succinctly
warning: this manual char comparison can be written more succinctly
--> src/error.rs:456:33
|
456 | match source[..position].rfind(|c| c == '\n' || c == '\r') {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using an array of `char`: `['\n', '\r']`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_pattern_char_comparison
= note: `#[warn(clippy::manual_pattern_char_comparison)]` on by default