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/)
55and this project adheres to [ Semantic Versioning] ( http://semver.org/spec/v2.0.0.html ) .
66
77## [ Unreleased]
8+ ### Fixed
9+ - Fix build for non-Windows platforms
810
911## [ v0.2.0] - 2018-06-05
1012Removed ` 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;
55use ansi_term:: { ANSIGenericString , Colour } ;
66use difference:: { Changeset , Difference } ;
77use itertools:: Itertools ;
8- use std:: { fmt, sync :: Once } ;
8+ use std:: fmt;
99
1010fn red ( s : & str ) -> ANSIGenericString < str > {
1111 Colour :: Red . paint ( s)
@@ -25,12 +25,18 @@ static NL_LEFT: &str = "\n<";
2525static RIGHT : & str = ">" ;
2626static NL_RIGHT : & str = "\n >" ;
2727
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) ) ]
2838#[ inline( always) ]
2939fn enable_ansi ( ) {
30- if cfg ! ( windows) {
31- static ONCE : Once = Once :: new ( ) ;
32- ONCE . call_once ( || { ansi_term:: enable_ansi_support ( ) . ok ( ) ; } ) ;
33- }
3440}
3541
3642#[ derive( Copy , Clone , Debug ) ]
You can’t perform that action at this time.
0 commit comments