Skip to content

Commit

Permalink
ref(test): Accept impl Into<Matcher> for with_matcher
Browse files Browse the repository at this point in the history
This broadens the acceptable arguments for this method.
  • Loading branch information
szokeasaurusrex committed Nov 19, 2024
1 parent 61ca9dc commit 6acf1da
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tests/integration/test_utils/mock_endpoint_builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ impl MockEndpointBuilder {

/// Set the matcher for the response body of the mock endpoint. The mock will only
/// respond to requests if the response body matches the matcher.
pub fn with_matcher(mut self, matcher: Matcher) -> Self {
pub fn with_matcher(mut self, matcher: impl Into<Matcher>) -> Self {
let matcher = matcher.into();
self.builder = Box::new(|server| (self.builder)(server).match_body(matcher));
self
}
Expand Down

0 comments on commit 6acf1da

Please sign in to comment.