Skip to content

Commit

Permalink
remove dead code
Browse files Browse the repository at this point in the history
  • Loading branch information
remi-dupre committed Feb 23, 2025
1 parent d8ef805 commit 6391dc7
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 35 deletions.
19 changes: 0 additions & 19 deletions opening-hours-syntax/src/rubik.rs
Original file line number Diff line number Diff line change
Expand Up @@ -159,25 +159,6 @@ impl<T: Clone + Ord, U: Paving> Default for Dim<T, U> {
}
}

impl<T: Clone + Ord + std::fmt::Debug, U: Paving + std::fmt::Debug> std::fmt::Debug for Dim<T, U> {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
if self.cols.is_empty() {
f.debug_tuple("Dim::Empty").field(&self.cols).finish()?;
}

let mut fmt = f.debug_struct("Dim");

for ((start, end), value) in (self.cuts.iter())
.zip(self.cuts.iter().skip(1))
.zip(&self.cols)
{
fmt.field(&format!("[{start:?}, {end:?}["), value);
}

fmt.finish()
}
}

impl<T: Clone + Ord, U: Paving> Dim<T, U> {
fn cut_at(&mut self, val: T) {
let Err(insert_pos) = self.cuts.binary_search(&val) else {
Expand Down
16 changes: 0 additions & 16 deletions opening-hours/src/utils/range.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,22 +24,6 @@ impl<D> DateTimeRange<D> {
) -> Self {
Self { range, kind, comments }
}

pub fn map_dates<D2>(self, mut map: impl FnMut(D) -> D2) -> DateTimeRange<D2> {
DateTimeRange {
range: map(self.range.start)..map(self.range.end),
kind: self.kind,
comments: self.comments,
}
}

pub fn comments(&self) -> &[Arc<str>] {
&self.comments
}

pub fn into_comments(self) -> UniqueSortedVec<Arc<str>> {
self.comments
}
}

// WrappingRange
Expand Down

0 comments on commit 6391dc7

Please sign in to comment.