Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove the deprecated times_any and times_range methods #197

Merged
merged 1 commit into from
Sep 5, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ This project adheres to [Semantic Versioning](http://semver.org/).

### Removed

- Removed `times_any` and `times_range` methods from Expectations. They've
been deprecated since 0.3.0.
([#196](https://github.com/asomers/mockall/pull/196))

## [0.8.0] - 29 August 2020
### Added
- Added support for mocking structs and traits with associated constants.
Expand Down
36 changes: 0 additions & 36 deletions mockall_derive/src/mock_function.rs
Original file line number Diff line number Diff line change
Expand Up @@ -975,26 +975,6 @@ impl<'a> ToTokens for CommonExpectationMethods<'a> {
self
}

/// Allow this expectation to be called any number of times
///
/// This behavior is the default, but the method is provided in case the
/// default behavior changes.
#[deprecated(since = "0.3.0", note = "Use times instead")]
#v fn times_any(&mut self) -> &mut Self {
self.common.times(..);
self
}

/// Allow this expectation to be called any number of times within a
/// given range
#[deprecated(since = "0.3.0", note = "Use times instead")]
#v fn times_range(&mut self, __mockall_range: Range<usize>)
-> &mut Self
{
self.common.times(__mockall_range);
self
}

/// Set matching crieteria for this Expectation.
///
/// The matching predicate can be anything implemening the
Expand Down Expand Up @@ -1210,22 +1190,6 @@ impl<'a> ToTokens for ExpectationGuardCommonMethods<'a> {
#expectations.0[self.i].times(__mockall_r)
}

/// Just like
/// [`Expectation::times_any`](struct.Expectation.html#method.times_any)
#[deprecated(since = "0.3.0", note = "Use times instead")]
#v fn times_any(&mut self) -> &mut Expectation #tg {
#expectations.0[self.i].times(..)
}

/// Just like
/// [`Expectation::times_range`](struct.Expectation.html#method.times_range)
#[deprecated(since = "0.3.0", note = "Use times instead")]
#v fn times_range(&mut self, __mockall_range: Range<usize>)
-> &mut Expectation #tg
{
#expectations.0[self.i].times(__mockall_range)
}

/// Just like
/// [`Expectation::with`](struct.Expectation.html#method.with)
#v fn with<#with_generics> (&mut self, #with_args)
Expand Down