Skip to content

Commit

Permalink
refactor: modify according to clippy's prompts
Browse files Browse the repository at this point in the history
  • Loading branch information
msdlisper committed Nov 3, 2023
1 parent 1bcbff6 commit fbc594b
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -535,8 +535,8 @@ impl Rule for UseExhaustiveDependencies {
for (dependency_text, dependency_range) in deps.iter() {
// capture_text and dependency_text should filter the "?" inside
// in order to ignore optional chaining
let filter_capture_text = capture_text.replace("?", "");
let filter_dependency_text = dependency_text.replace("?", "");
let filter_capture_text = capture_text.replace('?', "");
let filter_dependency_text = dependency_text.replace('?', "");
let capture_deeper_than_dependency =
filter_capture_text.starts_with(&filter_dependency_text);
let dependency_deeper_than_capture =
Expand Down Expand Up @@ -594,8 +594,8 @@ impl Rule for UseExhaustiveDependencies {
for (capture_text, _, _) in captures.iter() {
// capture_text and dependency_text should filter the "?" inside
// in order to ignore optional chaining
let filter_capture_text = capture_text.replace("?", "");
let filter_dependency_text = dependency_text.replace("?", "");
let filter_capture_text = capture_text.replace('?', "");
let filter_dependency_text = dependency_text.replace('?', "");
let capture_deeper_dependency =
filter_capture_text.starts_with(&filter_dependency_text);
let dependency_deeper_capture =
Expand Down

0 comments on commit fbc594b

Please sign in to comment.