Skip to content

Commit

Permalink
Merge pull request #225 from asomers/unneeded_generic
Browse files Browse the repository at this point in the history
Don't generic unneeded GenericExpectation code
  • Loading branch information
asomers committed Nov 3, 2020
2 parents 9586b50 + 5926def commit 8c3bd29
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ minver_task:
cargo_cache:
folder: $CARGO_HOME/registry
test_script:
# Workaround Rust bug https://github.com/rust-lang/rust/issues/78660
- env RUSTUP_HOME=/usr/local/rustup CARGO_HOME=/usr/local/cargo PATH=/usr/local/cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin && rustup toolchain install --profile minimal nightly-2020-10-27-x86_64 && rustup default nightly-2020-10-27-x86_64
- cargo update -Zminimal-versions
- cargo test --all-features --all
before_cache_script: rm -rf $CARGO_HOME/registry/index
Expand Down
3 changes: 3 additions & 0 deletions mockall_derive/src/mock_function.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2248,6 +2248,9 @@ impl<'a> ToTokens for GenericExpectations<'a> {
if ! self.f.is_expectation_generic() {
return;
}
if ! self.f.is_static() && ! self.f.is_method_generic() {
return;
}

let ge = StaticGenericExpectations{f: self.f};
let v = &self.f.privmod_vis;
Expand Down

0 comments on commit 8c3bd29

Please sign in to comment.