Fix DocOpt deserialization type bounds

This is wrt https://github.com/docopt/docopt.rs/pull/222

DocOpt does not support deserializing borrowed types.

This change was reverted in
7292a374e6
because it broke crates like Cargo etc.
This commit is contained in:
Yong Wen Chua 2018-02-14 09:58:20 +08:00
parent 5891aecf37
commit 7e92513deb

View File

@ -40,7 +40,7 @@ extern crate core_foundation;
use std::fmt;
use serde::Deserialize;
use serde::de::DeserializeOwned;
use serde::ser;
use docopt::Docopt;
use failure::Error;
@ -103,7 +103,7 @@ impl fmt::Display for VersionInfo {
}
}
pub fn call_main_without_stdin<'de, Flags: Deserialize<'de>>(
pub fn call_main_without_stdin<Flags: DeserializeOwned>(
exec: fn(Flags, &mut Config) -> CliResult,
config: &mut Config,
usage: &str,