Byron / open-rs

Open a path or URL with the system-defined program
http://byron.github.io/open-rs
MIT License
319 stars 49 forks source link

`with` does not accept `OsStr` #102

Open ccyuen1 opened 3 months ago

ccyuen1 commented 3 months ago

Currently OsStr and OsString are not accepted as the app parameter of with, with_command, with_detached, and with_in_background. This does not make sense to me because OsStr should be suitable for interacting with the OS.

I can see that changing app: impl Into<String> to app: impl AsRef<OsStr> or app: impl Into<OsString> is a breaking change. Is there a way to overcome this?

Byron commented 3 months ago

I don't think so, unless one would want to duplicate the API.

Instead, I'd probably just create a new breaking release.