File tree 3 files changed +9
-9
lines changed
3 files changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ error-chain = "0.12"
35
35
[target .'cfg(windows)' .dependencies ]
36
36
ansi_term = " 0.12"
37
37
38
- [target .'cfg(target_os = "linux" )' .dependencies ]
38
+ [target .'cfg(not( target_os = "windows") )' .dependencies ]
39
39
libc = " 0.2.79"
40
40
base64 = " 0.13.0"
41
41
Original file line number Diff line number Diff line change @@ -26,9 +26,9 @@ pub struct Cli {
26
26
impl Cli {
27
27
/// Build `Options` from command line arguments.
28
28
pub fn new ( ) -> Result < Self > {
29
- #[ cfg( target_os = "linux" ) ]
29
+ #[ cfg( not ( target_os = "windows" ) ) ]
30
30
let possible_backends = [ "kitty" , "sixel" ] ;
31
- #[ cfg( not ( target_os = "linux" ) ) ]
31
+ #[ cfg( target_os = "windows" ) ]
32
32
let possible_backends = [ ] ;
33
33
34
34
let matches = App :: new ( crate_name ! ( ) )
Original file line number Diff line number Diff line change 1
1
use image:: DynamicImage ;
2
2
3
- #[ cfg( target_os = "linux" ) ]
3
+ #[ cfg( not ( target_os = "windows" ) ) ]
4
4
pub mod kitty;
5
- #[ cfg( target_os = "linux" ) ]
5
+ #[ cfg( not ( target_os = "windows" ) ) ]
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( target_os = "linux" ) ]
12
+ #[ cfg( not ( target_os = "windows" ) ) ]
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 ( ) ) )
@@ -21,18 +21,18 @@ pub fn get_best_backend() -> Option<Box<dyn ImageBackend>> {
21
21
}
22
22
23
23
pub fn get_image_backend ( backend_name : & str ) -> Option < Box < dyn ImageBackend > > {
24
- #[ cfg( target_os = "linux" ) ]
24
+ #[ cfg( not ( target_os = "windows" ) ) ]
25
25
let backend = Some ( match backend_name {
26
26
"kitty" => Box :: new ( kitty:: KittyBackend :: new ( ) ) as Box < dyn ImageBackend > ,
27
27
"sixel" => Box :: new ( sixel:: SixelBackend :: new ( ) ) as Box < dyn ImageBackend > ,
28
28
_ => unreachable ! ( ) ,
29
29
} ) ;
30
- #[ cfg( not ( target_os = "linux" ) ) ]
30
+ #[ cfg( target_os = "windows" ) ]
31
31
let backend = None ;
32
32
backend
33
33
}
34
34
35
- #[ cfg( not ( target_os = "linux" ) ) ]
35
+ #[ cfg( target_os = "windows" ) ]
36
36
pub fn get_best_backend ( ) -> Option < Box < dyn ImageBackend > > {
37
37
None
38
38
}
You can’t perform that action at this time.
0 commit comments