File tree Expand file tree Collapse file tree 3 files changed +3
-3
lines changed
Expand file tree Collapse file tree 3 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -112,7 +112,7 @@ impl Compiler {
112112 let main_scope = CompilerScope :: default ( ) ;
113113 let mut symbol_table = SymbolTable :: new ( ) ;
114114 for ( i, builtin) in BuiltinFunction :: get_builtins_names ( ) . iter ( ) . enumerate ( ) {
115- symbol_table. define_builtin ( i, builtin. to_string ( ) ) ;
115+ symbol_table. define_builtin ( i, builtin. clone ( ) ) ;
116116 }
117117
118118 Compiler {
Original file line number Diff line number Diff line change @@ -51,7 +51,7 @@ pub struct ReplCli {
5151impl ReplCli {
5252 fn get_input_type ( & self ) -> InputType {
5353 match & self . filename {
54- Some ( filename) => InputType :: File ( filename. to_string ( ) ) ,
54+ Some ( filename) => InputType :: File ( filename. clone ( ) ) ,
5555 None => InputType :: Repl ,
5656 }
5757 }
Original file line number Diff line number Diff line change @@ -280,7 +280,7 @@ impl VM {
280280 }
281281 ( Object :: STRING ( s1) , Object :: STRING ( s2) ) => {
282282 let result = match op {
283- Opcode :: Add => s1. to_string ( ) + s2,
283+ Opcode :: Add => s1. clone ( ) + s2,
284284 _ => {
285285 return Err ( "Unsupported types for binary operation" . to_string ( ) ) ;
286286 }
You can’t perform that action at this time.
0 commit comments