binding: Make walk_with_properties take an &[u8]

This commit is contained in:
Vicent Marti 2019-02-06 10:10:55 +01:00
parent 9a951c859d
commit a8cc082ce2
2 changed files with 6 additions and 6 deletions

View file

@ -40,7 +40,7 @@ fn test_walk_with_properties_with_nth_child() {
parser.set_language(language).unwrap();
let tree = parser.parse(source_code, None).unwrap();
let mut cursor = tree.walk_with_properties(&property_sheet, source_code);
let mut cursor = tree.walk_with_properties(&property_sheet, source_code.as_bytes());
assert_eq!(cursor.node().kind(), "program");
assert!(cursor.goto_first_child());
assert_eq!(cursor.node().kind(), "expression_statement");
@ -98,7 +98,7 @@ fn test_walk_with_properties_with_regexes() {
parser.set_language(language).unwrap();
let tree = parser.parse(source_code, None).unwrap();
let mut cursor = tree.walk_with_properties(&property_sheet, source_code);
let mut cursor = tree.walk_with_properties(&property_sheet, source_code.as_bytes());
assert_eq!(cursor.node().kind(), "program");
assert!(cursor.goto_first_child());
assert_eq!(cursor.node().kind(), "lexical_declaration");