diff options
| author | Julian Hurst <julian.hurst@digdash.com> | 2024-09-17 12:03:19 +0200 |
|---|---|---|
| committer | Julian Hurst <julian.hurst@digdash.com> | 2024-09-17 12:03:19 +0200 |
| commit | efd875ef2a1839031e8306bef83ea279b23e47c4 (patch) | |
| tree | 7da3342d79eb763b624e61a163a1efd328ba090f /imp.ha | |
| parent | 43c71c3e54f94abd197f748c3f484548164ee887 (diff) | |
| download | imp-efd875ef2a1839031e8306bef83ea279b23e47c4.tar.gz | |
Fix errors due to hare update
fix non-exhaustive switch-case
bufio::fixed -> memio::fixed
strings::runes -> strings::torunes
Diffstat (limited to 'imp.ha')
| -rw-r--r-- | imp.ha | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -4,7 +4,7 @@ use os; use os::exec; use io; use strings; -use bufio; +use memio; use format::ini; let verbose: bool = false; @@ -74,6 +74,7 @@ export fn main() void = { accfilter.notes = opt.1; case 'f' => file = opt.1; + case => abort(); }; }; @@ -230,7 +231,7 @@ fn account_free(acc: account) void = { }; fn parse(data: []u8) ([]account | format::ini::error) = { - let scanner = format::ini::scan(&bufio::fixed(data, io::mode::READ)); + let scanner = format::ini::scan(&memio::fixed(data)); defer format::ini::finish(&scanner); //let entries: []format::ini::entry = []; @@ -273,7 +274,7 @@ fn setfieldaccount(acc: *account, key: str, val: str) void = { //defer free(val); // Handle quoted values - let valrunes = strings::runes(val); + let valrunes = strings::torunes(val); defer free(valrunes); if (valrunes[0] == '"' && valrunes[len(valrunes)-1] == '"') { val = strings::trim(val, '"'); |
