From 49d9de17fed4eb93245ae651ea99c27c0b0f65dd Mon Sep 17 00:00:00 2001 From: Joseph Crail Date: Thu, 9 Jul 2015 18:30:03 -0400 Subject: [PATCH] Fix deprecation warnings for tr. I switched over to the bit-vec/bit-set cargos. --- deps/Cargo.toml | 2 ++ src/tr/deps.mk | 1 + src/tr/tr.rs | 6 ++++-- 3 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 src/tr/deps.mk diff --git a/deps/Cargo.toml b/deps/Cargo.toml index 4362ed8e2..c996afd06 100644 --- a/deps/Cargo.toml +++ b/deps/Cargo.toml @@ -8,6 +8,8 @@ name = "null" [dependencies] libc = "0.1.8" getopts = "0.2.11" +bit-vec = "0.3.0" +bit-set = "0.2.0" num_cpus = "*" rand = "0.3.8" regex = "0.1.38" diff --git a/src/tr/deps.mk b/src/tr/deps.mk new file mode 100644 index 000000000..556049c9b --- /dev/null +++ b/src/tr/deps.mk @@ -0,0 +1 @@ +DEPLIBS += bit-vec bit-set diff --git a/src/tr/tr.rs b/src/tr/tr.rs index 9c6dcba2b..557ae1058 100644 --- a/src/tr/tr.rs +++ b/src/tr/tr.rs @@ -1,5 +1,5 @@ #![crate_name = "tr"] -#![feature(io)] +#![feature(io, vecmap)] /* * This file is part of the uutils coreutils package. @@ -12,10 +12,12 @@ * file that was distributed with this source code. */ +extern crate bit_set; extern crate getopts; +use bit_set::BitSet; use getopts::Options; -use std::collections::{BitSet, VecMap}; +use std::collections::VecMap; use std::io::{stdin, stdout, BufReader, Read, Write}; use expand::ExpandSet;