Clarify module hierarchy

This commit is contained in:
Dirkjan Ochtman 2022-04-12 15:11:25 +02:00
parent f5218bfa13
commit 2e711e7936
9 changed files with 10 additions and 10 deletions

View File

@ -12,17 +12,20 @@ use crate::naive::{NaiveDate, NaiveDateTime};
use crate::{Date, DateTime}; use crate::{Date, DateTime};
#[cfg(all(not(unix), not(windows)))] #[cfg(all(not(unix), not(windows)))]
#[path = "sys/stub.rs"] #[path = "stub.rs"]
mod inner; mod inner;
#[cfg(unix)] #[cfg(unix)]
#[path = "sys/unix.rs"] #[path = "unix.rs"]
mod inner; mod inner;
#[cfg(windows)] #[cfg(windows)]
#[path = "sys/windows.rs"] #[path = "windows.rs"]
mod inner; mod inner;
#[cfg(unix)]
mod tz_info;
/// The local timescale. This is implemented via the standard `time` crate. /// The local timescale. This is implemented via the standard `time` crate.
/// ///
/// Using the [`TimeZone`](./trait.TimeZone.html) methods /// Using the [`TimeZone`](./trait.TimeZone.html) methods

View File

@ -639,10 +639,10 @@ pub(crate) fn is_leap_year(year: i32) -> bool {
#[cfg(test)] #[cfg(test)]
mod tests { mod tests {
use super::super::timezone::Transition;
use super::super::{Error, TimeZone};
use super::{AlternateTime, LocalTimeType, RuleDay, TransitionRule}; use super::{AlternateTime, LocalTimeType, RuleDay, TransitionRule};
use crate::matches; use crate::matches;
use crate::offset::tz_info::timezone::Transition;
use crate::offset::tz_info::{Error, TimeZone};
#[test] #[test]
fn test_quoted() -> Result<(), Error> { fn test_quoted() -> Result<(), Error> {

View File

@ -533,9 +533,9 @@ const SECONDS_PER_28_DAYS: i64 = SECONDS_PER_DAY * 28;
#[cfg(test)] #[cfg(test)]
mod tests { mod tests {
use super::super::Error;
use super::{LeapSecond, LocalTimeType, TimeZone, TimeZoneName, Transition, TransitionRule}; use super::{LeapSecond, LocalTimeType, TimeZone, TimeZoneName, Transition, TransitionRule};
use crate::matches; use crate::matches;
use crate::offset::tz_info::Error;
#[test] #[test]
fn test_no_dst() -> Result<(), Error> { fn test_no_dst() -> Result<(), Error> {

View File

@ -10,8 +10,8 @@
use std::sync::Once; use std::sync::Once;
use super::tz_info::TimeZone;
use super::{DateTime, FixedOffset, Local, NaiveDateTime}; use super::{DateTime, FixedOffset, Local, NaiveDateTime};
use crate::offset::tz_info::TimeZone;
use crate::Utc; use crate::Utc;
pub(super) fn now() -> DateTime<Local> { pub(super) fn now() -> DateTime<Local> {

View File

@ -33,9 +33,6 @@ mod local;
#[cfg(feature = "clock")] #[cfg(feature = "clock")]
pub use self::local::Local; pub use self::local::Local;
#[cfg(all(unix, feature = "clock"))]
mod tz_info;
mod utc; mod utc;
pub use self::utc::Utc; pub use self::utc::Utc;