File tree 2 files changed +7
-2
lines changed
2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -365,7 +365,9 @@ impl MultiValueU128FastFieldWriter {
365
365
for field_value in doc. field_values ( ) {
366
366
if field_value. field == self . field {
367
367
let value = field_value. value ( ) ;
368
- let ip_addr = value. as_ip ( ) . unwrap ( ) ;
368
+ let ip_addr = value
369
+ . as_ip ( )
370
+ . expect ( & format ! ( "expected and ip, but got {:?}" , value) ) ;
369
371
let value = ip_addr. to_u128 ( ) ;
370
372
self . add_val ( value) ;
371
373
}
Original file line number Diff line number Diff line change @@ -329,7 +329,10 @@ impl U128FastFieldWriter {
329
329
pub fn add_document ( & mut self , doc : & Document ) {
330
330
match doc. get_first ( self . field ) {
331
331
Some ( v) => {
332
- let ip_addr = v. as_ip ( ) . unwrap ( ) ;
332
+ let ip_addr = v
333
+ . as_ip ( )
334
+ . expect ( & format ! ( "expected and ip, but got {:?}" , v) ) ;
335
+
333
336
let value = ip_addr. to_u128 ( ) ;
334
337
self . add_val ( value) ;
335
338
}
You can’t perform that action at this time.
0 commit comments