Copybara import of the project:

--
4b67c374d49b00860a8f285aae2e064cc58a0dc7 by Bastien Jacot-Guillarmod <bjacotg@gmail.com>:

Make `ActualT` in `Matcher` a generic type parameter.

--
7e34d847f2cda5387e55ac436ded30cc6d07bcaa by Bastien Jacot-Guillarmod <bjacotg@gmail.com>:

Accept all `Copy` type for `ActualT` instead of only reference.

PiperOrigin-RevId: 624094573
pull/16426/head
Bastien Jacot-Guillarmod 10 months ago committed by Copybara-Service
parent 10307b5b1d
commit d172859878
  1. 8
      rust/BUILD
  2. 3
      rust/map.rs

@ -85,7 +85,9 @@ rust_library(
rust_test(
name = "protobuf_upb_test",
crate = ":protobuf_upb",
rustc_flags = ["--cfg=upb_kernel"],
rustc_flags = [
"--cfg=upb_kernel",
],
deps = [
"@crate_index//:googletest",
],
@ -113,7 +115,9 @@ rust_library(
rust_test(
name = "protobuf_cpp_test",
crate = ":protobuf_cpp",
rustc_flags = ["--cfg=cpp_kernel"],
rustc_flags = [
"--cfg=cpp_kernel",
],
deps = [
"@crate_index//:googletest",
],

@ -543,7 +543,7 @@ mod tests {
]
);
assert_that!(
map.as_mut().iter().collect::<Vec<_>>(),
map.as_view().into_iter().collect::<Vec<_>>(),
unordered_elements_are![
eq((3, ProtoStr::from_str("fizz"))),
eq((5, ProtoStr::from_str("buzz"))),
@ -559,7 +559,6 @@ mod tests {
assert!(map_mut.insert(0, "fizz"));
// insert should return false when the key is already present
assert!(!map_mut.insert(0, "buzz"));
assert_that!(
map.as_mut().iter().collect::<Vec<_>>(),
unordered_elements_are![eq((0, ProtoStr::from_str("buzz"))),]

Loading…
Cancel
Save