feat: add diff normalization logic util #1830
Annotations
4 errors
this expression creates a reference which is immediately dereferenced by the compiler:
crates/util/src/diff_standardizer.rs#L108
error: this expression creates a reference which is immediately dereferenced by the compiler
--> crates/util/src/diff_standardizer.rs:108:49
|
108 | standardized_after.push_str(&content);
| ^^^^^^^^ help: change this to: `content`
|
= 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`
= help: to override `-D warnings` add `#[allow(clippy::needless_borrow)]`
|
variable does not need to be mutable:
crates/util/src/diff_standardizer.rs#L105
error: variable does not need to be mutable
--> crates/util/src/diff_standardizer.rs:105:17
|
105 | let mut current_line = before_line_num;
| ----^^^^^^^^^^^^
| |
| help: remove this `mut`
|
= note: `-D unused-mut` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(unused_mut)]`
|
unused import: `Delta`:
crates/util/src/diff_standardizer.rs#L8
error: unused import: `Delta`
--> crates/util/src/diff_standardizer.rs:8:12
|
8 | use git2::{Delta, DiffLineType, DiffOptions, Repository};
| ^^^^^
|
= note: `-D unused-imports` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(unused_imports)]`
|
external crate `tempfile` unused in `marzano_util`: remove the dependency or add `use tempfile as _;`:
crates/util/src/lib.rs#L1
error: external crate `tempfile` unused in `marzano_util`: remove the dependency or add `use tempfile as _;`
|
= note: `-D unused-crate-dependencies` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(unused_crate_dependencies)]`
|