~sircmpwn/hare-dev

hare: os::move: fix invalid match usage v1 APPLIED

Bor Grošelj Simić: 1
 os::move: fix invalid match usage

 1 files changed, 5 insertions(+), 2 deletions(-)
#1196836 alpine.yml failed
#1196837 freebsd.yml success
#1196838 openbsd.yml success
Export patchset (mbox)
How do I use this?

Copy & paste the following snippet into your terminal to import this patchset into git:

curl -s https://lists.sr.ht/~sircmpwn/hare-dev/patches/51044/mbox | git am -3
Learn more about email & git

[PATCH hare] os::move: fix invalid match usage Export this patch

The first case was a subset of the second, which is not supposed to be
allowed, but isn't handled by harec yet.

Signed-off-by: Bor Grošelj Simić <bgs@turminal.net>
---
 fs/fs.ha | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/fs/fs.ha b/fs/fs.ha
index 66f74025..5e813460 100644
--- a/fs/fs.ha
+++ b/fs/fs.ha
@@ -111,9 +111,12 @@ export fn rename(fs: *fs, oldpath: str, newpath: str) (void | error) = {
// copy and remove if necessary.
export fn move(fs: *fs, oldpath: str, newpath: str) (void | error) = {
	match (rename(fs, oldpath, newpath)) {
	case (cannotrename | errors::unsupported) => void; // Fallback
	case let err: error =>
		return err;
		match (err) {
		case (cannotrename | errors::unsupported) => void; // Fallback
		case =>
			return err;
		};
	case void =>
		return; // Success
	};
-- 
2.43.0
hare/patches: FAILED in 1m0s

[os::move: fix invalid match usage][0] from [Bor Grošelj Simić][1]

[0]: https://lists.sr.ht/~sircmpwn/hare-dev/patches/51044
[1]: mailto:bgs@turminal.net

✓ #1196838 SUCCESS hare/patches/openbsd.yml https://builds.sr.ht/~sircmpwn/job/1196838
✗ #1196836 FAILED  hare/patches/alpine.yml  https://builds.sr.ht/~sircmpwn/job/1196836
✓ #1196837 SUCCESS hare/patches/freebsd.yml https://builds.sr.ht/~sircmpwn/job/1196837
Thanks!

To git@git.sr.ht:~sircmpwn/hare
   5a9d8e7d..875b6cb9  master -> master