chiark / gitweb /
bundles: Rename NotBundle from NotBundleError
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Mon, 3 May 2021 22:53:14 +0000 (23:53 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Mon, 3 May 2021 23:45:39 +0000 (00:45 +0100)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
src/bundles.rs

index 4a1d3b33fa06289c0aca884bc83f641c3808c8ad..2abd5edaa3c8cd99c2ec9fa14f958f9813a7b160 100644 (file)
@@ -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::<ArrayVec<[&str;2]>>()