Skip to content

Commit 2e711e7

Browse files
committed
Clarify module hierarchy
1 parent f5218bf commit 2e711e7

9 files changed

Lines changed: 10 additions & 10 deletions

File tree

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,20 @@ use crate::naive::{NaiveDate, NaiveDateTime};
1212
use crate::{Date, DateTime};
1313

1414
#[cfg(all(not(unix), not(windows)))]
15-
#[path = "sys/stub.rs"]
15+
#[path = "stub.rs"]
1616
mod inner;
1717

1818
#[cfg(unix)]
19-
#[path = "sys/unix.rs"]
19+
#[path = "unix.rs"]
2020
mod inner;
2121

2222
#[cfg(windows)]
23-
#[path = "sys/windows.rs"]
23+
#[path = "windows.rs"]
2424
mod inner;
2525

26+
#[cfg(unix)]
27+
mod tz_info;
28+
2629
/// The local timescale. This is implemented via the standard `time` crate.
2730
///
2831
/// Using the [`TimeZone`](./trait.TimeZone.html) methods
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -639,10 +639,10 @@ pub(crate) fn is_leap_year(year: i32) -> bool {
639639

640640
#[cfg(test)]
641641
mod tests {
642+
use super::super::timezone::Transition;
643+
use super::super::{Error, TimeZone};
642644
use super::{AlternateTime, LocalTimeType, RuleDay, TransitionRule};
643645
use crate::matches;
644-
use crate::offset::tz_info::timezone::Transition;
645-
use crate::offset::tz_info::{Error, TimeZone};
646646

647647
#[test]
648648
fn test_quoted() -> Result<(), Error> {
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -533,9 +533,9 @@ const SECONDS_PER_28_DAYS: i64 = SECONDS_PER_DAY * 28;
533533

534534
#[cfg(test)]
535535
mod tests {
536+
use super::super::Error;
536537
use super::{LeapSecond, LocalTimeType, TimeZone, TimeZoneName, Transition, TransitionRule};
537538
use crate::matches;
538-
use crate::offset::tz_info::Error;
539539

540540
#[test]
541541
fn test_no_dst() -> Result<(), Error> {
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010

1111
use std::sync::Once;
1212

13+
use super::tz_info::TimeZone;
1314
use super::{DateTime, FixedOffset, Local, NaiveDateTime};
14-
use crate::offset::tz_info::TimeZone;
1515
use crate::Utc;
1616

1717
pub(super) fn now() -> DateTime<Local> {

src/offset/mod.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,6 @@ mod local;
3333
#[cfg(feature = "clock")]
3434
pub use self::local::Local;
3535

36-
#[cfg(all(unix, feature = "clock"))]
37-
mod tz_info;
38-
3936
mod utc;
4037
pub use self::utc::Utc;
4138

0 commit comments

Comments
 (0)