forked from extern/nushell
Remove use of specialization
This commit is contained in:
parent
225ef8e75d
commit
35d576f540
@ -1,5 +1,4 @@
|
||||
#![feature(generators)]
|
||||
#![feature(specialization)]
|
||||
#![feature(proc_macro_hygiene)]
|
||||
|
||||
#[macro_use]
|
||||
|
@ -5,16 +5,6 @@ pub trait ExtractType: Sized {
|
||||
fn extract(value: &Tagged<Value>) -> Result<Self, ShellError>;
|
||||
}
|
||||
|
||||
impl<T> ExtractType for T {
|
||||
default fn extract(_value: &Tagged<Value>) -> Result<T, ShellError> {
|
||||
let name = std::any::type_name::<T>();
|
||||
Err(ShellError::unimplemented(format!(
|
||||
"<T> ExtractType for {}",
|
||||
name
|
||||
)))
|
||||
}
|
||||
}
|
||||
|
||||
impl<T: ExtractType> ExtractType for Tagged<T> {
|
||||
fn extract(value: &Tagged<Value>) -> Result<Tagged<T>, ShellError> {
|
||||
let name = std::any::type_name::<T>();
|
||||
|
Loading…
Reference in New Issue
Block a user