mirror of
https://github.com/chronotope/chrono.git
synced 2025-10-02 23:36:17 +00:00
Clarify module hierarchy
This commit is contained in:
parent
f5218bfa13
commit
2e711e7936
@ -12,17 +12,20 @@ use crate::naive::{NaiveDate, NaiveDateTime};
|
||||
use crate::{Date, DateTime};
|
||||
|
||||
#[cfg(all(not(unix), not(windows)))]
|
||||
#[path = "sys/stub.rs"]
|
||||
#[path = "stub.rs"]
|
||||
mod inner;
|
||||
|
||||
#[cfg(unix)]
|
||||
#[path = "sys/unix.rs"]
|
||||
#[path = "unix.rs"]
|
||||
mod inner;
|
||||
|
||||
#[cfg(windows)]
|
||||
#[path = "sys/windows.rs"]
|
||||
#[path = "windows.rs"]
|
||||
mod inner;
|
||||
|
||||
#[cfg(unix)]
|
||||
mod tz_info;
|
||||
|
||||
/// The local timescale. This is implemented via the standard `time` crate.
|
||||
///
|
||||
/// Using the [`TimeZone`](./trait.TimeZone.html) methods
|
@ -639,10 +639,10 @@ pub(crate) fn is_leap_year(year: i32) -> bool {
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::super::timezone::Transition;
|
||||
use super::super::{Error, TimeZone};
|
||||
use super::{AlternateTime, LocalTimeType, RuleDay, TransitionRule};
|
||||
use crate::matches;
|
||||
use crate::offset::tz_info::timezone::Transition;
|
||||
use crate::offset::tz_info::{Error, TimeZone};
|
||||
|
||||
#[test]
|
||||
fn test_quoted() -> Result<(), Error> {
|
@ -533,9 +533,9 @@ const SECONDS_PER_28_DAYS: i64 = SECONDS_PER_DAY * 28;
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::super::Error;
|
||||
use super::{LeapSecond, LocalTimeType, TimeZone, TimeZoneName, Transition, TransitionRule};
|
||||
use crate::matches;
|
||||
use crate::offset::tz_info::Error;
|
||||
|
||||
#[test]
|
||||
fn test_no_dst() -> Result<(), Error> {
|
@ -10,8 +10,8 @@
|
||||
|
||||
use std::sync::Once;
|
||||
|
||||
use super::tz_info::TimeZone;
|
||||
use super::{DateTime, FixedOffset, Local, NaiveDateTime};
|
||||
use crate::offset::tz_info::TimeZone;
|
||||
use crate::Utc;
|
||||
|
||||
pub(super) fn now() -> DateTime<Local> {
|
@ -33,9 +33,6 @@ mod local;
|
||||
#[cfg(feature = "clock")]
|
||||
pub use self::local::Local;
|
||||
|
||||
#[cfg(all(unix, feature = "clock"))]
|
||||
mod tz_info;
|
||||
|
||||
mod utc;
|
||||
pub use self::utc::Utc;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user