@@ -895,7 +895,7 @@ where
895
895
let line = result?;
896
896
897
897
let id = get_field_not_null ( & line, 0 , "id" , & corpus_tab_path) ?. parse :: < u32 > ( ) ?;
898
- let name = get_field_not_null ( & line, 1 , "name" , & corpus_tab_path) ?;
898
+ let mut name = get_field_not_null ( & line, 1 , "name" , & corpus_tab_path) ?;
899
899
900
900
let corpus_type = get_field_not_null ( & line, 2 , "type" , & corpus_tab_path) ?;
901
901
if corpus_type == "DOCUMENT" {
@@ -908,7 +908,7 @@ where
908
908
. or_insert ( 1 ) ;
909
909
if * existing_count > 1 {
910
910
let old_name = name. clone ( ) ;
911
- let name = format ! ( "{}_duplicated_document_name_{}" , name, existing_count) ;
911
+ name = format ! ( "{}_duplicated_document_name_{}" , name, existing_count) . into ( ) ;
912
912
warn ! (
913
913
"duplicated document name \" {}\" detected: will be renamed to \" {}\" " ,
914
914
old_name, name
@@ -1288,7 +1288,7 @@ where
1288
1288
let mut covered_text_before =
1289
1289
std:: string:: String :: with_capacity ( token_left_char - current_text_offset) ;
1290
1290
let mut skipped_before_token = 0 ;
1291
- for _ in current_text_offset..token_left_char {
1291
+ for _ in current_text_offset..( token_left_char - 1 ) {
1292
1292
if let Some ( c) = text_char_it. next ( ) {
1293
1293
covered_text_before. push ( c) ;
1294
1294
skipped_before_token += 1 ;
0 commit comments