Simplify BinFile::link_dest

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
This commit is contained in:
Jiahao XU 2022-06-23 23:27:16 +10:00
parent 43238e39a3
commit 14c606d72b
No known key found for this signature in database
GPG key ID: 591C0B03040416D6

View file

@ -109,12 +109,9 @@ impl BinFile {
}
fn link_dest(&self) -> &Path {
#[cfg(target_family = "unix")]
{
if cfg!(target_family = "unix") {
Path::new(self.dest.file_name().unwrap())
}
#[cfg(target_family = "windows")]
{
} else {
&self.dest
}
}