mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-08-01 13:37:48 +00:00
std::char::UnicodeChar removal
This commit is contained in:
parent
b8a96da278
commit
48f129ea49
2 changed files with 4 additions and 4 deletions
|
@ -12,7 +12,7 @@
|
||||||
|
|
||||||
extern crate getopts;
|
extern crate getopts;
|
||||||
|
|
||||||
use std::char::UnicodeChar;
|
use std::char::CharExt;
|
||||||
use std::io::{stdin};
|
use std::io::{stdin};
|
||||||
use std::io::{BufferedReader, BytesReader};
|
use std::io::{BufferedReader, BytesReader};
|
||||||
use std::io::fs::File;
|
use std::io::fs::File;
|
||||||
|
@ -144,7 +144,7 @@ fn obsolete(options: &[String]) -> (Vec<String>, Option<uint>) {
|
||||||
let len = current.len();
|
let len = current.len();
|
||||||
for pos in range(1, len) {
|
for pos in range(1, len) {
|
||||||
// Ensure that the argument is only made out of digits
|
// Ensure that the argument is only made out of digits
|
||||||
if !UnicodeChar::is_numeric(current[pos] as char) { break; }
|
if !(current[pos] as char).is_numeric() { break; }
|
||||||
|
|
||||||
// If this is the last number
|
// If this is the last number
|
||||||
if pos == len - 1 {
|
if pos == len - 1 {
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
|
|
||||||
extern crate getopts;
|
extern crate getopts;
|
||||||
|
|
||||||
use std::char::UnicodeChar;
|
use std::char::CharExt;
|
||||||
use std::io::{stdin, stdout};
|
use std::io::{stdin, stdout};
|
||||||
use std::io::{BufferedReader, BytesReader};
|
use std::io::{BufferedReader, BytesReader};
|
||||||
use std::io::fs::File;
|
use std::io::fs::File;
|
||||||
|
@ -217,7 +217,7 @@ fn obsolete(options: &[String]) -> (Vec<String>, Option<uint>) {
|
||||||
let len = current.len();
|
let len = current.len();
|
||||||
for pos in range(1, len) {
|
for pos in range(1, len) {
|
||||||
// Ensure that the argument is only made out of digits
|
// Ensure that the argument is only made out of digits
|
||||||
if !UnicodeChar::is_numeric(current[pos] as char) { break; }
|
if !(current[pos] as char).is_numeric() { break; }
|
||||||
|
|
||||||
// If this is the last number
|
// If this is the last number
|
||||||
if pos == len - 1 {
|
if pos == len - 1 {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue