Skip to content

Commit cefd5c5

Browse files
authored
Use sort_by_key() instead of sort_by() (#110)
1 parent 25f3011 commit cefd5c5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/charwise/builder.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ impl CharwiseDoubleArrayAhoCorasickBuilder {
274274
for (&label, &child_id) in &s.edges {
275275
mapped.push((self.mapper.get(label).unwrap(), child_id));
276276
}
277-
mapped.sort_by(|(c1, _), (c2, _)| c1.cmp(c2));
277+
mapped.sort_by_key(|x| x.0);
278278

279279
let base = self.find_base(&mapped, &helper);
280280
if self.states.len() <= usize::from_u32(base.get()) {

0 commit comments

Comments
 (0)