Skip to content

Commit 5567414

Browse files
committed
fix(profiler): Fix doctest documentation in profiler
1 parent 263bc0c commit 5567414

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

crates/profiler/src/lib.rs

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -193,12 +193,15 @@ fn setup(path: String, frequency: i32, interval: u64, name: String) -> Result<()
193193
/// # Examples
194194
///
195195
/// ```
196-
/// profiler::setup_profiling(
197-
/// "/opt/profiling/my-service".to_string(),
198-
/// 150,
199-
/// 120,
200-
/// Some("My Service".to_string())
201-
/// )?;
196+
/// # fn main() -> Result<(), Box<dyn std::error::Error>> {
197+
/// profiler::setup_profiling(
198+
/// "/opt/profiling/my-service".to_string(),
199+
/// 150,
200+
/// 120,
201+
/// Some("My Service".to_string()),
202+
/// )?;
203+
/// # Ok(())
204+
/// # }
202205
/// ```
203206
pub fn setup_profiling(
204207
path: String,

0 commit comments

Comments
 (0)