fix(doctest): Import harmony instrumentation properly in doc tests
All checks were successful
Run Check Script / check (pull_request) Successful in 1m15s
All checks were successful
Run Check Script / check (pull_request) Successful in 1m15s
This commit is contained in:
parent
05e7b8075c
commit
0395d11e98
@ -50,6 +50,7 @@ static SUBSCRIBERS: Lazy<Mutex<HashMap<String, Subscriber>>> =
|
|||||||
///
|
///
|
||||||
/// # Example
|
/// # Example
|
||||||
/// ```
|
/// ```
|
||||||
|
/// use harmony::instrumentation;
|
||||||
/// instrumentation::subscribe("my_logger", |event| {
|
/// instrumentation::subscribe("my_logger", |event| {
|
||||||
/// println!("Event occurred: {:?}", event);
|
/// println!("Event occurred: {:?}", event);
|
||||||
/// });
|
/// });
|
||||||
@ -68,6 +69,8 @@ where
|
|||||||
///
|
///
|
||||||
/// # Example
|
/// # Example
|
||||||
/// ```
|
/// ```
|
||||||
|
/// use harmony::instrumentation;
|
||||||
|
/// use harmony::instrumentation::HarmonyEvent;
|
||||||
/// instrumentation::instrument(HarmonyEvent::HarmonyStarted);
|
/// instrumentation::instrument(HarmonyEvent::HarmonyStarted);
|
||||||
/// ```
|
/// ```
|
||||||
pub fn instrument(event: HarmonyEvent) -> Result<(), &'static str> {
|
pub fn instrument(event: HarmonyEvent) -> Result<(), &'static str> {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user