Completed exercise up to Traits
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user