Skip to content

Commit

Permalink
feat: make Add:get_stats public
Browse files Browse the repository at this point in the history
This method is likely at least as useful as the existing public
methods get_json_stats and get_stats_parsed (which should probably be
non-public).

Signed-off-by: Jonas Irgens Kylling <[email protected]>
  • Loading branch information
jkylling authored and ion-elgreco committed Feb 14, 2025
1 parent 5153f74 commit d563e10
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crates/core/src/protocol/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ impl Eq for Add {}

impl Add {
/// Get whatever stats are available. Uses (parquet struct) parsed_stats if present falling back to json stats.
pub(crate) fn get_stats(&self) -> Result<Option<Stats>, serde_json::error::Error> {
pub fn get_stats(&self) -> Result<Option<Stats>, serde_json::error::Error> {
match self.get_stats_parsed() {
Ok(Some(stats)) => Ok(Some(stats)),
Ok(None) => self.get_json_stats(),
Expand Down

0 comments on commit d563e10

Please sign in to comment.