commit 695fb305e3ce03c5248b3219edd7e6f55779ed0d
parent dbf402d85b0f811356cebe43a51868f796090d0a
Author: Sebastian <sebastian@sebsite.pw>
Date: Sun, 12 Jun 2022 19:32:47 -0400
hare::module: use tuple unpacking
Signed-off-by: Sebastian <sebastian@sebsite.pw>
Diffstat:
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/hare/module/manifest.ha b/hare/module/manifest.ha
@@ -292,8 +292,7 @@ export fn manifest_write(ctx: *context, man: *manifest) (void | error) = {
let mpath = path::join(cachedir, "manifest");
defer free(mpath);
- let file = temp::named(ctx.fs, cachedir, io::mode::WRITE, 0o644)?;
- let name = file.1, file = file.0;
+ let (file, name) = temp::named(ctx.fs, cachedir, io::mode::WRITE, 0o644)?;
defer {
fs::remove(ctx.fs, name): void;
io::close(file)!;