Commit graph

46 commits

Author SHA1 Message Date
Simon Vandel Sillesen
781c9236e1 uniq: add more fast-paths to avoid work 2018-07-24 10:52:39 +02:00
Simon Vandel Sillesen
3288fa2cd2 uniq: avoid a upper-case map if we don't need to 2018-07-24 10:52:39 +02:00
Simon Vandel Sillesen
f233d8e5d7 uniq: avoid copying Strings all the time 2018-07-24 10:52:39 +02:00
Simon Vandel Sillesen
d624dbcfa0 uniq: do not allocate a new string in skip_fields
Instead, reuse the existing line and just view into that.
2018-07-24 10:48:52 +02:00
Simon Vandel Sillesen
caaea84097 uniq: refactor delimiters strings into enums 2018-07-11 23:16:42 +02:00
dependabot[bot]
2c796811ca
Bump getopts from 0.2.17 to 0.2.18
Bumps [getopts](https://github.com/rust-lang/getopts) from 0.2.17 to 0.2.18.
- [Release notes](https://github.com/rust-lang/getopts/releases)
- [Commits](https://github.com/rust-lang/getopts/compare/0.2.17...v0.2.18)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2018-07-06 07:17:46 +00:00
Alex Lyon
bd557c87fb uucore: make features opt-in rather than opt-out 2018-03-12 20:21:38 -07:00
Alex Lyon
880a4973c1 Format everything using rustfmt 2018-03-12 01:20:58 -07:00
Alex Lyon
75f11e9635
Handle SIGPIPE correctly and autogenerate main() for each util 2017-12-08 15:05:07 -08:00
Joshua Miller
e8073d2596 pin dependencies 2017-07-15 15:16:09 -05:00
Knight
f19d361013 uniq: add test for case-insensitive comparison 2016-08-13 02:04:19 +08:00
Chris Nikkel
cdfdc3a2bd uniq: add command line option -z for zero terminated input and output 2016-08-06 18:41:47 -07:00
Chirag B. Jadwani
d674a3bb63 uniq: minor refactoring in skip_fields 2016-02-29 11:16:58 +05:30
Chirag B. Jadwani
fc5b798ff1 uniq: fix skip & check characters logic 2016-02-29 11:10:38 +05:30
Michael Gehring
a2944e06db Fix clippy warnings 2016-01-06 09:36:20 +01:00
Joseph Crail
b90d253584 Refactor and simplify build for utilities.
For coreutils, there are two build artifacts:

  1. multicall executable (each utility is a separate static library)
  2. individual utilities (still separate library with main wrapper)

To avoid namespace collision, each utility crate is defined as
"uu_{CMD}". The end user only sees the original utility name. This
simplifies build.rs.

Also, the thin wrapper for the main() function is no longer contained in
the crate. It has been separated into a dedicated file. This was
necessary to work around Cargo's need for the crate name attribute to
match the name in the respective Cargo.toml.
2015-12-07 21:56:45 -05:00
Michael Gehring
ca16e66a55 switch to cargo version numbers 2015-11-25 10:58:49 +01:00
Joseph Crail
ca1074201f Split utility files into separate library.
Everything in src/common has been moved to src/uucore. This is defined
as a Cargo library, instead of directly included. This gives us
flexibility to make the library an external crate in the future.

Fixes #717.
2015-11-24 22:20:27 -05:00
Nathan Ross
502957dc3e use cargo idioms to manage dependency resolution and compilation 2015-11-23 02:04:15 -05:00
Carlos Liam
87d14978e9 Clean whitespace
Remove leading newlines and replace lines containing only whitespace
with empty lines
2015-10-06 12:04:46 -04:00
Michael Gehring
9d8abbcb06 Basic Cargo build
Builds the uutils multicall binary containing all utils (except stdbuf)
by default. To only build a subset
    `cargo --no-default-features --features <utils>`
can be used.

Whats missing is building the standalone binaries and a mechanism to
automatically disable the build of unix only utils on windows.
2015-08-28 21:12:30 +02:00
Karol Rozycki
b025b44806 -f flag for uniq 2015-07-31 19:37:40 +02:00
Joseph Crail
509a35ff7a Switch to external getopts cargo (part 2).
I switched over to the getopts crate on crates.io, instead of Rust's
private implementation. This will allow coreutils to build for Rust 1.0.

I'm splitting the updates into several commits for better reviewing.
2015-05-21 15:00:34 -04:00
kwantam
8cd81ec418 update uniq 2015-04-27 15:27:15 -04:00
Michael Gehring
9ae9a48387 feature io -> old_io, path -> old_path 2015-02-22 13:59:12 +01:00
Michael Gehring
e7b647171f os::set_exit_status(isize) -> env::set_exit_status(i32) 2015-02-22 13:59:12 +01:00
Michael Gehring
3eb5a814a3 Fix most unstable feature warnings 2015-02-03 23:54:37 +01:00
Michael Gehring
d89d9ca73b Various functions in std::str return Result instead of Option now 2015-02-03 22:32:30 +01:00
Michael Gehring
d187dc574b std::io -> std::old_io 2015-01-29 08:45:37 +01:00
Michael Gehring
fbdf04c072 Replace deprecated slice_{to,from} with slicing syntax 2015-01-24 10:46:28 +01:00
Michael Gehring
4d6cbfa393 Disable unstable warnings for now 2015-01-10 20:44:56 +01:00
Michael Gehring
782fad4667 int/uint -> isize/usize 2015-01-10 20:40:37 +01:00
Michael Gehring
f2d49f4bb6 Make uumain return isize everywhere 2015-01-10 14:07:39 +01:00
Michael Gehring
c223e28fac uniq, wc: fix build 2015-01-10 13:49:40 +01:00
Michael Gehring
b8a96da278 into_string -> to_string 2015-01-08 14:50:03 +01:00
Michael Gehring
fd69e7fa4a str::from_str removal/changes 2015-01-08 14:50:03 +01:00
Michael Gehring
1b381f49fa Use new macro feature flags/attributes 2015-01-08 14:50:02 +01:00
Florian Hahn
aff936da99 Update for recent std::ascii changes 2014-12-30 20:11:06 +01:00
Haitao Li
75425f1fe8 Fix build with rust nightly Dec-20-2014 2014-12-22 12:27:03 +11:00
Michael Gehring
cb4b5bce29 Remove now invalid format specifiers 2014-11-22 07:30:18 +01:00
Michael Gehring
09f223fdb1 Update for new coercion rules 2014-11-19 21:58:16 +01:00
skv
737db500a3 update from string for new api 2014-11-17 17:56:00 +03:00
Michael Gehring
5051a231dc uniq: fix build 2014-10-21 13:39:36 +02:00
Michael Gehring
ff8275a3cc uniq: crate_id -> crate_name 2014-10-11 18:02:51 +02:00
Michael Gehring
1c8e9161cc Add explicit lifetimes 2014-08-31 20:01:41 +02:00
Arcterus
b7f4bd01bc Move all of the utils into src 2014-07-20 20:20:55 -07:00