summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulian Hurst <julian.hurst@digdash.com>2024-09-17 12:03:19 +0200
committerJulian Hurst <julian.hurst@digdash.com>2024-09-17 12:03:19 +0200
commitefd875ef2a1839031e8306bef83ea279b23e47c4 (patch)
tree7da3342d79eb763b624e61a163a1efd328ba090f
parent43c71c3e54f94abd197f748c3f484548164ee887 (diff)
downloadimp-efd875ef2a1839031e8306bef83ea279b23e47c4.tar.gz
Fix errors due to hare update
fix non-exhaustive switch-case bufio::fixed -> memio::fixed strings::runes -> strings::torunes
-rw-r--r--imp.ha7
1 files 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, '"');