Skip to content

Commit a2350af

Browse files
committed
try fix build
1 parent 2b9f425 commit a2350af

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

src/image_backends/mod.rs

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
use image::DynamicImage;
22

3-
#[cfg(unix)]
3+
#[cfg(target_os = "linux")]
44
pub mod kitty;
5-
#[cfg(unix)]
5+
#[cfg(target_os = "linux")]
66
pub mod sixel;
77

88
pub trait ImageBackend {
99
fn add_image(&self, lines: Vec<String>, image: &DynamicImage) -> String;
1010
}
1111

12-
#[cfg(unix)]
12+
#[cfg(target_os = "linux")]
1313
pub fn get_best_backend() -> Option<Box<dyn ImageBackend>> {
1414
if kitty::KittyBackend::supported() {
1515
Some(Box::new(kitty::KittyBackend::new()))
@@ -25,7 +25,7 @@ pub fn get_image_backend(
2525
backend_name: &str,
2626
) -> Option<Box<dyn ImageBackend>> {
2727
if image.is_some() {
28-
#[cfg(unix)]
28+
#[cfg(target_os = "linux")]
2929
let backend = Some(match backend_name {
3030
"kitty" => {
3131
Box::new(kitty::KittyBackend::new()) as Box<dyn ImageBackend>
@@ -35,15 +35,15 @@ pub fn get_image_backend(
3535
}
3636
_ => unreachable!(),
3737
});
38-
#[cfg(not(unix))]
38+
#[cfg(not(target_os = "linux"))]
3939
let backend = None;
4040
backend
4141
} else {
4242
None
4343
}
4444
}
4545

46-
#[cfg(not(unix))]
46+
#[cfg(not(target_os = "linux"))]
4747
pub fn get_best_backend() -> Option<Box<dyn ImageBackend>> {
4848
None
4949
}

src/main.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#[macro_use]
22
extern crate clap;
33

4-
#[cfg(unix)]
4+
#[cfg(target_os = "linux")]
55
use {
66
ascii_art::AsciiArt,
77
commit_info::CommitInfo,

0 commit comments

Comments
 (0)