mirror of
https://github.com/rust-lang/rustlings.git
synced 2025-01-09 20:03:24 +03:00
Updated compare_license_types
to Use References
* The `compare_license_types` function shouldn’t take ownership of its parameters Signed-off-by: Yakov Manshin <git@yakovmanshin.com>
This commit is contained in:
parent
b17295b36f
commit
2f30da890d
|
@ -33,7 +33,7 @@ mod tests {
|
||||||
let some_software = SomeSoftware {};
|
let some_software = SomeSoftware {};
|
||||||
let other_software = OtherSoftware {};
|
let other_software = OtherSoftware {};
|
||||||
|
|
||||||
assert!(compare_license_types(some_software, other_software));
|
assert!(compare_license_types(&some_software, &other_software));
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
|
@ -41,6 +41,6 @@ mod tests {
|
||||||
let some_software = SomeSoftware {};
|
let some_software = SomeSoftware {};
|
||||||
let other_software = OtherSoftware {};
|
let other_software = OtherSoftware {};
|
||||||
|
|
||||||
assert!(compare_license_types(other_software, some_software));
|
assert!(compare_license_types(&other_software, &some_software));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue