Skip to content
Snippets Groups Projects
Commit 4c95c03b authored by stratact's avatar stratact
Browse files

Remove bindings, no need to cache

parent 0fa9fe5b
No related branches found
No related tags found
1 merge request!53Code cleanup
...@@ -16,15 +16,13 @@ impl Variables { ...@@ -16,15 +16,13 @@ impl Variables {
pub fn read(&mut self, args: &[String]) { pub fn read(&mut self, args: &[String]) {
let mut out = stdout(); let mut out = stdout();
for i in 1..args.len() { for i in 1..args.len() {
if let Some(arg_original) = args.get(i) { if let Some(arg) = args.get(i) {
let arg = arg_original.trim(); print!("{}=", arg.trim());
print!("{}=", arg);
if let Err(message) = out.flush() { if let Err(message) = out.flush() {
println!("{}: Failed to flush stdout", message); println!("{}: Failed to flush stdout", message);
} }
if let Some(value_original) = readln() { if let Some(value) = readln() {
let value = value_original.trim(); self.set_var(arg, value.trim());
self.set_var(arg, value);
} }
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment