瀏覽代碼

Remove unneeded visibility specifiers in parser

Isaac Woods 6 年之前
父節點
當前提交
bb39747bf7
共有 1 個文件被更改,包括 4 次插入4 次删除
  1. 4 4
      aml_parser/src/parser.rs

+ 4 - 4
aml_parser/src/parser.rs

@@ -1,8 +1,8 @@
 use crate::AmlError;
 
-pub(crate) type ParseResult<'a, R> = Result<(&'a [u8], R), (&'a [u8], AmlError)>;
+pub type ParseResult<'a, R> = Result<(&'a [u8], R), (&'a [u8], AmlError)>;
 
-pub(crate) trait Parser<'a, R> {
+pub trait Parser<'a, R>: Sized {
     fn parse(&self, input: &'a [u8]) -> ParseResult<'a, R>;
 }
 
@@ -15,7 +15,7 @@ where
     }
 }
 
-pub(crate) fn pair<'a, P1, P2, R1, R2>(a: P1, b: P2) -> impl Parser<'a, (R1, R2)>
+pub fn pair<'a, P1, P2, R1, R2>(a: P1, b: P2) -> impl Parser<'a, (R1, R2)>
 where
     P1: Parser<'a, R1>,
     P2: Parser<'a, R2>,
@@ -27,7 +27,7 @@ where
     }
 }
 
-pub(crate) fn map<'a, P, F, A, B>(parser: P, map_fn: F) -> impl Parser<'a, B>
+pub fn map<'a, P, F, A, B>(parser: P, map_fn: F) -> impl Parser<'a, B>
 where
     P: Parser<'a, A>,
     F: Fn(A) -> B,