1cb90f4e65
Eventually, there will probably be a `crate` visibility specifier that does the same thing as `pub(crate)`. This commit replaces `pub` with `pub(crate)`, so when `crate` is available we can easily switch to it.
11 lines
196 B
Rust
11 lines
196 B
Rust
pub(crate) trait Ordinal {
|
|
/// Convert an index starting at 0 to an ordinal starting at 1
|
|
fn ordinal(self) -> Self;
|
|
}
|
|
|
|
impl Ordinal for usize {
|
|
fn ordinal(self) -> Self {
|
|
self + 1
|
|
}
|
|
}
|