mirror of
https://github.com/danbulant/nushell
synced 2026-05-22 05:49:17 +00:00
Remove use of specialization
This commit is contained in:
parent
225ef8e75d
commit
35d576f540
2 changed files with 0 additions and 11 deletions
|
|
@ -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 a new issue