@@ -504,7 +504,7 @@ impl Pointer {
504
504
match token. as_str ( ) {
505
505
"0" => {
506
506
// first element will be traversed when we recurse
507
- * dest = vec ! [ Value :: Null ] . into ( ) ;
507
+ * dest = alloc :: vec![ Value :: Null ] . into ( ) ;
508
508
}
509
509
"-" => {
510
510
// new element will be appended when we recurse
@@ -994,14 +994,13 @@ impl core::fmt::Display for PointerBuf {
994
994
995
995
#[ cfg( test) ]
996
996
mod tests {
997
+ use super :: * ;
998
+ use crate :: { Resolve , ResolveMut } ;
999
+ use alloc:: vec;
997
1000
use quickcheck:: TestResult ;
998
1001
use quickcheck_macros:: quickcheck;
999
1002
use serde_json:: json;
1000
1003
1001
- use crate :: { Resolve , ResolveMut } ;
1002
-
1003
- use super :: * ;
1004
-
1005
1004
#[ test]
1006
1005
#[ should_panic]
1007
1006
fn from_const_validates ( ) {
@@ -1603,11 +1602,7 @@ mod tests {
1603
1602
while let Some ( token) = ptr. pop_back ( ) {
1604
1603
tokens. push ( token) ;
1605
1604
}
1606
- if dbg ! ( ptr. count( ) != 0 )
1607
- || dbg ! ( !ptr. is_root( ) )
1608
- || dbg ! ( ptr. last( ) . is_some( ) )
1609
- || dbg ! ( ptr. first( ) . is_some( ) )
1610
- {
1605
+ if ptr. count ( ) != 0 || !ptr. is_root ( ) || ptr. last ( ) . is_some ( ) || ptr. first ( ) . is_some ( ) {
1611
1606
return false ;
1612
1607
}
1613
1608
for token in tokens. drain ( ..) {
@@ -1619,11 +1614,7 @@ mod tests {
1619
1614
while let Some ( token) = ptr. pop_front ( ) {
1620
1615
tokens. push ( token) ;
1621
1616
}
1622
- if dbg ! ( ptr. count( ) != 0 )
1623
- || dbg ! ( !ptr. is_root( ) )
1624
- || dbg ! ( ptr. last( ) . is_some( ) )
1625
- || dbg ! ( ptr. first( ) . is_some( ) )
1626
- {
1617
+ if ptr. count ( ) != 0 || !ptr. is_root ( ) || ptr. last ( ) . is_some ( ) || ptr. first ( ) . is_some ( ) {
1627
1618
return false ;
1628
1619
}
1629
1620
for token in tokens {
@@ -1658,7 +1649,7 @@ mod tests {
1658
1649
}
1659
1650
}
1660
1651
{
1661
- let fmt = format ! ( "/{}{tail}" , head. encoded( ) ) ;
1652
+ let fmt = alloc :: format!( "/{}{tail}" , head. encoded( ) ) ;
1662
1653
if Pointer :: parse ( & fmt) . unwrap ( ) != ptr {
1663
1654
return false ;
1664
1655
}
@@ -1693,7 +1684,7 @@ mod tests {
1693
1684
}
1694
1685
}
1695
1686
{
1696
- let fmt = format ! ( "{head}/{}" , tail. encoded( ) ) ;
1687
+ let fmt = alloc :: format!( "{head}/{}" , tail. encoded( ) ) ;
1697
1688
if Pointer :: parse ( & fmt) . unwrap ( ) != ptr {
1698
1689
return false ;
1699
1690
}
0 commit comments