From 53dd94444c6168047565c3cb997256f8f8333524 Mon Sep 17 00:00:00 2001 From: Koichi Akabe Date: Tue, 11 Oct 2022 15:32:09 +0900 Subject: [PATCH] Remove unnecessary casting (#65) --- vaporetto/src/char_scorer/boundary_tag_scorer.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vaporetto/src/char_scorer/boundary_tag_scorer.rs b/vaporetto/src/char_scorer/boundary_tag_scorer.rs index dce3c34..131e2c5 100644 --- a/vaporetto/src/char_scorer/boundary_tag_scorer.rs +++ b/vaporetto/src/char_scorer/boundary_tag_scorer.rs @@ -151,8 +151,8 @@ impl CharScorerBoundaryTag { &mut sentence.boundary_scores, ); } - debug_assert!(end as usize <= sentence.char_pma_states.len()); - unsafe { *sentence.char_pma_states.get_unchecked_mut(end as usize - 1) = m.value() }; + debug_assert!(end <= sentence.char_pma_states.len()); + unsafe { *sentence.char_pma_states.get_unchecked_mut(end - 1) = m.value() }; } }