Skip to content

Commit

Permalink
Use module paths instead of conditional module includes for sys modul…
Browse files Browse the repository at this point in the history
…es (ilai-deutel#330)

Saves 1 LOC
  • Loading branch information
joshka committed Nov 20, 2024
1 parent 066c1c0 commit b64d1b9
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,9 @@ mod row;
mod syntax;
mod terminal;

#[cfg(windows)] mod windows;
#[cfg(windows)] use windows as sys;

#[cfg(unix)] mod unix;
#[cfg(unix)] use unix as sys;

#[cfg(target_os = "wasi")] mod wasi;
#[cfg(target_os = "wasi")] use wasi as sys;
#[cfg_attr(windows, path = "windows.rs")]
#[cfg_attr(unix, path = "unix.rs")]
#[cfg_attr(target_os = "wasi", path = "wasi.rs")]
mod sys;

#[cfg(any(unix, target_os = "wasi"))] mod xdg;

0 comments on commit b64d1b9

Please sign in to comment.