Completed exercise up to Traits

This commit is contained in:
Samuele Iacoponi
2026-02-01 16:38:57 +01:00
parent 9ef3441dba
commit b1b81f7e07
33 changed files with 732 additions and 71 deletions

View File

@@ -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()
}