diff options
Diffstat (limited to 'src/pipeline/publish.rs')
| -rw-r--r-- | src/pipeline/publish.rs | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/pipeline/publish.rs b/src/pipeline/publish.rs index 4e72d35..332e673 100644 --- a/src/pipeline/publish.rs +++ b/src/pipeline/publish.rs @@ -18,7 +18,21 @@ fn lock_repo() -> std::sync::MutexGuard<'static, ()> { } } +/// Publishing calls it; a test checks what landed in the index. +/// +/// Module-internal in a production build, `pub` only under `test-support`: +/// one body behind two visibility declarations, exactly one of which compiles. +#[cfg(feature = "test-support")] pub fn index_world(db: &Db) -> Result<Vec<WorldMember>> { + index_world_impl(db) +} + +#[cfg(not(feature = "test-support"))] +pub(crate) fn index_world(db: &Db) -> Result<Vec<WorldMember>> { + index_world_impl(db) +} + +fn index_world_impl(db: &Db) -> Result<Vec<WorldMember>> { let rels = db::all_published_releases(db)?; let mut out = Vec::new(); for r in rels { |
