Something wrong with rust iterator...

Signed-off-by: Hanif Bin Ariffin <hanif.ariffin.4326@gmail.com>
This commit is contained in:
Hanif Bin Ariffin 2021-07-25 16:16:12 +08:00
parent 5a0870bb30
commit 43dbff7c56

View file

@ -487,7 +487,7 @@ impl TranslateOperation {
if truncate_set1_flag {
set1_solved.truncate(set2_solved.len());
}
let fallback = set2.iter().map(Sequence::last).last().flatten().expect(
let fallback = set2.last().map(Sequence::last).flatten().expect(
format!(
"{}: when not truncating set1, string2 must be non-empty",
executable!()