Skip to content
This repository has been archived by the owner on Jun 20, 2024. It is now read-only.

Commit

Permalink
fix: make parsing functions private
Browse files Browse the repository at this point in the history
  • Loading branch information
atanmarko committed Jun 6, 2024
1 parent 18b4350 commit 4456338
Showing 1 changed file with 6 additions and 16 deletions.
22 changes: 6 additions & 16 deletions common/src/parsing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,9 @@ where
/// Parse an exclusive range from a string.
///
/// A valid range is of the form `lhs..rhs`, where `lhs` and `rhs` are numbers.
///
/// # Example
///
/// ```rust
/// # use common::parsing::parse_range_exclusive;
/// assert_eq!(parse_range_exclusive::<usize>("0..10"), Ok(0..10));
/// ```
pub fn parse_range_exclusive<NumberT>(s: &str) -> Result<Range<NumberT>, RangeParseError<NumberT>>
pub(crate) fn parse_range_exclusive<NumberT>(
s: &str,
) -> Result<Range<NumberT>, RangeParseError<NumberT>>
where
NumberT: Display + FromStr + From<u8> + Add<Output = NumberT>,
NumberT::Err: Display,
Expand All @@ -42,14 +37,9 @@ where
/// Parse an inclusive range from a string.
///
/// A valid range is of the form `lhs..=rhs`, where `lhs` and `rhs` are numbers.
///
/// # Example
///
/// ```rust
/// # use common::parsing::parse_range_inclusive;
/// assert_eq!(parse_range_inclusive::<usize>("0..=10"), Ok(0..11));
/// ```
pub fn parse_range_inclusive<NumberT>(s: &str) -> Result<Range<NumberT>, RangeParseError<NumberT>>
pub(crate) fn parse_range_inclusive<NumberT>(
s: &str,
) -> Result<Range<NumberT>, RangeParseError<NumberT>>
where
NumberT: Display + FromStr + From<u8> + Add<Output = NumberT>,
NumberT::Err: Display,
Expand Down

0 comments on commit 4456338

Please sign in to comment.