From 7dc872256a9e6e6fcf4e3b8d0b3441befe6d6ba0 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Mon, 3 May 2021 23:53:14 +0100 Subject: [PATCH] bundles: Rename NotBundle from NotBundleError Signed-off-by: Ian Jackson --- src/bundles.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/bundles.rs b/src/bundles.rs index 4a1d3b33..2abd5eda 100644 --- a/src/bundles.rs +++ b/src/bundles.rs @@ -133,16 +133,16 @@ impl Id { #[derive(Debug,Copy,Clone,Error)] #[error("{0}")] #[repr(transparent)] -pub struct NotBundleError(&'static str); -impl From<&'static str> for NotBundleError { - fn from(s: &'static str) -> NotBundleError { +pub struct NotBundle(&'static str); +impl From<&'static str> for NotBundle { + fn from(s: &'static str) -> NotBundle { unsafe { mem::transmute(s) } } } #[derive(Error,Debug)] enum IncorporateError { - #[error("NotBundle({0})")] NotBundle(#[from] NotBundleError), + #[error("NotBundle({0})")] NotBundle(#[from] NotBundle), #[error("{0}")] IE(#[from] IE), } @@ -194,8 +194,8 @@ fn load_bundle(ib: &mut InstanceBundles, ig: &mut Instance, } impl FromStr for Id { - type Err = NotBundleError; - #[throws(NotBundleError)] + type Err = NotBundle; + #[throws(NotBundle)] fn from_str(fleaf: &str) -> Id { let [lhs, rhs] = fleaf.splitn(2, '.') .collect::>() -- 2.30.2