Rename RUF101 to RUF004 (#1020)

This commit is contained in:
Charlie Marsh 2022-12-03 22:46:13 -05:00 committed by GitHub
parent 8a3f29497b
commit c659cb86d9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 39 additions and 33 deletions

View file

@ -57,13 +57,15 @@ pub fn main(cli: &Cli) -> Result<()> {
for i in 0..=code_suffix_len {
let source = code_str[..code_prefix_len + i].to_string();
let destination = alias[..alias_prefix_len + i].to_string();
prefix_to_codes.insert(
destination,
prefix_to_codes
.get(&source)
.unwrap_or_else(|| panic!("Unknown CheckCode: {source:?}"))
.clone(),
);
if source != destination {
prefix_to_codes.insert(
destination,
prefix_to_codes
.get(&source)
.unwrap_or_else(|| panic!("Unknown CheckCode: {source:?}"))
.clone(),
);
}
}
}