changelog: parse entries with a shared limit-based helper

Replace parse_previous_version/parse_previous_version_from_str with
parse_changelog_entries(path, limit: Option<usize>), parsing up to the
given number of entries (None: the whole file) newest-first through the
same strict entry parser instead of a header-only scan. The single-entry
helpers stay as thin wrappers, and callers needing the previous entry
now get its full source name and version, not just the raw string.
This commit is contained in:
2026-09-17 23:34:42 +02:00
parent e7b35f5c37
commit c18f1fe9c2
4 changed files with 192 additions and 67 deletions
+2 -2
View File
@@ -20,8 +20,8 @@ pub mod files;
pub mod version;
pub use changelog::{
ChangelogEntry, parse_changelog_entry, parse_changelog_entry_from_str,
parse_previous_version_from_str,
ChangelogEntry, parse_changelog_entries, parse_changelog_entries_from_str,
parse_changelog_entry, parse_changelog_entry_from_str,
};
pub use checksums::{ChecksumKind, Entry as ChecksumEntry, FileChecksums};
pub use control::{