From efd875ef2a1839031e8306bef83ea279b23e47c4 Mon Sep 17 00:00:00 2001 From: Julian Hurst Date: Tue, 17 Sep 2024 12:03:19 +0200 Subject: Fix errors due to hare update fix non-exhaustive switch-case bufio::fixed -> memio::fixed strings::runes -> strings::torunes --- imp.ha | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/imp.ha b/imp.ha index 052fc69..b055cd5 100644 --- a/imp.ha +++ b/imp.ha @@ -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, '"'); -- cgit v1.2.3