Skip to content

Commit 23df2b9

Browse files
committed
address comments and run doc example again to update result
Signed-off-by: Xintao <[email protected]>
1 parent db80791 commit 23df2b9

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/lib.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -76,10 +76,10 @@
7676
//! environment variable. In practice, you'll often want to trigger fail points
7777
//! programmatically, in unit tests.
7878
//!
79-
//! Fail points are managed by the registry which store a map of the fail points
79+
//! Fail points are managed by the registry which stores a map of the fail points
8080
//! names and actions. The registry is divided into local and global.
8181
//!
82-
//! When you don't specifically declare a registry, the global registry will be used
82+
//! When you don't declare a registry explicitly, the global registry will be used
8383
//! by default. You can pass the setting from environment variables to the global registry.
8484
//! Sometimes you need different tests to use different registries and don’t want their
8585
//! behavior to interfere with each other. You can create a local registry and then register
@@ -110,7 +110,7 @@
110110
//! }
111111
//! ```
112112
//!
113-
//! It should be noted that the local registry will will overwrite the global registry
113+
//! It should be noted that the local registry will overwrite the global registry
114114
//! if you register the current thread here. This means that the current thread can only
115115
//! use the fail points configuration of the local registry after registration.
116116
//!
@@ -133,17 +133,17 @@
133133
//! }
134134
//! println!("Global registry: {:?}", fail::list());
135135
//! ```
136-
//! When the example is run normally it prints out the contents of the registry used
136+
//! The example will print out the contents of the registry used
137137
//! at the time.
138138
//!
139139
//! ```sh
140140
//! FAILPOINTS=p0=return cargo run --features fail/failpoints
141141
//! Finished dev [unoptimized + debuginfo] target(s) in 0.01s
142142
//! Running `target/debug/failpointtest`
143-
//! Global registry: [("p1", "sleep(100)")]
143+
//! Global registry: [("p0", "return"), ("p1", "sleep(100)")]
144144
//! Local registry: [("p0", "pause")]
145145
//! Local registry: []
146-
//! Global registry: [("p1", "sleep(100)")]
146+
//! Global registry: [("p0", "return"), ("p1", "sleep(100)")]
147147
//! ```
148148
//!
149149
//! In this example, program update global registry with environment variable first.

0 commit comments

Comments
 (0)