Skip to content

Commit

Permalink
chore: clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
Mirko-von-Leipzig committed Jan 29, 2024
1 parent 2b3062e commit 3fa5a2f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
6 changes: 4 additions & 2 deletions crates/gateway-client/src/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,9 @@ mod tests {
use assert_matches::assert_matches;
use http::{response::Builder, StatusCode};
use pretty_assertions_sorted::assert_eq;
use std::{collections::VecDeque, net::SocketAddr, sync::Arc, time::Duration};
use std::{
collections::VecDeque, convert::Infallible, net::SocketAddr, sync::Arc, time::Duration,
};
use tokio::{sync::Mutex, task::JoinHandle};
use warp::Filter;

Expand Down Expand Up @@ -482,7 +484,7 @@ mod tests {
fn slow_server() -> (tokio::task::JoinHandle<()>, std::net::SocketAddr) {
let any = warp::any().then(|| async {
tokio::time::sleep(Duration::from_secs(1)).await;
Ok(Builder::new().status(200).body(""))
Result::<_, Infallible>::Ok(Builder::new().status(200).body(""))
});
let (addr, run_srv) = warp::serve(any).bind_ephemeral(([127, 0, 0, 1], 0));
let server_handle = tokio::spawn(run_srv);
Expand Down
3 changes: 2 additions & 1 deletion crates/pathfinder/examples/feeder_gateway.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
use std::collections::HashMap;
use std::convert::Infallible;
use std::num::NonZeroU32;

use anyhow::Context;
Expand Down Expand Up @@ -261,7 +262,7 @@ async fn serve() -> anyhow::Result<()> {
match class {
Ok(class) => {
let response = warp::http::Response::builder().header("content-type", "application/json").body(class).unwrap();
Ok(response)
Result::<_, Infallible>::Ok(response)
},
Err(_) => {
let error = r#"{"code": "StarknetErrorCode.UNDECLARED_CLASS", "message": "Class not found"}"#;
Expand Down

0 comments on commit 3fa5a2f

Please sign in to comment.