File tree 2 files changed +7
-7
lines changed
2 files changed +7
-7
lines changed Original file line number Diff line number Diff line change 1
1
use image:: DynamicImage ;
2
2
3
- #[ cfg( unix ) ]
3
+ #[ cfg( target_os = "linux" ) ]
4
4
pub mod kitty;
5
- #[ cfg( unix ) ]
5
+ #[ cfg( target_os = "linux" ) ]
6
6
pub mod sixel;
7
7
8
8
pub trait ImageBackend {
9
9
fn add_image ( & self , lines : Vec < String > , image : & DynamicImage ) -> String ;
10
10
}
11
11
12
- #[ cfg( unix ) ]
12
+ #[ cfg( target_os = "linux" ) ]
13
13
pub fn get_best_backend ( ) -> Option < Box < dyn ImageBackend > > {
14
14
if kitty:: KittyBackend :: supported ( ) {
15
15
Some ( Box :: new ( kitty:: KittyBackend :: new ( ) ) )
@@ -25,7 +25,7 @@ pub fn get_image_backend(
25
25
backend_name : & str ,
26
26
) -> Option < Box < dyn ImageBackend > > {
27
27
if image. is_some ( ) {
28
- #[ cfg( unix ) ]
28
+ #[ cfg( target_os = "linux" ) ]
29
29
let backend = Some ( match backend_name {
30
30
"kitty" => {
31
31
Box :: new ( kitty:: KittyBackend :: new ( ) ) as Box < dyn ImageBackend >
@@ -35,15 +35,15 @@ pub fn get_image_backend(
35
35
}
36
36
_ => unreachable ! ( ) ,
37
37
} ) ;
38
- #[ cfg( not( unix ) ) ]
38
+ #[ cfg( not( target_os = "linux" ) ) ]
39
39
let backend = None ;
40
40
backend
41
41
} else {
42
42
None
43
43
}
44
44
}
45
45
46
- #[ cfg( not( unix ) ) ]
46
+ #[ cfg( not( target_os = "linux" ) ) ]
47
47
pub fn get_best_backend ( ) -> Option < Box < dyn ImageBackend > > {
48
48
None
49
49
}
Original file line number Diff line number Diff line change 1
1
#[ macro_use]
2
2
extern crate clap;
3
3
4
- #[ cfg( unix ) ]
4
+ #[ cfg( target_os = "linux" ) ]
5
5
use {
6
6
ascii_art:: AsciiArt ,
7
7
commit_info:: CommitInfo ,
You can’t perform that action at this time.
0 commit comments