Skip to content

Commit

Permalink
Move implementation to cap-time-ext.
Browse files Browse the repository at this point in the history
The cap-std crate is intended to focus on features which are provided by
Rust's `std`.
  • Loading branch information
cdmurph32 committed Oct 12, 2023
1 parent 9fc8973 commit fece5a2
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
1 change: 0 additions & 1 deletion cap-primitives/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ maybe-owned = "0.3.4"
fs-set-times = "0.20.0"
io-extras = "0.18.0"
io-lifetimes = { version = "2.0.0", default-features = false }
iana-time-zone = "0.1.57"

[dev-dependencies]
cap-tempfile = { path = "../cap-tempfile" }
Expand Down
2 changes: 0 additions & 2 deletions cap-primitives/src/time/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,10 @@ mod instant;
mod monotonic_clock;
mod system_clock;
mod system_time;
mod timezone;

pub use instant::Instant;
pub use monotonic_clock::MonotonicClock;
pub use system_clock::SystemClock;
pub use system_time::SystemTime;
pub use timezone::Timezone;

pub use std::time::{Duration, SystemTimeError};
4 changes: 2 additions & 2 deletions cap-std/src/time/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
//! This corresponds to [`std::time`].
//!
//! Instead of [`std::time`]'s methods which return the current time, this
//! crate has methods on [`SystemClock`], [`MonotonicClock`] and [`Timezone`].
//! crate has methods on [`SystemClock`] and [`MonotonicClock`].

pub use cap_primitives::time::{
Duration, Instant, MonotonicClock, SystemClock, SystemTime, SystemTimeError, Timezone,
Duration, Instant, MonotonicClock, SystemClock, SystemTime, SystemTimeError,
};
2 changes: 2 additions & 0 deletions cap-time-ext/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,10 @@ repository = "https://github.com/bytecodealliance/cap-std"
edition = "2021"

[dependencies]
ambient-authority = "0.0.2"
cap-primitives = { path = "../cap-primitives", version = "^2.0.0" }
cap-std = { path = "../cap-std", optional = true, version = "^2.0.0" }
iana-time-zone = "0.1.57"

[target.'cfg(not(windows))'.dependencies]
rustix = { version = "0.38.0", features = ["time"] }
Expand Down
2 changes: 2 additions & 0 deletions cap-time-ext/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@

mod monotonic_clock;
mod system_clock;
mod timezone;

pub use monotonic_clock::MonotonicClockExt;
pub use system_clock::SystemClockExt;
pub use timezone::Timezone;
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ pub struct Timezone(());
#[derive(Debug)]
pub struct TimezoneError(String);

//impl LocalResult for TimezoneError {
impl Timezone {
/// Constructs a new instance of `Self`.
///
Expand Down

0 comments on commit fece5a2

Please sign in to comment.