feat(client): Implement TryFrom for Destination (#1810)

Add TryFrom<Uri> impl for Destination, for compiler version >= 1.34.

Closes #1808
This commit is contained in:
Andy Moran
2019-05-08 20:39:47 -05:00
committed by Sean McArthur
parent b342c38f08
commit d1183a8027
2 changed files with 32 additions and 2 deletions

View File

@@ -3,7 +3,11 @@ extern crate rustc_version;
use rustc_version::{version, Version};
fn main() {
if version().unwrap() >= Version::parse("1.30.0").unwrap() {
let version = version().unwrap();
if version >= Version::parse("1.30.0").unwrap() {
println!("cargo:rustc-cfg=error_source");
}
if version >= Version::parse("1.34.0").unwrap() {
println!("cargo:rustc-cfg=try_from");
}
}