Change all runtime asserts in private functions to debug_assert.
These functions aren't exposed to the public so we can confidently say that if they work in dev then they will work in production. Removing these asserts theoretically should result in a speedup.
This commit is contained in:
@@ -72,8 +72,8 @@ impl<'s> OrgSource<'s> {
|
||||
}
|
||||
|
||||
pub(crate) fn get_until(&self, other: OrgSource<'s>) -> OrgSource<'s> {
|
||||
assert!(other.start >= self.start);
|
||||
assert!(other.end <= self.end);
|
||||
debug_assert!(other.start >= self.start);
|
||||
debug_assert!(other.end <= self.end);
|
||||
self.slice(..(other.start - self.start))
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user