Skip to content

Commit

Permalink
Fix clippy issues
Browse files Browse the repository at this point in the history
  • Loading branch information
emwalker committed Sep 24, 2023
1 parent 3b9ec85 commit e3e46bc
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 19 deletions.
30 changes: 15 additions & 15 deletions src/html5_parser/input_stream.rs
Original file line number Diff line number Diff line change
Expand Up @@ -531,7 +531,7 @@ mod test {
col: 4
}
);
assert_eq!(is.read_char().is_eof(), true);
assert!(is.read_char().is_eof());
assert_eq!(
is.position,
Position {
Expand All @@ -540,7 +540,7 @@ mod test {
col: 4
}
);
assert_eq!(is.read_char().is_eof(), true);
assert!(is.read_char().is_eof());
assert_eq!(
is.position,
Position {
Expand Down Expand Up @@ -675,13 +675,13 @@ mod test {
assert_eq!(is.read_char().utf8(), 'c');
assert_eq!(is.read_char().utf8(), 'd');
assert_eq!(is.chars_left(), 0);
assert_eq!(is.eof(), true);
assert!(is.eof());

is.reset();
assert_eq!(is.look_ahead(0).utf8(), 'a');
assert_eq!(is.look_ahead(3).utf8(), 'c');
assert_eq!(is.look_ahead(1).utf8(), 'b');
assert_eq!(is.look_ahead(100).is_eof(), true);
assert!(is.look_ahead(100).is_eof());

is.seek(SeekMode::SeekSet, 0);
assert_eq!(is.look_ahead_slice(1), "a");
Expand Down Expand Up @@ -733,19 +733,19 @@ mod test {
assert_eq!(is.read_char().utf8(), 'a');
assert_eq!(is.read_char().utf8(), 'b');
assert_eq!(is.read_char().utf8(), 'c');
assert_eq!(is.read_char().is_eof(), true);
assert_eq!(is.read_char().is_eof(), true);
assert_eq!(is.read_char().is_eof(), true);
assert_eq!(is.read_char().is_eof(), true);
assert!(is.read_char().is_eof());
assert!(is.read_char().is_eof());
assert!(is.read_char().is_eof());
assert!(is.read_char().is_eof());
is.unread();
assert_eq!(is.read_char().is_eof(), true);
assert!(is.read_char().is_eof());
is.unread();
is.unread();
assert_eq!(is.read_char().is_eof(), false);
assert_eq!(is.read_char().is_eof(), true);
assert!(!is.read_char().is_eof());
assert!(is.read_char().is_eof());
is.unread();
is.unread();
assert_eq!(is.read_char().is_eof(), false);
assert!(!is.read_char().is_eof());
is.unread();
is.unread();
is.unread();
Expand All @@ -764,12 +764,12 @@ mod test {
assert_eq!(is.read_char().utf8(), 'a');
assert_eq!(is.read_char().utf8(), 'b');
assert_eq!(is.read_char().utf8(), 'c');
assert_eq!(is.read_char().is_eof(), true);
assert!(is.read_char().is_eof());
is.unread();
is.unread();
assert_eq!(is.read_char().utf8(), 'c');
assert_eq!(is.read_char().is_eof(), true);
assert!(is.read_char().is_eof());
is.unread();
assert_eq!(is.read_char().is_eof(), true);
assert!(is.read_char().is_eof());
}
}
8 changes: 4 additions & 4 deletions src/html5_parser/node.rs
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ mod test {
let mut attributes = HashMap::new();
attributes.insert("id".to_string(), "test".to_string());
let node = Node::new_element("div", attributes, HTML_NAMESPACE);
assert_eq!(node.is_special(), true);
assert!(node.is_special());
}

#[test]
Expand All @@ -332,7 +332,7 @@ mod test {
let mut attributes = HashMap::new();
attributes.insert("id".to_string(), "test".to_string());
let node = Node::new_element(element, attributes, HTML_NAMESPACE);
assert_eq!(node.is_special(), true);
assert!(node.is_special());
}
}

Expand All @@ -342,7 +342,7 @@ mod test {
let mut attributes = HashMap::new();
attributes.insert("id".to_string(), "test".to_string());
let node = Node::new_element(element, attributes, MATHML_NAMESPACE);
assert_eq!(node.is_special(), true);
assert!(node.is_special());
}
}

Expand All @@ -352,7 +352,7 @@ mod test {
let mut attributes = HashMap::new();
attributes.insert("id".to_string(), "test".to_string());
let node = Node::new_element(element, attributes, SVG_NAMESPACE);
assert_eq!(node.is_special(), true);
assert!(node.is_special());
}
}

Expand Down

0 comments on commit e3e46bc

Please sign in to comment.