File tree 2 files changed +2
-2
lines changed
2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -110,7 +110,7 @@ impl Compiler {
110
110
/// specified size limit. If the size limit is exceeded, then compilation
111
111
/// stops and returns an error.
112
112
pub fn compile ( mut self , exprs : & [ Hir ] ) -> result:: Result < Program , Error > {
113
- debug_assert ! ( exprs. len ( ) >= 1 ) ;
113
+ debug_assert ! ( ! exprs. is_empty ( ) ) ;
114
114
self . num_exprs = exprs. len ( ) ;
115
115
if exprs. len ( ) == 1 {
116
116
self . compile_one ( & exprs[ 0 ] )
Original file line number Diff line number Diff line change @@ -570,7 +570,7 @@ impl BoyerMooreSearch {
570
570
/// Create a new string searcher, performing whatever
571
571
/// compilation steps are required.
572
572
fn new ( pattern : Vec < u8 > ) -> Self {
573
- debug_assert ! ( pattern. len ( ) > 0 ) ;
573
+ debug_assert ! ( ! pattern. is_empty ( ) ) ;
574
574
575
575
let ( g, gi) = Self :: select_guard ( pattern. as_slice ( ) ) ;
576
576
let skip_table = Self :: compile_skip_table ( pattern. as_slice ( ) ) ;
You can’t perform that action at this time.
0 commit comments