Do not intern filemap to entry w/ mismatched length. Fix #37274 (I think).

This commit is contained in:
Felix S. Klock II 2016-10-28 17:12:54 +02:00
parent c40fad34e2
commit 3f639a0f11
2 changed files with 7 additions and 0 deletions

View file

@ -481,6 +481,9 @@ impl FileMap {
self.src.is_none()
}
pub fn byte_length(&self) -> u32 {
self.end_pos.0 - self.start_pos.0
}
pub fn count_lines(&self) -> usize {
self.lines.borrow().len()
}