@@ -895,7 +895,7 @@ where
895895 let line = result?;
896896
897897 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) ?;
899899
900900 let corpus_type = get_field_not_null ( & line, 2 , "type" , & corpus_tab_path) ?;
901901 if corpus_type == "DOCUMENT" {
@@ -908,7 +908,7 @@ where
908908 . or_insert ( 1 ) ;
909909 if * existing_count > 1 {
910910 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 ( ) ;
912912 warn ! (
913913 "duplicated document name \" {}\" detected: will be renamed to \" {}\" " ,
914914 old_name, name
@@ -1288,7 +1288,7 @@ where
12881288 let mut covered_text_before =
12891289 std:: string:: String :: with_capacity ( token_left_char - current_text_offset) ;
12901290 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 ) {
12921292 if let Some ( c) = text_char_it. next ( ) {
12931293 covered_text_before. push ( c) ;
12941294 skipped_before_token += 1 ;
0 commit comments