Skip to content

Commit

Permalink
Remove dependency on time 0.1
Browse files Browse the repository at this point in the history
Co-authored-by: Dirkjan Ochtman <[email protected]>
  • Loading branch information
esheppa and djc committed Aug 29, 2022
1 parent fd54d9c commit 4c351b1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 16 deletions.
4 changes: 1 addition & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,19 +20,17 @@ appveyor = { repository = "chronotope/chrono" }
name = "chrono"

[features]
default = ["clock", "std", "oldtime", "wasmbind"]
default = ["clock", "std", "wasmbind"]
alloc = []
libc = []
std = []
clock = ["std", "winapi", "iana-time-zone"]
oldtime = ["time"]
wasmbind = ["wasm-bindgen", "js-sys"]
unstable-locales = ["pure-rust-locales", "alloc"]
__internal_bench = ["criterion"]
__doctest = []

[dependencies]
time = { version = "0.1.43", optional = true }
num-integer = { version = "0.1.36", default-features = false }
num-traits = { version = "0.2", default-features = false }
rustc-serialize = { version = "0.3.20", optional = true }
Expand Down
14 changes: 1 addition & 13 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,14 +56,6 @@
//! nanoseconds and does not represent "nominal" components such as days or
//! months.
//!
//! When the `oldtime` feature is enabled, [`Duration`] is an alias for the
//! [`time::Duration`](https://docs.rs/time/0.1.40/time/struct.Duration.html)
//! type from v0.1 of the time crate. time v0.1 is deprecated, so new code
//! should disable the `oldtime` feature and use the `chrono::Duration` type
//! instead. The `oldtime` feature is enabled by default for backwards
//! compatibility, but future versions of Chrono are likely to remove the
//! feature entirely.
//!
//! Chrono does not yet natively support
//! the standard [`Duration`](https://doc.rust-lang.org/std/time/struct.Duration.html) type,
//! but it will be supported in the future.
Expand Down Expand Up @@ -410,12 +402,8 @@
#![cfg_attr(feature = "rustc-serialize", allow(deprecated))]
#![cfg_attr(docsrs, feature(doc_cfg))]

#[cfg(feature = "oldtime")]
#[cfg_attr(docsrs, doc(cfg(feature = "oldtime")))]
extern crate time as oldtime;
#[cfg(not(feature = "oldtime"))]
mod oldtime;
// this reexport is to aid the transition and should not be in the prelude!

pub use oldtime::{Duration, OutOfRangeError};

#[cfg(feature = "__doctest")]
Expand Down

0 comments on commit 4c351b1

Please sign in to comment.