File tree Expand file tree Collapse file tree 3 files changed +35
-5
lines changed Expand file tree Collapse file tree 3 files changed +35
-5
lines changed Original file line number Diff line number Diff line change
1
+ language : rust
2
+
3
+ addons :
4
+ apt :
5
+ packages :
6
+ - libcurl4-openssl-dev
7
+ - libelf-dev
8
+ - libdw-dev
9
+
10
+ rust :
11
+ - beta
12
+ - stable
13
+
14
+ # load travis-cargo
15
+ before_script :
16
+ - |
17
+ pip install 'travis-cargo<0.2' --user &&
18
+ export PATH=$HOME/.local/bin:$PATH
19
+
20
+ script :
21
+ - |
22
+ travis-cargo build
Original file line number Diff line number Diff line change @@ -5,6 +5,8 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
5
5
and this project adheres to [ Semantic Versioning] ( http://semver.org/spec/v2.0.0.html ) .
6
6
7
7
## [ Unreleased]
8
+ ### Fixed
9
+ - Fix build for non-Windows platforms
8
10
9
11
## [ v0.2.0] - 2018-06-05
10
12
Removed ` init() ` . Instead, ANSI is automatically enabled the first time an ANSI string is crated.
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ extern crate itertools;
5
5
use ansi_term:: { ANSIGenericString , Colour } ;
6
6
use difference:: { Changeset , Difference } ;
7
7
use itertools:: Itertools ;
8
- use std:: { fmt, sync :: Once } ;
8
+ use std:: fmt;
9
9
10
10
fn red ( s : & str ) -> ANSIGenericString < str > {
11
11
Colour :: Red . paint ( s)
@@ -25,12 +25,18 @@ static NL_LEFT: &str = "\n<";
25
25
static RIGHT : & str = ">" ;
26
26
static NL_RIGHT : & str = "\n >" ;
27
27
28
+ #[ cfg( windows) ]
29
+ #[ inline( always) ]
30
+ fn enable_ansi ( ) {
31
+ use std:: sync:: Once ;
32
+
33
+ static ONCE : Once = Once :: new ( ) ;
34
+ ONCE . call_once ( || { ansi_term:: enable_ansi_support ( ) . ok ( ) ; } ) ;
35
+ }
36
+
37
+ #[ cfg( not( windows) ) ]
28
38
#[ inline( always) ]
29
39
fn enable_ansi ( ) {
30
- if cfg ! ( windows) {
31
- static ONCE : Once = Once :: new ( ) ;
32
- ONCE . call_once ( || { ansi_term:: enable_ansi_support ( ) . ok ( ) ; } ) ;
33
- }
34
40
}
35
41
36
42
#[ derive( Copy , Clone , Debug ) ]
You can’t perform that action at this time.
0 commit comments