Skip to content

Commit 2a04bdc

Browse files
committed
Remove unnecessary string copy.
1 parent ccafc3c commit 2a04bdc

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

src/interpreter/runtime.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,6 @@ impl Runtime {
119119
},
120120
repository::Loader::Intrinsic(map) => {
121121
let text = map.get(name)
122-
.map(ToString::to_string) // TODO Expensive copy from string literal :/
123122
.ok_or(RuntimeError::error(format!("Error loading {:?}: missing intrinsic", name).as_str()).to_array())?;
124123
self.load_text_as_module(&text, name.clone())?
125124
// TODO Should map error as 'in string xx', like in load_file_as_module

0 commit comments

Comments
 (0)