We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
for
1 parent 196a46c commit c1048deCopy full SHA for c1048de
yazi-config/src/open/opener.rs
@@ -13,11 +13,9 @@ pub struct Opener {
13
impl Opener {
14
pub fn take(mut self) -> Option<Self> {
15
if let Some(for_) = self.for_.take() {
16
- match for_.as_bytes() {
17
- b"unix" if cfg!(unix) => {}
18
- b"windows" if cfg!(windows) => {}
19
- b"linux" if cfg!(target_os = "linux") => {}
20
- b"macos" if cfg!(target_os = "macos") => {}
+ match for_.as_str() {
+ "unix" if cfg!(unix) => {}
+ os if os == std::env::consts::OS => {}
21
_ => return None,
22
}
23
0 commit comments