allow public uses of structs; add sample program

This commit is contained in:
2020-04-12 17:13:08 +01:00
parent fd4a682ade
commit bef39f9b8b
15 changed files with 132 additions and 61 deletions

View File

@@ -1,8 +1,8 @@
#[derive(Debug, Eq, PartialEq)]
pub struct Colour {
pub(crate) red: u8,
pub(crate) green: u8,
pub(crate) blue: u8,
pub red: u8,
pub green: u8,
pub blue: u8,
}
impl From<String> for Colour {