mirror of
https://github.com/rust-lang/rust.git
synced 2025-05-01 12:37:37 +00:00
12 lines
199 B
Rust
12 lines
199 B
Rust
pub struct Defaulted<const N: usize=3>;
|
|
impl Defaulted {
|
|
pub fn new() -> Self {
|
|
Defaulted
|
|
}
|
|
}
|
|
impl<const N: usize> Defaulted<N> {
|
|
pub fn value(&self) -> usize {
|
|
N
|
|
}
|
|
}
|