0.0.1-alpha.3.fix.1

This commit is contained in:
2026-09-27 23:00:24 +02:00
parent 6b6bdcfc71
commit fd3d363bff
17 changed files with 625 additions and 30 deletions

View File

@@ -1,5 +1,5 @@
// file: crates/knowledge-domain-lib/src/source.rs
// version: 1
// version: 2
//! Source identities independent of repository and forge providers.
@@ -30,7 +30,7 @@ impl crate::SourceId {
if value.trim().is_empty() {
return Err(crate::SourceIdError::Empty);
}
return Ok(crate::SourceId(value.to_owned()));
return Ok(Self(value.to_owned()));
}
/// Return the identifier as text.

View File

@@ -1,5 +1,5 @@
// file: crates/knowledge-domain-lib/src/unit_tests.rs
// version: 1
// version: 2
#[test]
fn source_id_rejects_empty_values() {
@@ -7,6 +7,13 @@ fn source_id_rejects_empty_values() {
return;
}
#[test]
fn source_id_constructs_and_exposes_valid_values() {
let source_id = crate::SourceId::new("pgr");
assert_eq!(source_id.as_ref().map(crate::SourceId::as_str), Ok("pgr"));
return;
}
#[test]
fn content_sources_are_not_limited_to_three_repositories() {
let sources = [