Skip to content

Commit

Permalink
[Misc] Removing unnecessary public modifiers (#470)
Browse files Browse the repository at this point in the history
* changing visibility modifiers for common structured reporter

* changing visibility modifiers for structured reporter trait, and junit reporter
  • Loading branch information
joshfried-aws committed Feb 20, 2024
1 parent 61215ac commit 43486ec
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
10 changes: 5 additions & 5 deletions guard/src/commands/reporters/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -85,11 +85,11 @@ impl<'report> JunitReport<'report> {
}
}

pub struct JunitReporter<'reporter> {
pub(crate) rules: Vec<(RulesFile<'reporter>, &'reporter str)>,
pub(crate) data: Vec<DataFile>,
pub writer: &'reporter mut crate::utils::writer::Writer,
pub exit_code: i32,
struct JunitReporter<'reporter> {
rules: Vec<(RulesFile<'reporter>, &'reporter str)>,
data: Vec<DataFile>,
writer: &'reporter mut crate::utils::writer::Writer,
exit_code: i32,
}

impl<'reporter> JunitReporter<'reporter> {
Expand Down
14 changes: 7 additions & 7 deletions guard/src/commands/reporters/validate/structured.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ use crate::rules::Status;
use crate::utils::writer::Writer;
use colored::Colorize;

pub trait StructuredReporter {
pub(crate) trait StructuredReporter {
fn report(&mut self) -> rules::Result<i32>;
}

Expand Down Expand Up @@ -85,12 +85,12 @@ impl<'eval> StructuredEvaluator<'eval> {
}
}

pub struct CommonStructuredReporter<'reporter> {
pub(crate) rules: Vec<(RulesFile<'reporter>, &'reporter str)>,
pub(crate) data: Vec<DataFile>,
pub writer: &'reporter mut crate::utils::writer::Writer,
pub exit_code: i32,
pub output: OutputFormatType,
struct CommonStructuredReporter<'reporter> {
rules: Vec<(RulesFile<'reporter>, &'reporter str)>,
data: Vec<DataFile>,
writer: &'reporter mut crate::utils::writer::Writer,
exit_code: i32,
output: OutputFormatType,
}

impl<'reporter> StructuredReporter for CommonStructuredReporter<'reporter> {
Expand Down

0 comments on commit 43486ec

Please sign in to comment.