Skip to content

Commit 6e56b3a

Browse files
committed
chore: more minor lints
1 parent eb04015 commit 6e56b3a

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/compiler/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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 {

src/repl/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ pub struct ReplCli {
5151
impl 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
}

src/vm/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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
}

0 commit comments

Comments
 (0)