Skip to content

Commit d65b70d

Browse files
committed
move Clock/MockClock/SystemClock/BoxClock/BoxRng to mas-data-model : correct documentation
1 parent c314802 commit d65b70d

File tree

2 files changed

+10
-8
lines changed

2 files changed

+10
-8
lines changed

crates/data-model/src/lib.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,15 @@
44
// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial
55
// Please see LICENSE files in the repository root for full details.
66

7+
//!
8+
//! This crate defines a [`Clock`] trait that can be used to abstract the
9+
//! way the current time is retrieved. It has two implementation:
10+
//! [`SystemClock`] that uses the system time and [`MockClock`] which is useful
11+
//! for testing.
12+
//!
13+
//! [`MockClock`]: crate::clock::MockClock
14+
//!
15+
716
#![allow(clippy::module_name_repetitions)]
817

918
use thiserror::Error;

crates/storage/src/lib.rs

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,6 @@
1515
//! without caring about the underlying storage backend, and without carrying
1616
//! around the generic type parameter.
1717
//!
18-
//! This crate also defines a [`Clock`] trait that can be used to abstract the
19-
//! way the current time is retrieved. It has two implementation:
20-
//! [`SystemClock`] that uses the system time and [`MockClock`] which is useful
21-
//! for testing.
22-
//!
23-
//! [`MockClock`]: mas_data_model::clock::MockClock
24-
//!
2518
//! # Defining a new repository
2619
//!
2720
//! To define a new repository, you have to:
@@ -86,7 +79,7 @@
8679
//! and use that error type
8780
//! 2. Lookups return an `Result<Option<T>, Self::Error>`, because 'not found'
8881
//! errors are usually cases that are handled differently
89-
//! 3. Operations that need to record the current type use a [`Clock`]
82+
//! 3. Operations that need to record the current type use a [`mas_data_model::Clock`]
9083
//! parameter. Operations that need to generate new IDs also use a random
9184
//! number generator.
9285
//! 4. All the methods use an `&mut self`. This is ensures only one operation

0 commit comments

Comments
 (0)