From 83d3e90248e9995e6c37c314b10597bccd394341 Mon Sep 17 00:00:00 2001 From: Daniel Mueller Date: Sat, 4 Apr 2020 10:38:24 -0700 Subject: Remove dependency on crate::Error from arg_defs This change removes the need to import crate::Error from the arg_defs module. By dropping this dependency we make the file more independent of the rest of the crate, which subsequently will allow us to merely include! it in another file in order to get the argument related type definitions without compilation errors due to missing symbols from the rest of the crate. --- src/error.rs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/error.rs') diff --git a/src/error.rs b/src/error.rs index 3e458a6..e891da2 100644 --- a/src/error.rs +++ b/src/error.rs @@ -64,6 +64,12 @@ impl From<&str> for Error { } } +impl From for Error { + fn from(s: String) -> Error { + Error::Error(s) + } +} + impl From for Error { fn from(e: clap::Error) -> Error { Error::ClapError(e) -- cgit v1.2.1