chiark / gitweb /
Revert "libraries: LibraryItemNotPrepared: Make this a separate error"
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 15 May 2021 10:54:26 +0000 (11:54 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 15 May 2021 10:59:06 +0000 (11:59 +0100)
We're going to always prepare things on loading, so we don't need this.

This reverts commit f580502d464611e7c0a5c3085f5a9be71979bfdf.

src/shapelib.rs
src/spec.rs

index 9d240b37f1f471847fab65938eaaac1416b42ba7..9834e8750abd0736dbb1f046d7b87615c91297a4 100644 (file)
@@ -412,7 +412,7 @@ impl Contents {
         warn!("library item lib={} itme={} for={:?} data file {:?} not found",
               &self.libname, item_name, item_for, &svg_path);
         let spec_for = ItemSpec::from_strs(lib_name_for, item_for);
-        SpE::LibraryItemNotPrepared(spec_for)
+        SpE::LibraryItemNotFound(spec_for)
       } else {
         let m = "error accessing/reading library item data file";
         error!("{}: {} {:?}: {}", &m, &svg_path, item_for, &e);
@@ -517,7 +517,6 @@ impl Contents {
                    &Instance::dummy(), SpecDepth::zero())
       {
         Err(SpecError::LibraryItemNotFound(_)) => continue,
-        Err(SpecError::LibraryItemNotPrepared(_)) => continue,
         e@ Err(_) => e?,
         Ok(r) => r,
       };
index 017b9b22b5a05be8c0311599d9c3a65d5e8ca5e7..9eb59dcba28cfa6c670efc31099f500e7e608a6c 100644 (file)
@@ -67,7 +67,6 @@ pub enum SpecError {
   PosOffTable,
   LibraryNotFound,
   LibraryItemNotFound(ItemSpec),
-  LibraryItemNotPrepared(ItemSpec),
   AclInvalidAccountGlob,
   AclEntryOverlappingAllowDeny,
   InconsistentPieceCount,