read numbers from stdin #15

Merged
PlexSheep merged 2 commits from feat/numbers-from-stdin into devel 2024-05-13 16:32:37 +02:00
1 changed files with 2 additions and 2 deletions
Showing only changes of commit 585bb41a9d - Show all commits

View File

@ -26,8 +26,8 @@ fn main() {
exit(1); exit(1);
} }
}; };
let whole = whole.replace('\n', ""); let split = whole.split_whitespace();

split here instead of removing newlines

split here instead of removing newlines
for s in whole.split(' ') { for s in split {
args.push(s.to_string()); args.push(s.to_string());
} }
} }