mirror of
https://github.com/mbilker/kbinxml-rs.git
synced 2026-09-11 03:55:13 -05:00
value: try_from feature stabilized
This commit is contained in:
@@ -22,7 +22,6 @@ pretty_env_logger = { version = "0.3.0", optional = true }
|
||||
|
||||
[features]
|
||||
build_binary = ["clap", "pretty_env_logger"]
|
||||
try_from = []
|
||||
|
||||
[profile.release]
|
||||
lto = true
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
#![cfg_attr(test, feature(test))]
|
||||
#![cfg_attr(feature = "try_from", feature(try_from))]
|
||||
|
||||
#[macro_use] extern crate failure;
|
||||
#[macro_use] extern crate lazy_static;
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
#[cfg(feature = "try_from")]
|
||||
use std::convert::TryFrom;
|
||||
use std::fmt;
|
||||
use std::net::Ipv4Addr;
|
||||
@@ -403,7 +402,6 @@ macro_rules! construct_types {
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(feature = "try_from")]
|
||||
impl TryFrom<Value> for $($value_type)* {
|
||||
type Error = KbinError;
|
||||
|
||||
@@ -415,7 +413,6 @@ macro_rules! construct_types {
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(feature = "try_from")]
|
||||
impl TryFrom<&Value> for $($value_type)* {
|
||||
type Error = KbinError;
|
||||
|
||||
@@ -587,7 +584,6 @@ impl Value {
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(feature = "try_from")]
|
||||
impl TryFrom<Value> for Vec<Value> {
|
||||
type Error = KbinError;
|
||||
|
||||
@@ -599,7 +595,6 @@ impl TryFrom<Value> for Vec<Value> {
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(feature = "try_from")]
|
||||
impl TryFrom<Value> for Vec<u8> {
|
||||
type Error = KbinError;
|
||||
|
||||
@@ -619,7 +614,6 @@ impl TryFrom<Value> for Vec<u8> {
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(feature = "try_from")]
|
||||
impl TryFrom<&Value> for Vec<u8> {
|
||||
type Error = KbinError;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user