// Import the Ordering enum from the std::cmp module
use std::cmp::Ordering;
// Define a function named 'compare' that takes two i32 parameters and returns an Ordering
fn compare(a: i32, b: i32) -> Ordering {
// If 'a' is less than 'b'
if a < b {
// Return Ordering::Less
Ordering::Less
// If 'a' is greater than 'b'
} else if a > b {
// Return Ordering::Greater
Ordering::Greater
// If 'a' is equal to 'b' (this is the else case)
} else {
// Return Ordering::Equal
Ordering::Equal
}
}
// Define the main function, the entry point of the program
fn main() {
// Call the compare function with arguments 2 and 3, and store the result
let result = compare(2, 3);
// Print the result using the debug formatting
println!("{:?}", result);
}