chiark / gitweb /
shapelib: Rename lib-loading functions to be less confusing
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Tue, 11 May 2021 23:02:27 +0000 (00:02 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Tue, 11 May 2021 23:02:27 +0000 (00:02 +0100)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
daemon/main.rs
src/bin/otterlib.rs
src/shapelib.rs

index ad72d8c64f8357a23bfeba516ee2d6cee6ed8889..1ea4df43b1f5bef1617c700284449f803ebfaac8 100644 (file)
@@ -347,7 +347,7 @@ fn main() {
   }
 
   nwtemplates::init()?;
-  shapelib::load(&config().shapelibs)?;
+  shapelib::load_global_libs(&config().shapelibs)?;
 
   c.lock_save_area()?;
   load_accounts()?;
index 062ef6193d253f7c3a3c6f707d7d40f61b84e886..7778501f265a48fa182db19c30feca20b42349ab 100644 (file)
@@ -229,7 +229,7 @@ fn main() {
 
   for libs in opts.libs.split(SPLIT) {
     let tlibs = Config1::PathGlob(libs.to_owned());
-    load(&vec![tlibs.clone()])?;
+    load_global_libs(&vec![tlibs.clone()])?;
   }
   let mut items: Vec<ItemForOutput> = default();
   for lib in libs_list() {
index 56c5d6aa6dca201525739e614d0b212e5d40f59e..71a2e4b7dba390671b3bbeb9bf043b8f23935490 100644 (file)
@@ -766,7 +766,7 @@ pub struct Explicit1 {
 }
 
 #[throws(LibraryLoadError)]
-pub fn load1(l: &Explicit1) {
+pub fn load_1_library(l: &Explicit1) {
   let toml_path = &l.catalogue;
   let catalogue_data = {
     let ioe = |io| LLE::FileError(toml_path.to_string(), io);
@@ -839,12 +839,12 @@ impl Config1 {
 }
 
 #[throws(LibraryLoadError)]
-pub fn load(libs: &Vec<Config1>) {
+pub fn load_global_libs(libs: &Vec<Config1>) {
   for l in libs {
     let libs = l.resolve()?;
     let n = libs.len();
     for e in libs {
-      load1(&e)?;
+      load_1_library(&e)?;
     }
     info!("loaded {} shape libraries from {:?}", n, &l);