From 0822de549c1b7b95bb1c28aaa2f4f4563592b72d Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Wed, 12 May 2021 00:02:27 +0100 Subject: [PATCH] shapelib: Rename lib-loading functions to be less confusing Signed-off-by: Ian Jackson --- daemon/main.rs | 2 +- src/bin/otterlib.rs | 2 +- src/shapelib.rs | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/daemon/main.rs b/daemon/main.rs index ad72d8c6..1ea4df43 100644 --- a/daemon/main.rs +++ b/daemon/main.rs @@ -347,7 +347,7 @@ fn main() { } nwtemplates::init()?; - shapelib::load(&config().shapelibs)?; + shapelib::load_global_libs(&config().shapelibs)?; c.lock_save_area()?; load_accounts()?; diff --git a/src/bin/otterlib.rs b/src/bin/otterlib.rs index 062ef619..7778501f 100644 --- a/src/bin/otterlib.rs +++ b/src/bin/otterlib.rs @@ -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 = default(); for lib in libs_list() { diff --git a/src/shapelib.rs b/src/shapelib.rs index 56c5d6aa..71a2e4b7 100644 --- a/src/shapelib.rs +++ b/src/shapelib.rs @@ -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) { +pub fn load_global_libs(libs: &Vec) { 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); -- 2.30.2