Skip to content

Commit 9f59c16

Browse files
committed
chore: change doctest
1 parent 07a4a56 commit 9f59c16

File tree

2 files changed

+12
-6
lines changed

2 files changed

+12
-6
lines changed

crates/libs/kill_tree/src/blocking.rs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ use crate::windows as imp;
2323
/// use kill_tree::{blocking::kill_tree, get_available_max_process_id, Result};
2424
///
2525
/// fn main() -> Result<()> {
26-
/// let _ = kill_tree(get_available_max_process_id())?;
26+
/// let target_process_id = get_available_max_process_id(); // Replace with your target process ID.
27+
/// let _ = kill_tree(target_process_id)?;
2728
/// Ok(())
2829
/// }
2930
/// ```
@@ -70,11 +71,12 @@ pub fn kill_tree(process_id: ProcessId) -> Result<Outputs> {
7071
/// };
7172
///
7273
/// fn main() -> Result<()> {
74+
/// let target_process_id = get_available_max_process_id(); // Replace with your target process ID.
7375
/// let config = Config {
7476
/// signal: String::from("SIGKILL"),
7577
/// ..Default::default()
7678
/// };
77-
/// let _ = kill_tree_with_config(get_available_max_process_id(), &config)?;
79+
/// let _ = kill_tree_with_config(target_process_id, &config)?;
7880
/// Ok(())
7981
/// }
8082
/// ```
@@ -86,11 +88,12 @@ pub fn kill_tree(process_id: ProcessId) -> Result<Outputs> {
8688
/// };
8789
///
8890
/// fn main() -> Result<()> {
91+
/// let target_process_id = get_available_max_process_id(); // Replace with your target process ID.
8992
/// let config = Config {
9093
/// include_target: false,
9194
/// ..Default::default()
9295
/// };
93-
/// let _ = kill_tree_with_config(get_available_max_process_id(), &config)?;
96+
/// let _ = kill_tree_with_config(target_process_id, &config)?;
9497
/// Ok(())
9598
/// }
9699
/// ```

crates/libs/kill_tree/src/tokio.rs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ use crate::windows as imp;
2424
///
2525
/// #[tokio::main]
2626
/// async fn main() -> Result<()> {
27-
/// let _ = kill_tree(get_available_max_process_id()).await?;
27+
/// let target_process_id = get_available_max_process_id(); // Replace with your target process ID.
28+
/// let _ = kill_tree(target_process_id).await?;
2829
/// Ok(())
2930
/// }
3031
/// ```
@@ -70,11 +71,12 @@ pub async fn kill_tree(process_id: ProcessId) -> Result<Outputs> {
7071
///
7172
/// #[tokio::main]
7273
/// async fn main() -> Result<()> {
74+
/// let target_process_id = get_available_max_process_id(); // Replace with your target process ID.
7375
/// let config = Config {
7476
/// signal: String::from("SIGKILL"),
7577
/// ..Default::default()
7678
/// };
77-
/// let _ = kill_tree_with_config(get_available_max_process_id(), &config).await?;
79+
/// let _ = kill_tree_with_config(target_process_id, &config).await?;
7880
/// Ok(())
7981
/// }
8082
/// ```
@@ -85,11 +87,12 @@ pub async fn kill_tree(process_id: ProcessId) -> Result<Outputs> {
8587
///
8688
/// #[tokio::main]
8789
/// async fn main() -> Result<()> {
90+
/// let target_process_id = get_available_max_process_id(); // Replace with your target process ID.
8891
/// let config = Config {
8992
/// include_target: false,
9093
/// ..Default::default()
9194
/// };
92-
/// let _ = kill_tree_with_config(get_available_max_process_id(), &config).await?;
95+
/// let _ = kill_tree_with_config(target_process_id, &config).await?;
9396
/// Ok(())
9497
/// }
9598
/// ```

0 commit comments

Comments
 (0)