Add a hand-written error message for the seek_internal precondition

This commit is contained in:
Max Brunsfeld
2021-06-02 16:28:27 -07:00
parent 01cfba0f8e
commit 2c8d5973f3
+6 -1
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 {