Skip to content

Commit d0ca5bc

Browse files
committed
Auto merge of #5039 - lawliet89:docopt-bounds, r=alexcrichton
Fix DocOpt deserialization type bounds This is wrt docopt/docopt.rs#222 DocOpt does not support deserializing borrowed types. This change was reverted in docopt/docopt.rs@7292a37 because it broke crates like Cargo etc.
2 parents 5891aec + 7e92513 commit d0ca5bc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/cargo/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ extern crate core_foundation;
4040

4141
use std::fmt;
4242

43-
use serde::Deserialize;
43+
use serde::de::DeserializeOwned;
4444
use serde::ser;
4545
use docopt::Docopt;
4646
use failure::Error;
@@ -103,7 +103,7 @@ impl fmt::Display for VersionInfo {
103103
}
104104
}
105105

106-
pub fn call_main_without_stdin<'de, Flags: Deserialize<'de>>(
106+
pub fn call_main_without_stdin<Flags: DeserializeOwned>(
107107
exec: fn(Flags, &mut Config) -> CliResult,
108108
config: &mut Config,
109109
usage: &str,

0 commit comments

Comments
 (0)