Skip to content

Commit 4c351b1

Browse files
esheppadjc
andcommitted
Remove dependency on time 0.1
Co-authored-by: Dirkjan Ochtman <[email protected]>
1 parent fd54d9c commit 4c351b1

File tree

2 files changed

+2
-16
lines changed

2 files changed

+2
-16
lines changed

Cargo.toml

+1-3
Original file line numberDiff line numberDiff line change
@@ -20,19 +20,17 @@ appveyor = { repository = "chronotope/chrono" }
2020
name = "chrono"
2121

2222
[features]
23-
default = ["clock", "std", "oldtime", "wasmbind"]
23+
default = ["clock", "std", "wasmbind"]
2424
alloc = []
2525
libc = []
2626
std = []
2727
clock = ["std", "winapi", "iana-time-zone"]
28-
oldtime = ["time"]
2928
wasmbind = ["wasm-bindgen", "js-sys"]
3029
unstable-locales = ["pure-rust-locales", "alloc"]
3130
__internal_bench = ["criterion"]
3231
__doctest = []
3332

3433
[dependencies]
35-
time = { version = "0.1.43", optional = true }
3634
num-integer = { version = "0.1.36", default-features = false }
3735
num-traits = { version = "0.2", default-features = false }
3836
rustc-serialize = { version = "0.3.20", optional = true }

src/lib.rs

+1-13
Original file line numberDiff line numberDiff line change
@@ -56,14 +56,6 @@
5656
//! nanoseconds and does not represent "nominal" components such as days or
5757
//! months.
5858
//!
59-
//! When the `oldtime` feature is enabled, [`Duration`] is an alias for the
60-
//! [`time::Duration`](https://docs.rs/time/0.1.40/time/struct.Duration.html)
61-
//! type from v0.1 of the time crate. time v0.1 is deprecated, so new code
62-
//! should disable the `oldtime` feature and use the `chrono::Duration` type
63-
//! instead. The `oldtime` feature is enabled by default for backwards
64-
//! compatibility, but future versions of Chrono are likely to remove the
65-
//! feature entirely.
66-
//!
6759
//! Chrono does not yet natively support
6860
//! the standard [`Duration`](https://doc.rust-lang.org/std/time/struct.Duration.html) type,
6961
//! but it will be supported in the future.
@@ -410,12 +402,8 @@
410402
#![cfg_attr(feature = "rustc-serialize", allow(deprecated))]
411403
#![cfg_attr(docsrs, feature(doc_cfg))]
412404

413-
#[cfg(feature = "oldtime")]
414-
#[cfg_attr(docsrs, doc(cfg(feature = "oldtime")))]
415-
extern crate time as oldtime;
416-
#[cfg(not(feature = "oldtime"))]
417405
mod oldtime;
418-
// this reexport is to aid the transition and should not be in the prelude!
406+
419407
pub use oldtime::{Duration, OutOfRangeError};
420408

421409
#[cfg(feature = "__doctest")]

0 commit comments

Comments
 (0)