Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
MaybeConstSize (2)
  • Loading branch information
phimuemue authored and ronnodas committed Jan 9, 2025
commit 582647022ac05c1ae43f1bca2cd6391469f0c5da
3 changes: 2 additions & 1 deletion src/combinations.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,11 @@ pub struct CombinationsGeneric<I: Iterator, Idx> {
first: bool,
}

pub trait MaybeConstUsize {
pub trait MaybeConstUsize : Clone + Copy + std::fmt::Debug {
/*TODO const*/fn value(self) -> usize;
}

#[derive(Clone, Copy, Debug)]
pub struct ConstUsize<const N: usize>;
impl<const N: usize> MaybeConstUsize for ConstUsize<N> {
fn value(self) -> usize {
Expand Down