From 8bc1fd23991539eb8b01fc940b1219786ae5f32b Mon Sep 17 00:00:00 2001 From: mat Date: Wed, 8 Dec 2021 22:09:24 +0000 Subject: minecraft-chat compiles --- minecraft-chat/src/base_component.rs | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) (limited to 'minecraft-chat/src/base_component.rs') diff --git a/minecraft-chat/src/base_component.rs b/minecraft-chat/src/base_component.rs index 2ed5646d..30e66173 100644 --- a/minecraft-chat/src/base_component.rs +++ b/minecraft-chat/src/base_component.rs @@ -1,6 +1,17 @@ -use crate::component::Component; +use crate::{component::Component, style::Style}; -pub trait BaseComponent { - const siblings: Vec; - // style: +#[derive(Clone)] +pub struct BaseComponent { + // implements mutablecomponent + pub siblings: Vec, + pub style: Style, +} + +impl BaseComponent { + pub fn new() -> Self { + Self { + siblings: Vec::new(), + style: Style::new(), + } + } } -- cgit v1.2.3