commit dab0f12b18cbaec7b420c632656b3a2a69bd2923
parent e63f4c08c82217c2abe3cda05d0941902207680d
Author: Sebastian <sebastian@sebsite.pw>
Date: Sun, 12 Jun 2022 19:32:45 -0400
hare release: use tuple unpacking
Signed-off-by: Sebastian <sebastian@sebsite.pw>
Diffstat:
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/cmd/hare/release.ha b/cmd/hare/release.ha
@@ -107,8 +107,7 @@ fn do_release(
const name = path::basename(os::getcwd());
const dir = temp::dir();
defer os::rmdirall(dir)!;
- const changelog = temp::named(os::cwd, dir, io::mode::WRITE)?;
- const clfile = changelog.0, changelog = changelog.1;
+ const (clfile, changelog) = temp::named(os::cwd, dir, io::mode::WRITE)?;
defer io::close(clfile)!;
fmt::fprintfln(clfile, changelog_template, lasttag, name, newtag)?;
shortlog(clfile, range)?;
@@ -138,8 +137,7 @@ fn do_initial_release(ver: (modversion | increment)) (void | release_error) = {
const name = path::basename(os::getcwd());
const dir = temp::dir();
defer os::rmdirall(dir)!;
- const changelog = temp::named(os::cwd, dir, io::mode::WRITE)?;
- const clfile = changelog.0, changelog = changelog.1;
+ const (clfile, changelog) = temp::named(os::cwd, dir, io::mode::WRITE)?;
defer io::close(clfile)!;
fmt::fprintfln(clfile, initial_template, name, newtag)?;