Skip to content

Commit

Permalink
Implement Display for Index (#49)
Browse files Browse the repository at this point in the history
  • Loading branch information
soareschen authored Jan 5, 2025
1 parent 7476276 commit 42f6e77
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions crates/cgp-field/src/types/index.rs
Original file line number Diff line number Diff line change
@@ -1 +1,9 @@
use core::fmt::Display;

pub struct Index<const I: usize>;

impl<const I: usize> Display for Index<I> {
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
write!(f, "{I}")
}
}

0 comments on commit 42f6e77

Please sign in to comment.