Add a hand-written error message for the seek_internal precondition

This commit is contained in:
Max Brunsfeld 2021-06-02 15:08:29 -07:00
parent 01cfba0f8e
commit 2c8d5973f3

View file

@ -413,7 +413,12 @@ where
D: Dimension<'a, T::Summary>,
{
if let Some(target) = target {
debug_assert!(target.cmp(&self.seek_dimension, cx) >= Ordering::Equal);
debug_assert!(
target.cmp(&self.seek_dimension, cx) >= Ordering::Equal,
"cannot seek backward from {:?} to {:?}",
self.seek_dimension,
target
);
}
if !self.did_seek {