Skip to content

Commit

Permalink
Merge pull request #2507 from eqlabs/vbar/ignore-rpc-examples
Browse files Browse the repository at this point in the history
fix: exclude from doctests example code that isn't meant to compile
  • Loading branch information
vbar authored Jan 22, 2025
2 parents ea5bb52 + 6ec979f commit 9df2ee2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
12 changes: 6 additions & 6 deletions crates/rpc/src/jsonrpc/router/method.rs
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ pub async fn handle_json_rpc_body(
}
}

/// ```
/// ```ignore
/// async fn example(RpcContext, impl DeserializeForVersion, RpcVersion) -> Result<Output, Into<RpcError>>
/// ```
impl<F, Input, Output, Error, Fut>
Expand Down Expand Up @@ -145,7 +145,7 @@ where
}
}

/// ```
/// ```ignore
/// async fn example(RpcContext, impl Deserialize) -> Result<Output, Into<RpcError>>
/// ```
impl<F, Input, Output, Error, Fut> IntoRpcEndpoint<((), Input), ((), Output), ((), RpcContext)>
Expand Down Expand Up @@ -194,7 +194,7 @@ where
}
}

/// ```
/// ```ignore
/// async fn example(impl Deserialize) -> Result<Output, Into<RpcError>>
/// ```
#[async_trait]
Expand Down Expand Up @@ -243,7 +243,7 @@ where
}
}

/// ```
/// ```ignore
/// async fn example(RpcContext) -> Result<Output, Into<RpcError>>
/// ```
#[async_trait]
Expand Down Expand Up @@ -294,7 +294,7 @@ where
}
}

/// ```
/// ```ignore
/// async fn example() -> Result<Output, Into<RpcError>>
/// ```
#[async_trait]
Expand Down Expand Up @@ -345,7 +345,7 @@ where
}
}

/// ```
/// ```ignore
/// fn example() -> &'static str
/// ```
#[async_trait]
Expand Down
4 changes: 2 additions & 2 deletions crates/rpc/src/jsonrpc/websocket.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
//!
//!
//! Manual testing can be performed using `wscat`:
//! ```
//! ```ignore
//! > pierre:~/pathfinder$ wscat -c ws://localhost:9545/ws
//! Connected (press CTRL+C to quit)
//! > {"jsonrpc":"2.0", "id": 1, "method": "pathfinder_subscribe", "params": ["newHeads"]}
Expand All @@ -19,7 +19,7 @@
//!
//! Subscriptions may lag behind because of a slow network or slow client and
//! result in an error:
//! ```
//! ```ignore
//! > pierre:~/pathfinder$ wscat -c ws://localhost:9545/ws
//! Connected (press CTRL+C to quit)
//! > {"jsonrpc":"2.0", "id": 1, "method": "pathfinder_subscribe", "params":
Expand Down

0 comments on commit 9df2ee2

Please sign in to comment.