Skip to content

Commit bfd2a39

Browse files
committed
Reformattalot
1 parent 9db98da commit bfd2a39

File tree

3 files changed

+16
-14
lines changed

3 files changed

+16
-14
lines changed

crates/bevy_time/src/real.rs

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ use crate::time::Time;
77
///
88
/// It specialization of the [`Time`] structure. **For method documentation, see
99
/// [`Time<Real>#impl-Time<Real>`].**
10-
///
10+
///
1111
/// It is automatically inserted as a resource by
1212
/// [`TimePlugin`](crate::TimePlugin) and updated with time instants according
1313
/// to [`TimeUpdateStrategy`](crate::TimeUpdateStrategy).
@@ -46,7 +46,8 @@ impl Default for Real {
4646
}
4747

4848
impl Time<Real> {
49-
/// Constructs a new `Time<Real>` instance with a specific startup [`Instant`](std::time::Instant).
49+
/// Constructs a new `Time<Real>` instance with a specific startup
50+
/// [`Instant`](std::time::Instant).
5051
pub fn new(startup: Instant) -> Self {
5152
Self::new_with(Real {
5253
startup,
@@ -102,15 +103,17 @@ impl Time<Real> {
102103
self.context().startup
103104
}
104105

105-
/// Returns the [`Instant`](std::time::Instant) when [`Self::update`] was first called, if it exists.
106+
/// Returns the [`Instant`](std::time::Instant) when [`Self::update`] was first called, if it
107+
/// exists.
106108
///
107109
/// This usually represents when the first app update started.
108110
#[inline]
109111
pub fn first_update(&self) -> Option<Instant> {
110112
self.context().first_update
111113
}
112114

113-
/// Returns the [`Instant`](std::time::Instant) when [`Self::update`] was last called, if it exists.
115+
/// Returns the [`Instant`](std::time::Instant) when [`Self::update`] was last called, if it
116+
/// exists.
114117
///
115118
/// This usually represents when the current app update started.
116119
#[inline]

crates/bevy_time/src/time.rs

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,12 @@ use bevy_utils::Duration;
99
/// [`TimePlugin`](crate::TimePlugin):
1010
///
1111
/// - [`Time<Real>`](crate::real::Real) tracks real wall-clock time.
12-
/// - [`Time<Virtual>`](crate::virt::Virtual) tracks virtual game time that may
13-
/// be paused or scaled.
14-
/// - [`Time<Fixed>`](crate::fixed::Fixed) tracks fixed timesteps based on
15-
/// virtual time.
16-
/// - [`Time`] is a generic clock that corresponds to "current" or "default"
17-
/// time for systems. It contains [`Time<Virtual>`](crate::virt::Virtual)
18-
/// except inside the [`FixedUpdate`](bevy_app::FixedUpdate) schedule when it
19-
/// contains [`Time<Fixed>`](crate::fixed::Fixed).
12+
/// - [`Time<Virtual>`](crate::virt::Virtual) tracks virtual game time that may be paused or scaled.
13+
/// - [`Time<Fixed>`](crate::fixed::Fixed) tracks fixed timesteps based on virtual time.
14+
/// - [`Time`] is a generic clock that corresponds to "current" or "default" time for systems. It
15+
/// contains [`Time<Virtual>`](crate::virt::Virtual) except inside the
16+
/// [`FixedUpdate`](bevy_app::FixedUpdate) schedule when it contains
17+
/// [`Time<Fixed>`](crate::fixed::Fixed).
2018
///
2119
/// A clock tracks the time elapsed since the previous time this clock was
2220
/// advanced as [`delta()`](Time::delta) and the total amount of time the clock
@@ -204,7 +202,8 @@ pub struct Time<T: Default = ()> {
204202
impl<T: Default> Time<T> {
205203
const DEFAULT_WRAP_SECONDS: u64 = 3600; // 1 hour
206204

207-
/// Create a new clock from context with [`Self::delta`] and [`Self::elapsed`] starting from zero.
205+
/// Create a new clock from context with [`Self::delta`] and [`Self::elapsed`] starting from
206+
/// zero.
208207
pub fn new_with(context: T) -> Self {
209208
Self {
210209
context,

crates/bevy_time/src/virt.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ use crate::{real::Real, time::Time};
88
///
99
/// It specialization of the [`Time`] structure. **For method documentation, see
1010
/// [`Time<Virtual>#impl-Time<Virtual>`].**
11-
///
11+
///
1212
/// Normally used as `Time<Virtual>`. It is automatically inserted as a resource
1313
/// by [`TimePlugin`](crate::TimePlugin) and updated based on
1414
/// [`Time<Real>`](Real). The virtual clock is automatically set as the default

0 commit comments

Comments
 (0)