10 releases

0.1.28 Oct 7, 2024
0.1.27 Sep 25, 2024
0.1.13 Jul 16, 2024
0.1.12 Jun 24, 2024
0.1.1 Nov 28, 2023

#2747 in Parser implementations

Download history 614/week @ 2024-08-22 1016/week @ 2024-08-29 1458/week @ 2024-09-05 732/week @ 2024-09-12 723/week @ 2024-09-19 1018/week @ 2024-09-26 564/week @ 2024-10-03 421/week @ 2024-10-10 533/week @ 2024-10-17 455/week @ 2024-10-24 374/week @ 2024-10-31 650/week @ 2024-11-07 2133/week @ 2024-11-14 407/week @ 2024-11-21 386/week @ 2024-11-28 351/week @ 2024-12-05

3,386 downloads per month
Used in 5 crates (via debian-analyzer)

Apache-2.0

630KB
3K SLoC

Rust parser for Debian DEP-3 patch headers

Examples

use dep3::PatchHeader;
use std::str::FromStr;
let text = r#"From: John Doe <john.doe@example>
Date: Mon, 1 Jan 2000 00:00:00 +0000
Subject: [PATCH] fix a bug
Bug-Debian: https://bugs.debian.org/123456
Bug: https://bugzilla.example.com/bug.cgi?id=123456
Forwarded: not-needed
"#;

let patch_header = PatchHeader::from_str(text).unwrap();
assert_eq!(patch_header.description(), Some("[PATCH] fix a bug".to_string()));
assert_eq!(patch_header.vendor_bugs("Debian").collect::<Vec<_>>(), vec!["https://bugs.debian.org/123456".to_string()]);

See https://dep-team.pages.debian.net/deps/dep3/ for details


lib.rs:

A library for parsing and generating Debian patch headers.

Examples

use dep3::PatchHeader;
use std::str::FromStr;
let text = r#"From: John Doe <john.doe@example>
Date: Mon, 1 Jan 2000 00:00:00 +0000
Subject: [PATCH] fix a bug
Bug-Debian: https://bugs.debian.org/123456
Bug: https://bugzilla.example.com/bug.cgi?id=123456
Forwarded: not-needed
"#;

let patch_header = PatchHeader::from_str(text).unwrap();
assert_eq!(patch_header.description(), Some("[PATCH] fix a bug".to_string()));
assert_eq!(patch_header.vendor_bugs("Debian").collect::<Vec<_>>(), vec!["https://bugs.debian.org/123456".to_string()]);

Dependencies

~6–8.5MB
~142K SLoC