Roy Ivy III
c969becbf8
refactor ~ remove unneeded mem::uninitialized() code
...
.# [why]
`mem::ununitialized()` is deprecated as of rust v1.39.0.
And this use is likely a premature optimization attempting to avoid
initializing the byte array to 0, which is usually a *very* fast operation.
* ref: <https://github.com/rust-lang/rust/blob/master/RELEASES.md >
* ref: <https://stackoverflow.com/questions/3654905/faster-way-to-zero-memory-than-with-memset >
2020-01-27 21:33:47 -06:00
bippityboppity
3511aa987a
Add the 'dyn' keyword where necessary
...
The keyword is needed for trait objects and is intended to improve
readability.
https://doc.rust-lang.org/edition-guide/rust-2018/trait-system/dyn-trait-for-trait-objects.html
2019-10-01 18:34:26 +02:00
Alex Lyon
c7d115b1ad
Convert all try!() to ?
2019-05-01 21:14:25 -07:00
Vinzent Steinberg
4034a322a2
Fix a few clippy warnings
2018-09-03 19:08:23 +02:00
Alex Lyon
880a4973c1
Format everything using rustfmt
2018-03-12 01:20:58 -07:00
Alex Lyon
7aea948473
Remove pipe_* macros
2017-12-10 20:57:39 -08:00
Alex Lyon
75f11e9635
Handle SIGPIPE correctly and autogenerate main() for each util
2017-12-08 15:05:07 -08:00
Nathan Ross
36503a77c7
impl: use coreopts for brevity and consistent UX
2016-08-20 10:07:24 -04:00
Nathan Ross
e827e80a9f
cksum: resolve msvc unsafe issue
...
Fixes #886
2016-05-23 22:06:37 -04:00
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
Joseph Crail
b4b08de42c
Switch to external getopts cargo (part 1).
...
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-20 22:47:30 -04:00
Camille TJHOA
d8f58305d6
new io cksum (includes BufReader fix)
...
closes kwantam/coreutils#1 via cherry-pick
2015-05-07 18:13:40 -04:00
Michael Gehring
26568d2021
Update to the new integer suffixes
2015-02-22 13:59:57 +01: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
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
Arcterus
a12fd89cb2
chmod, chroot, comm: fix build
2015-01-09 16:51:51 -08:00
Michael Gehring
7d8053561e
Use new array syntax
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
Michael Gehring
09f223fdb1
Update for new coercion rules
2014-11-19 21:58:16 +01:00
Michael Gehring
3244416b19
fail! -> panic!
2014-10-30 10:06:47 +01:00
Arcterus
b7f4bd01bc
Move all of the utils into src
2014-07-20 20:20:55 -07:00