mirror of
https://github.com/servo/servo.git
synced 2025-08-03 20:50:07 +01:00
Change debug assertions to specific ones
This commit is contained in:
parent
2cf0077be1
commit
661d234c3c
23 changed files with 53 additions and 53 deletions
|
@ -291,7 +291,7 @@ fn split_at_utf16_code_unit_offset(s: &str, offset: u32) -> Result<(&str, Option
|
|||
if c > '\u{FFFF}' {
|
||||
if code_units == offset {
|
||||
if opts::get().replace_surrogates {
|
||||
debug_assert!(c.len_utf8() == 4);
|
||||
debug_assert_eq!(c.len_utf8(), 4);
|
||||
return Ok((&s[..i], Some(c), &s[i + c.len_utf8()..]))
|
||||
}
|
||||
panic!("\n\n\
|
||||
|
|
|
@ -1334,7 +1334,7 @@ impl TreeIterator {
|
|||
}
|
||||
self.depth -= 1;
|
||||
}
|
||||
debug_assert!(self.depth == 0);
|
||||
debug_assert_eq!(self.depth, 0);
|
||||
self.current = None;
|
||||
Some(current)
|
||||
}
|
||||
|
|
|
@ -313,7 +313,7 @@ impl WebGLTexture {
|
|||
}
|
||||
|
||||
fn is_cube_complete(&self) -> bool {
|
||||
debug_assert!(self.face_count.get() == 6);
|
||||
debug_assert_eq!(self.face_count.get(), 6);
|
||||
|
||||
let image_info = self.base_image_info().unwrap();
|
||||
if !image_info.is_defined() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue