summary refs log tree commit diff
path: root/src/libsyntax/codemap.rs
diff options
context:
space:
mode:
authorCorey Richardson <corey@octayn.net>2013-05-18 22:02:45 -0400
committerCorey Richardson <corey@octayn.net>2013-05-19 08:16:02 -0400
commitcc57ca012a1f49875e19b1b089c91928dc339979 (patch)
tree9f10c27962dbb7c844bc3abb7e20119d75f02aa6 /src/libsyntax/codemap.rs
parent3acf37897a4ca7f019ed8894ec3878801377773d (diff)
downloadrust-cc57ca012a1f49875e19b1b089c91928dc339979.tar.gz
rust-cc57ca012a1f49875e19b1b089c91928dc339979.zip
Use assert_eq! rather than assert! where possible
Diffstat (limited to 'src/libsyntax/codemap.rs')
-rw-r--r--src/libsyntax/codemap.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libsyntax/codemap.rs b/src/libsyntax/codemap.rs
index 44a368738fd..61921fbf090 100644
--- a/src/libsyntax/codemap.rs
+++ b/src/libsyntax/codemap.rs
@@ -319,7 +319,7 @@ pub impl FileMap {
     fn next_line(&self, pos: BytePos) {
         // the new charpos must be > the last one (or it's the first one).
         let lines = &mut *self.lines;
-        assert!((lines.len() == 0) || (lines[lines.len() - 1] < pos));
+        assert!((lines.len() == 0) || (lines[lines.len() - 1] < pos))
         lines.push(pos);
     }
 
@@ -458,7 +458,7 @@ pub impl CodeMap {
     pub fn span_to_snippet(&self, sp: span) -> ~str {
         let begin = self.lookup_byte_offset(sp.lo);
         let end = self.lookup_byte_offset(sp.hi);
-        assert!(begin.fm.start_pos == end.fm.start_pos);
+        assert_eq!(begin.fm.start_pos, end.fm.start_pos);
         return str::slice(*begin.fm.src,
                           begin.pos.to_uint(), end.pos.to_uint()).to_owned();
     }