Throw a warning instead of crashing

This commit is contained in:
fantacell 2025-08-25 22:29:23 +02:00
parent 95f164b5ec
commit ea14bbbfa8

View file

@ -94,13 +94,13 @@ trait BoundedObject {
let inner_start = self let inner_start = self
.next_start(map, outer_range.start, false) .next_start(map, outer_range.start, false)
.unwrap_or_else(|| { .unwrap_or_else(|| {
todo!(); log::warn!("The motion might not have found the text object correctly");
outer_range.start outer_range.start
}); });
let inner_end = self let inner_end = self
.previous_end(map, outer_range.end, false) .previous_end(map, outer_range.end, false)
.unwrap_or_else(|| { .unwrap_or_else(|| {
todo!(); log::warn!("The motion might not have found the text object correctly");
outer_range.end outer_range.end
}); });
inner_start..inner_end inner_start..inner_end