This makes the trait implementation more generic in three ways:
A single struct can implement Matcher for multiple types, since Actual is now a generic type parameter.
ActualT can be passed as value if it implements Copy, which solved #351.
When ActualT is a reference, the Matcher implementation can put constraint on its lifetime, which solved #323.
We tried to make sure this change had as limited an impact on users of the library as possible. Often, the library can be updated without changes on the tests. However, there are two areas requiring changes:
Matcher implementation
Obviously, libraries implementing their own matcher will need to update their implementation to match the new trait definition. For instance:
Pre 0.12.0
#[derive(Debug)]
enum MyEnum {
...
}
struct MyEnumMatcher { ... }
impl Matcher for MyEnumMatcher {
type ActualT = MyEnumMatcher;
fn matches(&self, actual: &Self::ActualT) -> MatcherResult {
match actual {
...
}
}
</tr></table>
... (truncated)
Commits
de68875 Merge pull request #442 from google:new_version
70a6da1 Generalize into_test_result() extension method to all std::result::Result and...
63421a6 Eliminate an unnecessary memory allocation in is_utf8_string
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Updates the requirements on googletest to permit the latest version.
Release notes
Sourced from googletest's releases.
... (truncated)
Commits
de68875
Merge pull request #442 from google:new_version70a6da1
Generalize into_test_result() extension method to all std::result::Result and...63421a6
Eliminate an unnecessary memory allocation inis_utf8_string
876dbe2
Prepare for 0.12 release.89655d0
Handle non-copyable type in(expect|verify)_(ne|eq)!
c33408e
Handle non-copyable type in(expect|verify)_(ne|eq)!
07dffcf
Handle non-copyable type in(expect|verify)_(ne|eq)!
cccc94a
Add #[track_caller] sincenear
can panic.896b468
Merge pull request #436 from google:cargo_lockac19539
Add new latest deps workflow.Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase
.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show