Clarify two more comments (#2384)
* Make language clearer * Two more comments
This commit is contained in:
parent
d4101a671c
commit
24aa640df7
@ -280,7 +280,8 @@ impl Tree {
|
|||||||
for i in 0..self.size() {
|
for i in 0..self.size() {
|
||||||
let node_id = NodeId::from(i);
|
let node_id = NodeId::from(i);
|
||||||
let nonterm = self.get_rule(node_id, ctx).nonterm();
|
let nonterm = self.get_rule(node_id, ctx).nonterm();
|
||||||
//sanity check
|
|
||||||
|
// This should never panic!
|
||||||
let (nterm_id, node) = stack.pop().expect("Not a valid tree for unparsing!");
|
let (nterm_id, node) = stack.pop().expect("Not a valid tree for unparsing!");
|
||||||
if nterm_id == nonterm {
|
if nterm_id == nonterm {
|
||||||
self.paren[i] = node;
|
self.paren[i] = node;
|
||||||
|
@ -822,7 +822,7 @@ mod tests {
|
|||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_map_is_novel() {
|
fn test_map_is_novel() {
|
||||||
// sanity check
|
// This should always hold
|
||||||
assert!(AllIsNovel::is_novel(0_u8, 0));
|
assert!(AllIsNovel::is_novel(0_u8, 0));
|
||||||
|
|
||||||
assert!(!NextPow2IsNovel::is_novel(0_u8, 0));
|
assert!(!NextPow2IsNovel::is_novel(0_u8, 0));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user