Skip to content

Commit

Permalink
fix example
Browse files Browse the repository at this point in the history
  • Loading branch information
Rjected committed Dec 21, 2023
1 parent 0dac9bd commit 89dc77a
Showing 1 changed file with 13 additions and 8 deletions.
21 changes: 13 additions & 8 deletions bin/reth/src/cli/node_builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -307,15 +307,20 @@ impl NodeBuilder {
///
/// # Example
/// ```rust
/// # use reth_tasks::TaskManager;
/// fn t() {
/// use reth_tasks::TaskSpawner;
/// let rt = tokio::runtime::Runtime::new().unwrap();
/// let manager = TaskManager::new(rt.handle().clone());
/// # use reth_tasks::{TaskManager, TaskSpawner};
/// # use reth::cli::{
/// # node_builder::NodeBuilder,
/// # ext::DefaultRethNodeCommandConfig,
/// # };
/// # use tokio::runtime::Handle;
///
/// async fn t() {
/// let handle = Handle::current();
/// let manager = TaskManager::new(handle);
/// let executor = manager.executor();
/// let config = NodeBuilder::default();
/// let ext = DefaultRethNodeCommandConfig;
/// let handle = config.launch(ext, executor);
/// let builder = NodeBuilder::default();
/// let ext = DefaultRethNodeCommandConfig::default();
/// let handle = builder.launch::<()>(ext, executor).await.unwrap();
/// }
/// ```
pub async fn launch<E: RethCliExt>(
Expand Down

0 comments on commit 89dc77a

Please sign in to comment.