From 2f30da890dbd9302e5ec25892ef9bdbeb380cf9c Mon Sep 17 00:00:00 2001 From: Yakov Manshin Date: Mon, 24 Oct 2022 05:01:51 +0300 Subject: [PATCH] Updated `compare_license_types` to Use References MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * The `compare_license_types` function shouldn’t take ownership of its parameters Signed-off-by: Yakov Manshin --- exercises/traits/traits4.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/exercises/traits/traits4.rs b/exercises/traits/traits4.rs index 6b541665..86f8e933 100644 --- a/exercises/traits/traits4.rs +++ b/exercises/traits/traits4.rs @@ -33,7 +33,7 @@ mod tests { let some_software = SomeSoftware {}; let other_software = OtherSoftware {}; - assert!(compare_license_types(some_software, other_software)); + assert!(compare_license_types(&some_software, &other_software)); } #[test] @@ -41,6 +41,6 @@ mod tests { let some_software = SomeSoftware {}; let other_software = OtherSoftware {}; - assert!(compare_license_types(other_software, some_software)); + assert!(compare_license_types(&other_software, &some_software)); } }