Skip to content

Commit 4ffb257

Browse files
committed
Merge pull request #11 from posborne/support-older-rust-versions
fix/test for older versions of rustc
2 parents 865d32e + ca61b43 commit 4ffb257

File tree

2 files changed

+17
-4
lines changed

2 files changed

+17
-4
lines changed

.travis.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,16 @@
11
language: rust
22
sudo: false
33

4+
rust:
5+
- 1.0.0
6+
- stable
7+
- beta
8+
- nightly
9+
410
script:
511
- cargo build
612
- cargo test
13+
- if [ "$TRAVIS_RUST_VERSION" != "1.0.0" ]; then cargo test --no-default-features; fi
714
- cargo bench --no-run
815
- cargo doc
916

src/lib.rs

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,18 @@
1111
//! extra functionality to `Result<T, Void>` and `Result<Void, E>`.
1212
//!
1313
14-
#[cfg(feature = "std")]
15-
extern crate core;
16-
use core::{fmt, cmp};
14+
#[cfg(not(feature = "std"))]
15+
mod coreprovider {
16+
extern crate core;
17+
pub use core::{fmt, cmp};
18+
}
1719

1820
#[cfg(feature = "std")]
19-
use std::error;
21+
mod coreprovider {
22+
pub use std::{fmt, cmp, error};
23+
}
24+
25+
use coreprovider::*;
2026

2127
/// The empty type for cases which can't occur.
2228
#[derive(Copy)]

0 commit comments

Comments
 (0)