mirror of
https://github.com/rust-lang/rustlings.git
synced 2026-01-11 21:29:18 +00: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…
x
Reference in New Issue
Block a user