Skip to content

Commit

Permalink
style: lint
Browse files Browse the repository at this point in the history
  • Loading branch information
pplmx committed Oct 1, 2024
1 parent 3288ee9 commit 91a2bf5
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tests/test_husky.rs
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,10 @@ impl TestProject {
// Add husky-rs to the suitable section
let husky_rs_dep = format!("husky-rs = {{ path = {:?} }}\n", relative_crate_path);
if let Some(pos) = cargo_toml.find(&format!("[{}]", dependencies_type)) {
let insert_pos = cargo_toml[pos..].find('\n').map(|p| p + pos + 1).unwrap_or(cargo_toml.len());
let insert_pos = cargo_toml[pos..]
.find('\n')
.map(|p| p + pos + 1)
.unwrap_or(cargo_toml.len());
cargo_toml.insert_str(insert_pos, &husky_rs_dep);
}

Expand Down

0 comments on commit 91a2bf5

Please sign in to comment.