Skip to content

Commit b589d2a

Browse files
authored
style: rename local variable
1 parent 7ad2b65 commit b589d2a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/string/anagram.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,13 +57,13 @@ fn clean_string(s: &str) -> Result<String, AnagramError> {
5757
///
5858
/// # Returns
5959
///
60-
/// * A `HashMap` where the keys are characters and values are their frequencies.
60+
/// * A `HashMap` where the keys are characters and values are their count.
6161
fn char_count(s: &str) -> HashMap<char, usize> {
62-
let mut freq = HashMap::new();
62+
let mut res = HashMap::new();
6363
for c in s.chars() {
64-
*freq.entry(c).or_insert(0) += 1;
64+
*res.entry(c).or_insert(0) += 1;
6565
}
66-
freq
66+
res
6767
}
6868

6969
#[cfg(test)]

0 commit comments

Comments
 (0)