Skip to content

Commit

Permalink
Merge pull request #449 from asomers/2021
Browse files Browse the repository at this point in the history
Use 2021 edition throughout.
  • Loading branch information
asomers committed Jan 16, 2023
2 parents cbcfe9d + 5019b4c commit 792e3ce
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion mockall/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ repository = "https://github.com/asomers/mockall"
categories = ["development-tools::testing"]
keywords = ["mock", "mocking", "testing"]
documentation = "https://docs.rs/mockall"
edition = "2018"
edition = "2021"
rust-version = "1.60"
description = """
A powerful mock object library for Rust.
Expand Down
2 changes: 1 addition & 1 deletion mockall/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
//! fn foo(&self, x: u32) -> u32;
//! }
//!
//! fn call_with_four(x: &MyTrait) -> u32 {
//! fn call_with_four(x: &dyn MyTrait) -> u32 {
//! x.foo(4)
//! }
//!
Expand Down
2 changes: 1 addition & 1 deletion mockall_derive/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ repository = "https://github.com/asomers/mockall"
categories = ["development-tools::testing"]
keywords = ["mock", "mocking", "testing"]
documentation = "https://docs.rs/mockall_derive"
edition = "2018"
edition = "2021"
description = """
Procedural macros for Mockall
"""
Expand Down
2 changes: 1 addition & 1 deletion mockall_derive/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ cfg_if! {
}
} else {
fn compile_error(_span: Span, msg: &str) {
panic!("{}. More information may be available when mockall is built with the \"nightly\" feature.", msg);
panic!("{msg}. More information may be available when mockall is built with the \"nightly\" feature.");
}
}
}
Expand Down
6 changes: 3 additions & 3 deletions mockall_derive/src/mock_function.rs
Original file line number Diff line number Diff line change
Expand Up @@ -521,7 +521,7 @@ impl MockFunction {
* generic parameters with UnwindSafe
*/
/* std::panic::catch_unwind(|| */
__mockall_guard.#call#tbf(#(#call_exprs,)*)
__mockall_guard.#call #tbf(#(#call_exprs,)*)
/*)*/
}.expect(&no_match_msg)
}
Expand All @@ -533,7 +533,7 @@ impl MockFunction {
#dead_code
#vis #sig {
let no_match_msg = #no_match_msg;
#deref self.#substruct_obj #name.#call#tbf(#(#call_exprs,)*)
#deref self.#substruct_obj #name.#call #tbf(#(#call_exprs,)*)
.expect(&no_match_msg)
}

Expand Down Expand Up @@ -663,7 +663,7 @@ impl MockFunction {
-> &mut #modname::#expectation_obj
#wc
{
self.#substruct_obj #name.expect#tbf()
self.#substruct_obj #name.expect #tbf()
}
)
}
Expand Down
2 changes: 1 addition & 1 deletion mockall_double/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ repository = "https://github.com/asomers/mockall"
categories = ["development-tools::testing"]
keywords = ["mock", "mocking", "testing"]
documentation = "https://docs.rs/mockall_double"
edition = "2018"
edition = "2021"
description = """
Test double adapter for Mockall
"""
Expand Down
2 changes: 1 addition & 1 deletion mockall_double/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ cfg_if! {
}
} else {
fn compile_error(_span: Span, msg: &str) {
panic!("{}. More information may be available when mockall_double is built with the \"nightly\" feature.", msg);
panic!("{msg}. More information may be available when mockall_double is built with the \"nightly\" feature.");
}
}
}
Expand Down

0 comments on commit 792e3ce

Please sign in to comment.