diff --git a/.editorconfig b/.editorconfig index d280e66381..f6fb9f98d9 100644 --- a/.editorconfig +++ b/.editorconfig @@ -4,6 +4,6 @@ root = true indent_style = space indent_size = 4 charset = utf-8 -trim_trailing_whitespace = false +trim_trailing_whitespace = true insert_final_newline = false end_of_line = lf \ No newline at end of file diff --git a/src/lib.rs b/src/lib.rs index 7a82741199..2e9b8fb061 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,5 +1,4 @@ #![feature(generators)] -#![feature(specialization)] #![feature(proc_macro_hygiene)] #[macro_use] diff --git a/src/object/dict.rs b/src/object/dict.rs index 7fb0b5bcf9..1f53d2ade5 100644 --- a/src/object/dict.rs +++ b/src/object/dict.rs @@ -146,7 +146,7 @@ impl TaggedDictBuilder { dict: IndexMap::default(), } } - + pub fn with_capacity(tag: impl Into, n: usize) -> TaggedDictBuilder { TaggedDictBuilder { tag: tag.into(), diff --git a/src/object/types.rs b/src/object/types.rs index 2f17ed6f03..8dca43d878 100644 --- a/src/object/types.rs +++ b/src/object/types.rs @@ -1,4 +1,3 @@ -use crate::object::base as value; use crate::prelude::*; use log::trace; @@ -6,29 +5,6 @@ pub trait ExtractType: Sized { fn extract(value: &Tagged) -> Result; } -impl ExtractType for T { - default fn extract(_value: &Tagged) -> Result { - let name = std::any::type_name::(); - Err(ShellError::unimplemented(format!( - " ExtractType for {}", - name - ))) - } -} -impl ExtractType for Option { - fn extract(value: &Tagged) -> Result, ShellError> { - let name = std::any::type_name::(); - trace!("