Skip to content

Commit 8251a41

Browse files
committed
fix clippy
Signed-off-by: Ruihang Xia <waynestxia@gmail.com>
1 parent 0cd8d76 commit 8251a41

File tree

1 file changed

+3
-3
lines changed
  • datafusion/functions/src/string

1 file changed

+3
-3
lines changed

datafusion/functions/src/string/chr.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -157,11 +157,11 @@ mod tests {
157157
]));
158158
let result = chr(&[input]).unwrap();
159159
let string_array = result.as_any().downcast_ref::<StringArray>().unwrap();
160-
let expected = vec!["A", "B", "C", "🚀", "€", "α", "", " ", "\n", "\t"];
160+
let expected = ["A", "B", "C", "🚀", "€", "α", "", " ", "\n", "\t"];
161161

162162
assert_eq!(string_array.len(), 10);
163-
for i in 0..string_array.len() {
164-
assert_eq!(string_array.value(i), expected[i]);
163+
for (i, e) in expected.iter().enumerate() {
164+
assert_eq!(string_array.value(i), *e);
165165
}
166166
}
167167

0 commit comments

Comments
 (0)