diff --git a/mithril-client/src/client.rs b/mithril-client/src/client.rs index dce1f71c408..dc04ae01c78 100644 --- a/mithril-client/src/client.rs +++ b/mithril-client/src/client.rs @@ -53,10 +53,8 @@ mod tests { let snapshot_message = SnapshotMessage::dummy(); let json_snapshot_message = serde_json::to_string(&snapshot_message)?; let http_server = test_http_server( - warp::path("artifact") - .and(warp::path("snapshot")) - .and(warp::path::param()) - .map(move |_digest: String| json_snapshot_message.clone()), + warp::path!("artifact" / "snapshot" / String) + .map(move |_digest| json_snapshot_message.clone()), ); let client = Client::new("WRITE THE VKEY HERE", &http_server.url()).await?; let response = client.show_snapshot(&snapshot_message.digest).await?; @@ -78,9 +76,7 @@ mod tests { ]; let json_snapshot_list_message = serde_json::to_string(&snapshot_list_message)?; let http_server = test_http_server( - warp::path("artifact") - .and(warp::path("snapshots")) - .map(move || json_snapshot_list_message.clone()), + warp::path!("artifact" / "snapshots").map(move || json_snapshot_list_message.clone()), ); let client = Client::new("WRITE THE VKEY HERE", &http_server.url()).await?; let response = client.list_snapshot().await?;