Skip to content

Latest Rust requires std::cmp imports #2

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 4, 2015
Merged
Changes from all commits
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
5 changes: 5 additions & 0 deletions lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ This version of natural ordering is inspired by

#![feature(macro_rules)]

use std::cmp::Ordering;
use std::cmp::Ordering::{Less, Equal, Greater};

/// Compares two iterators of "characters" possibly containing "digits".
/// The natural ordering can be customized with the following parameters:
///
Expand Down Expand Up @@ -147,6 +150,8 @@ pub fn compare_ignore_case(left: &str, right: &str) -> Ordering {
#[cfg(test)]
mod tests {
use super::compare;
use std::cmp::Ordering;
use std::cmp::Ordering::{Less, Equal, Greater};

fn check_total_order(strs: &[&str]) {
fn ordering_to_op(ord: Ordering) -> &'static str {
Expand Down