@@ -910,7 +910,7 @@ where
910910 . or_insert ( 1 ) ;
911911 if * existing_count > 1 {
912912 let old_name = name. clone ( ) ;
913- name = format ! ( "{}_duplicated_document_name_{}" , name, existing_count) . into ( ) ;
913+ name = format ! ( "{}_duplicated_document_name_{}" , name, existing_count) ;
914914 warn ! (
915915 "duplicated document name \" {}\" detected: will be renamed to \" {}\" " ,
916916 old_name, name
@@ -928,7 +928,7 @@ where
928928 CorpusTableEntry {
929929 pre : pre_order,
930930 post : post_order,
931- normalized_name : String :: from ( normalized_name. to_string ( ) ) ,
931+ normalized_name : normalized_name. to_string ( ) ,
932932 name,
933933 } ,
934934 ) ;
@@ -1050,7 +1050,7 @@ where
10501050 . to_string ( ) ,
10511051 layer : ordering_layer,
10521052 component_type : AnnotationComponentType :: Ordering . to_string ( ) ,
1053- component_name : current_textprop. segmentation . clone ( ) . into ( ) ,
1053+ component_name : current_textprop. segmentation . clone ( ) ,
10541054 } ) ?;
10551055 } // end if same text
10561056
@@ -1181,9 +1181,9 @@ fn add_automatic_cov_edge_for_node(
11811181 . get ( & tok_id) ?
11821182 . ok_or ( RelAnnisError :: NodeNotFound ( * tok_id) ) ?
11831183 . to_string ( ) ,
1184- layer : component_layer. into ( ) ,
1184+ layer : component_layer,
11851185 component_type : AnnotationComponentType :: Coverage . to_string ( ) ,
1186- component_name : component_name . into ( ) ,
1186+ component_name,
11871187 } ) ?;
11881188 }
11891189 }
@@ -1461,7 +1461,7 @@ where
14611461 node_name : node_path. clone ( ) ,
14621462 node_type : "node" . to_owned ( ) ,
14631463 } ) ?;
1464- id_to_node_name. insert ( node_nr, node_path. clone ( ) . into ( ) ) ?;
1464+ id_to_node_name. insert ( node_nr, node_path. clone ( ) ) ?;
14651465
14661466 if let Some ( layer) = layer
14671467 && !layer. is_empty ( )
@@ -1866,9 +1866,9 @@ where
18661866 . get ( & target) ?
18671867 . ok_or ( RelAnnisError :: NodeNotFound ( target) ) ?
18681868 . to_string ( ) ,
1869- layer : c. layer . clone ( ) . into ( ) ,
1869+ layer : c. layer . clone ( ) ,
18701870 component_type : c. get_type ( ) . to_string ( ) ,
1871- component_name : c. name . clone ( ) . into ( ) ,
1871+ component_name : c. name . clone ( ) ,
18721872 } ) ?;
18731873
18741874 let pre: u32 = get_field_not_null ( & line, 0 , "pre" , & rank_tab_path) ?. parse ( ) ?;
@@ -1957,7 +1957,7 @@ where
19571957 . get ( & e. target ) ?
19581958 . ok_or ( RelAnnisError :: NodeNotFound ( e. target ) ) ?
19591959 . to_string ( ) ,
1960- layer : c. layer . clone ( ) . into ( ) ,
1960+ layer : c. layer . clone ( ) ,
19611961 component_type : c. get_type ( ) . to_string ( ) ,
19621962 component_name : c. name . to_string ( ) ,
19631963 anno_ns : ns. to_string ( ) ,
@@ -2030,12 +2030,12 @@ fn get_parent_path(cid: u32, corpus_table: &ParsedCorpusTable) -> Result<std::st
20302030}
20312031
20322032fn get_corpus_path ( cid : u32 , corpus_table : & ParsedCorpusTable ) -> Result < String > {
2033- let mut result: String = get_parent_path ( cid, corpus_table) ?. into ( ) ;
2033+ let mut result: String = get_parent_path ( cid, corpus_table) ?;
20342034 let corpus = corpus_table
20352035 . corpus_by_id
20362036 . get ( & cid)
20372037 . ok_or ( RelAnnisError :: CorpusNotFound ( cid) ) ?;
2038- result. push_str ( "/" ) ;
2038+ result. push ( '/' ) ;
20392039 result. push_str ( & corpus. normalized_name ) ;
20402040 Ok ( result)
20412041}
@@ -2080,9 +2080,9 @@ fn add_subcorpora(
20802080 for ( ( entry_cid, anno_key) , val) in corpus_id_to_annos. range ( start_key..) {
20812081 if entry_cid == cid {
20822082 updates. add_event ( UpdateEvent :: AddNodeLabel {
2083- node_name : corpus_table. toplevel_corpus_name . as_str ( ) . into ( ) ,
2084- anno_ns : anno_key. ns . clone ( ) . into ( ) ,
2085- anno_name : anno_key. name . clone ( ) . into ( ) ,
2083+ node_name : corpus_table. toplevel_corpus_name . clone ( ) ,
2084+ anno_ns : anno_key. ns . clone ( ) ,
2085+ anno_name : anno_key. name . clone ( ) ,
20862086 anno_value : val. into ( ) ,
20872087 } ) ?;
20882088 } else {
@@ -2132,8 +2132,8 @@ fn add_subcorpora(
21322132 if entry_cid == corpus_id {
21332133 updates. add_event ( UpdateEvent :: AddNodeLabel {
21342134 node_name : subcorpus_full_name. to_string ( ) ,
2135- anno_ns : anno_key. ns . clone ( ) . into ( ) ,
2136- anno_name : anno_key. name . clone ( ) . into ( ) ,
2135+ anno_ns : anno_key. ns . clone ( ) ,
2136+ anno_name : anno_key. name . clone ( ) ,
21372137 anno_value : val. clone ( ) ,
21382138 } ) ?;
21392139 } else {
0 commit comments