瀏覽代碼

some other stuff

Getty Ritter 10 月之前
父節點
當前提交
16765d5be2
共有 3 個文件被更改,包括 8 次插入3 次删除
  1. 4 0
      Cargo.toml
  2. 3 3
      src/data.rs
  3. 1 0
      src/lib.rs

+ 4 - 0
Cargo.toml

@@ -19,3 +19,7 @@ clap = { version = "*", features = ["derive"] }
 [[bin]]
 name = "thyme-from-png"
 path = "tools/from-png/main.rs"
+
+[[bin]]
+name = "thyme-editor"
+path = "tools/editor/main.rs"

+ 3 - 3
src/data.rs

@@ -4,15 +4,15 @@ use crate::errors::IncompleteMappingError;
 use crate::image::{Image, Pixel};
 use std::collections::{HashMap, HashSet};
 
+#[derive(Deserialize, Debug)]
+pub struct Mapping(pub HashMap<Pixel, String>);
+
 #[derive(Deserialize, Debug)]
 struct ColorEntry {
     color: Pixel,
     symbol: String,
 }
 
-#[derive(Deserialize, Debug)]
-pub struct Mapping(HashMap<Pixel, String>);
-
 impl Mapping {
     pub fn load(
         path: impl AsRef<std::path::Path>,

+ 1 - 0
src/lib.rs

@@ -1,4 +1,5 @@
 pub mod data;
 pub mod draw;
 pub mod errors;
+pub mod file;
 pub mod image;