Make it compile (#37)

* Fix indentation

* Set the correct name of the crate in root Cargo.toml

* Fix all compile errors
This commit is contained in:
ProTheory8
2021-03-22 21:42:14 +05:00
committed by Keavon Chambers
parent 38dbe34293
commit 18a8442b0e
10 changed files with 33 additions and 20 deletions

View File

@@ -4,6 +4,5 @@ version = "0.1.0"
authors = ["Keavon Chambers <graphite@keavon.com>"]
edition = "2018"
[dependencies]
log = "0.4"

View File

@@ -3,7 +3,7 @@ use std::error::Error;
use std::fmt::{self, Display};
/// The error type used by the graphite editor.
#[derive(Debug)]
#[derive(Clone, Debug)]
pub enum EditorError {
InvalidOperation(String),
Misc(String),

View File

@@ -11,9 +11,10 @@ pub use error::EditorError;
pub use color::Color;
use tools::ToolState;
use workspace::Workspace;
// TODO: serialize with serde to save the current editor state
struct Editor {
tools: ToolState,
workspace: workspace::Workspace,
workspace: Workspace,
}

View File

@@ -1,7 +1,7 @@
use crate::EditorError;
pub type PanelId = usize;
struct Workspace {
pub struct Workspace {
hovered_panel: PanelId,
root: PanelGroup,
}