From 95a0827517d2d29a26157b051ac1fea771da48ca Mon Sep 17 00:00:00 2001 From: Marshall Bowers Date: Thu, 2 Nov 2023 19:20:21 -0400 Subject: [PATCH] Clean up unused code --- crates/theme_importer/src/main.rs | 10 ------- crates/theme_importer/src/vscode.rs | 43 ++--------------------------- 2 files changed, 2 insertions(+), 51 deletions(-) diff --git a/crates/theme_importer/src/main.rs b/crates/theme_importer/src/main.rs index ca2b2e3195..0e187d631d 100644 --- a/crates/theme_importer/src/main.rs +++ b/crates/theme_importer/src/main.rs @@ -18,16 +18,6 @@ use vscode::VsCodeThemeConverter; use crate::theme_printer::ThemeFamilyPrinter; use crate::vscode::VsCodeTheme; -pub(crate) fn new_theme_family(name: String, author: String) -> ThemeFamily { - ThemeFamily { - id: uuid::Uuid::new_v4().to_string(), - name: name.into(), - author: author.into(), - themes: Vec::new(), - scales: default_color_scales(), - } -} - #[derive(Debug, Deserialize)] struct FamilyMetadata { pub name: String, diff --git a/crates/theme_importer/src/vscode.rs b/crates/theme_importer/src/vscode.rs index bc3ebd22d1..5988598943 100644 --- a/crates/theme_importer/src/vscode.rs +++ b/crates/theme_importer/src/vscode.rs @@ -1,14 +1,10 @@ -use std::path::{Path, PathBuf}; - use anyhow::Result; use gpui::{Hsla, Refineable, Rgba}; use serde::Deserialize; use theme::{ - default_color_scales, Appearance, ColorScales, GitStatusColors, PlayerColors, StatusColors, - SyntaxTheme, SystemColors, ThemeColors, ThemeColorsRefinement, ThemeFamily, ThemeStyles, - ThemeVariant, + Appearance, GitStatusColors, PlayerColors, StatusColors, SyntaxTheme, SystemColors, + ThemeColors, ThemeColorsRefinement, ThemeStyles, ThemeVariant, }; -use uuid::Uuid; use crate::ThemeMetadata; @@ -34,41 +30,6 @@ pub struct VsCodeColors { editor: String, } -pub(crate) fn new_theme_family_from_vsc(path: &Path) -> Result { - todo!() - - // let path_str = path.to_str().unwrap(); - // let family_name = path_str.split('/').last().unwrap(); - - // let mut json_files: Vec = Vec::new(); - - // if path.is_dir() { - // for entry in std::fs::read_dir(path).unwrap() { - // let entry = entry.unwrap(); - // let path = entry.path(); - // if path.is_file() { - // if let Some(extension) = path.extension() { - // if extension == "json" { - // json_files.push(path.file_name().unwrap().to_str().unwrap().to_string()); - // } - // } - // } - // } - // } else { - // anyhow::bail!("Path is not a directory"); - // } - - // let mut theme_family = ThemeFamily { - // id: uuid::Uuid::new_v4().to_string(), - // name: family_name.into(), - // author: "New Theme Family".into(), - // themes: Vec::new(), - // scales: default_color_scales(), - // }; - - // Ok(theme_family) -} - fn try_parse_color(color: &str) -> Result { Ok(Rgba::try_from(color)?.into()) }