diff --git a/src/content/symlink.rs b/src/content/symlink.rs index a2ff9a9..ca5edcc 100644 --- a/src/content/symlink.rs +++ b/src/content/symlink.rs @@ -9,6 +9,9 @@ use crate::async_lib::AsyncRead; use crate::content::path; use crate::errors::{IoErrorExt, Result}; +#[cfg(not(any(unix, windows)))] +compile_error!("Symlinking is not supported on this platform."); + fn symlink_file(src: P, dst: Q) -> std::io::Result<()> where P: AsRef, @@ -24,13 +27,6 @@ where use std::os::windows::fs::symlink_file; symlink_file(src, dst) } - #[cfg(not(any(unix, windows)))] - { - Err(std::io::Error::new( - std::io::ErrorKind::Other, - "symlinking is not supported on this platform", - )) - } } fn create_symlink(sri: Integrity, cache: &PathBuf, target: &PathBuf) -> Result {