diff --git a/.gitignore b/.gitignore index 13640286..6b06bea3 100644 --- a/.gitignore +++ b/.gitignore @@ -17,3 +17,7 @@ Cargo.lock # Vim swap files *.swp + +# Compiled files for documentation +docs/node_modules +docs/.vuepress/dist/ diff --git a/Cargo.lock b/Cargo.lock index e7e382bc..607c8d97 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -780,7 +780,6 @@ version = "0.20.0" dependencies = [ "proc-macro2 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "starship 0.20.0", "syn 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)", ] diff --git a/starship/src/config.rs b/starship/src/config.rs index 80f9fa51..6f502517 100644 --- a/starship/src/config.rs +++ b/starship/src/config.rs @@ -1,4 +1,3 @@ -#![allow(dead_code)] use crate::configs::StarshipRootConfig; use crate::utils; use ansi_term::{Color, Style}; diff --git a/starship/src/configs/rust.rs b/starship/src/configs/rust.rs index 63a450a5..2bd25758 100644 --- a/starship/src/configs/rust.rs +++ b/starship/src/configs/rust.rs @@ -11,34 +11,6 @@ pub struct RustConfig<'a> { pub disabled: bool, } -/* This is what the macro adds. -impl<'a> ModuleConfig<'a> for RustConfig<'a> { - fn load_config(&self, config: &'a toml::Value) -> Self { - let mut new_module_config = self.clone(); - if let toml::Value::Table(config) = config { - if let Some(config_str) = config.get("symbol") { - new_module_config.symbol = new_module_config.symbol.load_config(config_str); - } - if let Some(config_str) = config.get("disabled") { - new_module_config.disabled = new_module_config.disabled.load_config(config_str); - } - if let Some(config_str) = config.get("style") { - new_module_config.style = new_module_config.style.load_config(config_str); - } - } - new_module_config - } - fn from_config(config: &'a toml::Value) -> Option { - let config = config.as_table()?; - Some(RustConfig { - symbol: <&'a str>::from_config(config.get("symbol")?)?, - style: