Completed exercise up to Traits
This commit is contained in:
@@ -11,7 +11,8 @@ impl Licensed for SomeSoftware {}
|
||||
impl Licensed for OtherSoftware {}
|
||||
|
||||
// TODO: Fix the compiler error by only changing the signature of this function.
|
||||
fn compare_license_types(software1: ???, software2: ???) -> bool {
|
||||
fn compare_license_types(software1: impl Licensed, software2: impl Licensed) -> bool {
|
||||
// Impl Licensed means to accept every types that implement Licensed
|
||||
software1.licensing_info() == software2.licensing_info()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user