From a84643e6aed5ce931dbf87f58c71b2d0b0c6aa47 Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Sat, 16 Nov 2024 08:46:07 +0000 Subject: [PATCH] fix(net)!: Remove MatchOn `MatchOn` was left behind from the v1 implementation and isn't used by anything in the v2 implementation. --- src/net/mod.rs | 8 +------- src/net/system.rs | 16 ---------------- 2 files changed, 1 insertion(+), 23 deletions(-) diff --git a/src/net/mod.rs b/src/net/mod.rs index 2727df3..014b747 100644 --- a/src/net/mod.rs +++ b/src/net/mod.rs @@ -95,12 +95,6 @@ //! # } //! ``` //! -//! All [MatchOn] options: -//! - [MatchOn::Method] (default) -//! - [MatchOn::Url] (default) -//! - [MatchOn::Headers] -//! - [MatchOn::Body]. -//! //! Once you have defined all your expected responses, convert the [MockNet] into a [Net]. //! //! ```rust @@ -155,7 +149,7 @@ mod system; pub use result::{Error, Result}; -pub use system::{MatchOn, MockNet, Net}; +pub use system::{MockNet, Net}; pub use http::HeaderMap; pub use http::Method; diff --git a/src/net/system.rs b/src/net/system.rs index 2d257de..5559307 100644 --- a/src/net/system.rs +++ b/src/net/system.rs @@ -12,22 +12,6 @@ use super::{Error, Result}; /// A list of planned requests and responses type Plans = Vec; -/// The different ways to match a request. -#[derive(Debug, PartialEq, Eq)] -pub enum MatchOn { - /// The request must have a specific HTTP Request Method. - Method, - - /// The request must have a specific URL. - Url, - - /// The request must have a specify HTTP Body. - Body, - - /// The request must have a specific set of HTTP Headers. - Headers, -} - /// A planned request and the response to return /// /// Contains a list of the criteria that a request must meet before being considered a match.