lune icon indicating copy to clipboard operation
lune copied to clipboard

ExitCode is not a useful return type

Open Kampfkarren opened this issue 10 months ago • 0 comments

Runtime.run returns an ExitCode, which cannot be usefully consumes by anything other than to exit.

ExitCode is intended to be consumed only by the standard library (via Termination::report()), and intentionally does not provide accessors like PartialEq, Eq, or Hash. Instead the standard library provides the canonical SUCCESS and FAILURE exit codes as well as From for ExitCode for constructing other arbitrary exit codes.

I am using lune as a test runner inside of another Rust program, and it would be very useful to be able to set and check the exit code without using an error.

Kampfkarren avatar Apr 08 '24 03:04 Kampfkarren