helper: little module for helper functions
This commit is contained in:
5
src/helper.rs
Normal file
5
src/helper.rs
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
use std::cmp::{max, min};
|
||||||
|
|
||||||
|
pub fn ordered<T: Ord + Copy>(x: T, y: T) -> (T, T) {
|
||||||
|
(min(x, y), max(x, y))
|
||||||
|
}
|
||||||
@@ -1,4 +1,5 @@
|
|||||||
mod card;
|
mod card;
|
||||||
|
mod helper;
|
||||||
mod modes;
|
mod modes;
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
|
|||||||
Reference in New Issue
Block a user