From dc4878bc2b710a6461e5622af312a7f7fc952410 Mon Sep 17 00:00:00 2001 From: Jakub Doka Date: Wed, 18 Dec 2024 00:08:59 +0100 Subject: [PATCH] fixing the optional formatting Signed-off-by: Jakub Doka --- Cargo.lock | 6 +++--- repbuild/Cargo.toml | 1 + sysdata/libraries/stn/src/formatters.hb | 4 ++-- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index d08398f65..1b847ebf7 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -213,12 +213,12 @@ dependencies = [ [[package]] name = "hbbytecode" version = "0.1.0" -source = "git+https://git.ablecorp.us/AbleOS/holey-bytes.git#e769fa8dbad4d69ccab9e13112e20be4b8bd91bf" +source = "git+https://git.ablecorp.us/AbleOS/holey-bytes.git#f05c61a99e87f312992419dc10c8ce62a3469449" [[package]] name = "hblang" version = "0.1.0" -source = "git+https://git.ablecorp.us/AbleOS/holey-bytes.git#e769fa8dbad4d69ccab9e13112e20be4b8bd91bf" +source = "git+https://git.ablecorp.us/AbleOS/holey-bytes.git#f05c61a99e87f312992419dc10c8ce62a3469449" dependencies = [ "hashbrown", "hbbytecode", @@ -229,7 +229,7 @@ dependencies = [ [[package]] name = "hbvm" version = "0.1.0" -source = "git+https://git.ablecorp.us/AbleOS/holey-bytes.git#e769fa8dbad4d69ccab9e13112e20be4b8bd91bf" +source = "git+https://git.ablecorp.us/AbleOS/holey-bytes.git#f05c61a99e87f312992419dc10c8ce62a3469449" dependencies = [ "hbbytecode", ] diff --git a/repbuild/Cargo.toml b/repbuild/Cargo.toml index 2b7fc845f..1556a3426 100644 --- a/repbuild/Cargo.toml +++ b/repbuild/Cargo.toml @@ -15,6 +15,7 @@ fatfs = { version = "0.3", default-features = false, features = [ ] } toml = "0.8" hblang.git = "https://git.ablecorp.us/AbleOS/holey-bytes.git" +#hblang.path = "../../holey-bytes/lang/" log = "0.4" raw-cpuid = "11" ureq = { version = "2", default-features = false, features = ["tls"] } diff --git a/sysdata/libraries/stn/src/formatters.hb b/sysdata/libraries/stn/src/formatters.hb index 14ae4c024..cca0c3448 100644 --- a/sysdata/libraries/stn/src/formatters.hb +++ b/sysdata/libraries/stn/src/formatters.hb @@ -143,7 +143,7 @@ fmt_nullable := fn(v: @Any(), str: ^u8, opts: FormatOptions): uint { *@as(^[u8; 4], @bitcast(str)) = *@bitcast("null\0") return 4 } else { - return @inline(fmt_inner, @unwrap(v), str, opts) + return @inline(fmt_inner, @as(@ChildOf(@TypeOf(v)), v), str, opts) } } @@ -190,4 +190,4 @@ format_args := fn(v: @Any(), str: ^u8, opts: FormatOptions): ^u8 { @inline(string.clear, str) _ = @inline(fmt_inner, v, str, opts) return str -} \ No newline at end of file +}