]> git.lizzy.rs Git - rust.git/commitdiff
Don't export private things
authorOli Scherer <git-spam-no-reply9815368754983@oli-obk.de>
Fri, 27 May 2022 11:35:26 +0000 (11:35 +0000)
committerOli Scherer <git-spam-no-reply9815368754983@oli-obk.de>
Fri, 27 May 2022 11:36:18 +0000 (11:36 +0000)
ui_test/src/comments.rs
ui_test/src/lib.rs

index e83e84b22a14507f95e6e65fbf5d3809195867f4..e6e45de4160e0addab33499880dae184864ad20a 100644 (file)
@@ -9,7 +9,7 @@
 /// configuration values. This struct parses them all in one go and then they
 /// get processed by their respective use sites.
 #[derive(Default, Debug)]
-pub struct Comments {
+pub(crate) struct Comments {
     /// List of revision names to execute. Can only be speicified once
     pub revisions: Option<Vec<String>>,
     /// Don't run this test if any of these filters apply
@@ -30,21 +30,21 @@ pub struct Comments {
 }
 
 #[derive(Debug)]
-pub struct ErrorMatch {
+pub(crate) struct ErrorMatch {
     pub matched: String,
     pub revision: Option<String>,
     pub definition_line: usize,
 }
 
 impl Comments {
-    pub fn parse_file(path: &Path) -> Self {
+    pub(crate) fn parse_file(path: &Path) -> Self {
         let content = std::fs::read_to_string(path).unwrap();
         Self::parse(path, &content)
     }
 
     /// Parse comments in `content`.
     /// `path` is only used to emit diagnostics if parsing fails.
-    pub fn parse(path: &Path, content: &str) -> Self {
+    pub(crate) fn parse(path: &Path, content: &str) -> Self {
         let mut this = Self::default();
         let error_pattern_regex =
             Regex::new(r"//(\[(?P<revision>[^\]]+)\])?~[|^]*\s*(ERROR|HELP|WARN)?:?(?P<text>.*)")
index 4a3014713b2ae8baf1e0b6ec1b631f0cbe789faa..dd5a1d062434f2c01630b84e571eeed01054e4e6 100644 (file)
@@ -9,7 +9,7 @@
 use crossbeam::queue::SegQueue;
 use regex::Regex;
 
-pub use crate::comments::Comments;
+use crate::comments::Comments;
 
 mod comments;
 #[cfg(test)]