mirror of
https://github.com/rust-lang/cargo.git
synced 2025-09-28 11:20:36 +00:00
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:
parent
5891aecf37
commit
7e92513deb
@ -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,
|
||||
|
Loading…
x
Reference in New Issue
Block a user