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

@@ -3,7 +3,9 @@ trait Licensed {
// implementors like the two structs below can share that default behavior
// without repeating the function.
// The default license information should be the string "Default license".
fn licensing_info(&self) -> String;
fn licensing_info(&self) -> String {
String::from("Default license")
}
}
struct SomeSoftware {