lock: reorganize platform-specific implementations as sub modules

This will help rust-analyzer scan both fallback and unix impls.
This commit is contained in:
Yuya Nishihara 2024-11-12 21:51:44 +09:00
parent dfc67e7051
commit 1a2479cd2f

View file

@ -14,11 +14,15 @@
#![allow(missing_docs)]
#[cfg_attr(unix, path = "lock/unix.rs")]
#[cfg_attr(not(unix), path = "lock/fallback.rs")]
mod platform;
#[cfg(not(unix))]
mod fallback;
#[cfg(unix)]
mod unix;
pub use platform::FileLock;
#[cfg(not(unix))]
pub use self::fallback::FileLock;
#[cfg(unix)]
pub use self::unix::FileLock;
#[cfg(test)]
mod tests {