Addition of detection of fedora distrubition
Feature I want
I want to detect if my rust program is running on fedora.
Current State
When I run a program with this code
use os_type;
fn main() {
println!("{:?}", os_type::current_platform());
}
Then I get this output:
OSInformation { os_type: Unknown, version: "0.0.0" }
What I want
OSInformation { os_type: Fedora, version: "0.0.0" }
I would like to implement this feature. However I am concerned how to do this.
1. Approach for the implementation
I add a new Variant like Fedora to the public enum OSType. However adding a new variant to a public enum would introduce a breaking change for rust could which does not handle the "catch match everything" aka
_ => {...}
With my approach I would need to bump up the major version according to semantic versioning.
2. Approach for the implementation
Another way could be, that I introduce the attribute non_exhaustive on the enum OSType. In this manner it would not break the relying code rust. Then I would only bump up the minor version.
Which approach would be acceptable ? I personally prefer the 2. Approach.