@@ -3,7 +3,7 @@ use crate::borrowed::{
3
3
util:: { parse_header_field, parse_hex_sha1, parse_signature, NL } ,
4
4
Signature ,
5
5
} ;
6
- use bstr :: { BStr , ByteSlice } ;
6
+ use crate :: { ByteSlice , Bytes } ;
7
7
use nom:: {
8
8
branch:: alt,
9
9
bytes:: complete:: { tag, take_until, take_while1} ,
@@ -18,13 +18,13 @@ use nom::{
18
18
#[ derive( PartialEq , Eq , Debug , Hash , Ord , PartialOrd , Clone ) ]
19
19
pub struct Tag < ' data > {
20
20
// Target SHA1 in hex, always 40 lower case characters from 0-9 and a-f
21
- pub target : & ' data BStr ,
21
+ pub target : & ' data Bytes ,
22
22
// The name of the tag, e.g. "v1.0"
23
- pub name : & ' data BStr ,
23
+ pub name : & ' data Bytes ,
24
24
pub target_kind : crate :: Kind ,
25
- pub message : & ' data BStr ,
25
+ pub message : & ' data Bytes ,
26
26
pub signature : Signature < ' data > ,
27
- pub pgp_signature : Option < & ' data BStr > ,
27
+ pub pgp_signature : Option < & ' data Bytes > ,
28
28
}
29
29
30
30
fn parse ( i : & [ u8 ] ) -> IResult < & [ u8 ] , Tag , Error > {
@@ -54,7 +54,7 @@ fn parse(i: &[u8]) -> IResult<&[u8], Tag, Error> {
54
54
) )
55
55
}
56
56
57
- fn parse_message ( i : & [ u8 ] ) -> IResult < & [ u8 ] , ( & BStr , Option < & BStr > ) , Error > {
57
+ fn parse_message ( i : & [ u8 ] ) -> IResult < & [ u8 ] , ( & Bytes , Option < & Bytes > ) , Error > {
58
58
const PGP_SIGNATURE_BEGIN : & [ u8 ] = b"\n -----BEGIN PGP SIGNATURE-----" ;
59
59
const PGP_SIGNATURE_END : & [ u8 ] = b"-----END PGP SIGNATURE-----" ;
60
60
0 commit comments