Roy Ivy III
662db61336
refactor/polish ~ fix cargo clippy
complaints (fatal/unneeded drop)
2020-01-27 21:33:48 -06:00
Roy Ivy III
181c9d6cae
refactor/polish ~ fix cargo clippy
complaints (fatal/unneeded clone)
2020-01-27 21:33:48 -06:00
Roy Ivy III
6043ac1cbd
refactor/polish ~ fix cargo clippy
complaints (fatal/temporary_cstring_as_ptr)
2020-01-27 21:33:48 -06:00
Roy Ivy III
1f5749e304
refactor/polish ~ fix cargo clippy
complaints (fatal/same if clause)
2020-01-27 21:33:48 -06:00
Roy Ivy III
1f137c245f
refactor/polish ~ fix cargo clippy
complaints (fatal/cast_ptr_alignment)
2020-01-27 21:33:47 -06:00
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
Roy Ivy III
b3846bf8f1
tests/fix ~ (stat) remove '%a', '%d', '%f' from file system test format due to race conditions
2020-01-27 21:33:47 -06:00
Roy Ivy III
823fc17c2c
tests/fix ~ (stat) refactor '%w' and '%W' tests due to stat
limitations
...
- allow actual outputs to differ from expected (ie, `stat`) if `stat` is reporting "unknown" creation time
.# [why]
For many *nix flavors, `stat` is unable to detect birth/creation date
for directories/files. The information is available via the `statx()`
system call (for linux kernels >= v4.11), and rust supplies that
information via fs::MetadataExt for v1.40+. So, for rust v1.40+, there
will likely be a mismatch between the output of the system `stat` and
this ('uutils') `stat`.
* ref: <https://askubuntu.com/questions/470134/how-do-i-find-the-creation-time-of-a-file > @@ <https://archive.is/IsEAJ >
2020-01-27 21:33:47 -06:00
Roy Ivy III
14c3f3aa17
tests ~ fix WSL testing
...
+ ToDO added ~ when possible, test under WSL2 and differentiate/liberalize if possible
2020-01-27 21:33:47 -06:00
Roy Ivy III
244bdf3d4f
who: fix ~ remove unneeded/incorrect time format size change
2020-01-27 21:33:47 -06:00
Roy Ivy III
9416709c9c
stat: fix birth/created time transformation
2020-01-27 21:33:47 -06:00
Roy Ivy III
25d4fb71ca
tests/refactor ~ change to use of common code (TestScenario::...
) for testing
2020-01-27 21:33:47 -06:00
Roy Ivy III
d0f6f3d07e
tests/refactor ~ change output test macros to 'actual = expected' format
...
- rust usually uses `assert_eq!(ACTUAL, EXPECTED)`
- ref: https://users.rust-lang.org/t/assert-eq-expected-and-actual/20304/3 @@ https://archive.is/xPp9R
2020-01-27 21:33:47 -06:00
Roy Ivy III
2f23a2e2cb
maint/cicd ~ allow rust 'beta' failures (Travis CI)
2020-01-27 21:33:47 -06:00
Roy Ivy III
45a04ce5fc
refactor ~ replace deprecated trim_{left,right}...
with trim_{start,end}...
...
- `trim_{start,end}{,_matches}` stabilized in rust v1.30.0
- `trim_{start,end}{,_matches}` deprecated (with compiler warnings) in rust v1.33.0
+ requires MinSRV >= v1.30.0
* ref: https://github.com/rust-lang/rust/blob/master/RELEASES.md
2020-01-27 21:33:47 -06:00
Roy Ivy III
b4b0ee40d7
refactor/polish ~ convert to try!
to ?
syntax
...
- convert to newer `?` syntax, fixing compiler warnings
+ requires MinSRV >= v1.13.0
.# [why]
The `?` operator was stabilized in rust v1.13.0.
Warnings requesting conversion from the old `try!` macro to the `?` operator
were introduced in rust v1.39.0.
* ref: <https://github.com/rust-lang/rust/blob/master/RELEASES.md >
2020-01-27 21:33:47 -06:00
Roy Ivy III
c22cf215ba
refactor/polish ~ convert to inclusive range operator syntax (..=
)
...
- convert to newer `..=` syntax, fixing compiler warnings
+ requires MinSRV >= v1.26.0
.# [why]
The inclusive range operator (`..=`) was stabilized in rust v1.26.0.
Warnings requesting conversion from the old `...` operator to `..=` were
introduced in rust v1.37.0.
* ref: <https://github.com/rust-lang/rust/blob/master/RELEASES.md >
2020-01-27 21:33:47 -06:00
Roy Ivy III
74f26a2d83
maint/build ~ add cargo make
support
2020-01-27 21:33:47 -06:00
Roy Ivy III
95809ae98e
Add 'windows_legacy' feature to allow build for older windows versions
2020-01-27 21:33:47 -06:00
Roy Ivy III
55209c6490
cp: use CreateFileW
to increase legacy windows compatiblity
2020-01-27 21:33:46 -06:00
Alex Lyon
2dad625dfa
Merge pull request #1402 from GabrielGanne/master
...
ls: fix --color flag
2020-01-27 15:20:43 -08:00
Alex Lyon
bf1cec8365
Merge pull request #1444 from sylvestre/master
...
uptime: match the gnu version output
2020-01-27 14:50:48 -08:00
Sylvestre Ledru
0420d0849f
uptime: match the gnu version output
2020-01-03 22:58:11 +01:00
cnd
91899b34b9
Merge pull request #1430 from bippityboppity/add-dyn
...
Add the 'dyn' keyword where necessary
2019-10-02 10:31:03 +04: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
cnd
787a11fea8
Merge pull request #1428 from AdminXVII/update-deps-redox
...
Update the dependencies for redox compilation
2019-09-30 17:01:59 +04:00
Xavier L'Heureux
63f3f78bda
Update the dependencies for redox compilation
2019-09-28 09:29:22 -04:00
cnd
17035666b8
Merge pull request #1409 from uutils/dependabot/cargo/smallvec-0.6.10
...
build: [security] bump smallvec from 0.6.9 to 0.6.10
2019-07-03 10:03:21 +04:00
dependabot-preview[bot]
03e0bef9c2
build: [security] bump smallvec from 0.6.9 to 0.6.10
...
Bumps [smallvec](https://github.com/servo/rust-smallvec ) from 0.6.9 to 0.6.10. **This update includes security fixes.**
- [Release notes](https://github.com/servo/rust-smallvec/releases )
- [Commits](https://github.com/servo/rust-smallvec/commits )
Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-07-02 22:39:48 +00:00
cnd
69543ee16d
Merge pull request #1403 from uutils/dependabot/cargo/aho-corasick-0.7.3
...
build: bump aho-corasick from 0.6.10 to 0.7.3
2019-07-02 11:35:59 +04:00
Gabriel Ganne
64009b090f
ls: implement --color=auto behavior
...
The automatic behavior is to turn on colors only of connected to a
terminal.
Introduce new external crate isatty to handle this.
Signed-off-by: Gabriel Ganne <gabriel.ganne@gmail.com>
2019-06-23 10:38:39 +02:00
Gabriel Ganne
edaf2d85cb
ls: implement --color flag
...
GNU coreutils ls command implements the --color option as follow:
--color[=WHEN]
colorize the output; WHEN can be 'always' (default if omitted),
'auto', or 'never'
With --color=auto, ls emits color codes only when standard output is connected
to a terminal.
Also, add support for the following aliases:
- ‘always’, ‘yes’, ‘force’
- ‘never’, ‘no’, ‘none’
- ‘auto’, ‘tty’, ‘if-tty’
Signed-off-by: Gabriel Ganne <gabriel.ganne@gmail.com>
2019-06-23 10:35:30 +02:00
dependabot-preview[bot]
427381fd87
build: bump aho-corasick from 0.6.10 to 0.7.3
...
Bumps [aho-corasick](https://github.com/BurntSushi/aho-corasick ) from 0.6.10 to 0.7.3.
- [Release notes](https://github.com/BurntSushi/aho-corasick/releases )
- [Commits](https://github.com/BurntSushi/aho-corasick/compare/0.6.10...0.7.3 )
Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-06-21 07:17:27 +00:00
Alex Lyon
33a112d64b
Merge pull request #1400 from uutils/dependabot/cargo/num_cpus-1.10.1
...
build: bump num_cpus from 1.10.0 to 1.10.1
2019-06-18 09:25:35 -07:00
Alex Lyon
5f7f6aff40
Merge pull request #1395 from uutils/dependabot/cargo/memchr-2.2.0
...
build: bump memchr from 1.0.2 to 2.2.0
2019-06-18 09:25:07 -07:00
dependabot-preview[bot]
4b5dbcf995
build: bump num_cpus from 1.10.0 to 1.10.1
...
Bumps [num_cpus](https://github.com/seanmonstar/num_cpus ) from 1.10.0 to 1.10.1.
- [Release notes](https://github.com/seanmonstar/num_cpus/releases )
- [Changelog](https://github.com/seanmonstar/num_cpus/blob/master/CHANGELOG.md )
- [Commits](https://github.com/seanmonstar/num_cpus/compare/v1.10.0...v1.10.1 )
Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-06-18 13:21:47 +00:00
dependabot-preview[bot]
642a2a4ecb
build: bump memchr from 1.0.2 to 2.2.0
...
Bumps [memchr](https://github.com/BurntSushi/rust-memchr ) from 1.0.2 to 2.2.0.
- [Release notes](https://github.com/BurntSushi/rust-memchr/releases )
- [Commits](https://github.com/BurntSushi/rust-memchr/compare/1.0.2...2.2.0 )
Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-06-17 16:21:06 +00:00
Alex Lyon
8575512895
Merge pull request #1389 from uutils/dependabot/cargo/glob-0.3.0
...
build: bump glob from 0.2.11 to 0.3.0
2019-06-17 09:18:43 -07:00
Alex Lyon
4151323830
Merge pull request #1385 from uutils/dependabot/cargo/libc-0.2.58
...
build: bump libc from 0.2.56 to 0.2.58
2019-06-17 08:27:50 -07:00
dependabot-preview[bot]
50aab8541d
build: bump glob from 0.2.11 to 0.3.0
...
Bumps [glob](https://github.com/rust-lang/glob ) from 0.2.11 to 0.3.0.
- [Release notes](https://github.com/rust-lang/glob/releases )
- [Commits](https://github.com/rust-lang/glob/compare/0.2.11...0.3.0 )
Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-06-15 22:35:35 +00:00
Alex Lyon
bc783edde7
Merge pull request #1388 from uutils/dependabot/cargo/byteorder-1.3.2
...
build: bump byteorder from 1.3.1 to 1.3.2
2019-06-15 15:34:20 -07:00
Alex Lyon
f1a4d5d4f7
Merge pull request #1393 from uutils/dependabot/cargo/itertools-0.8.0
...
build: bump itertools from 0.7.11 to 0.8.0
2019-06-15 15:33:56 -07:00
Alex Lyon
16daa41f38
Merge pull request #1392 from uutils/dependabot/cargo/regex-syntax-0.6.7
...
build: bump regex-syntax from 0.6.6 to 0.6.7
2019-06-15 15:33:45 -07:00
Alex Lyon
2b2d0fa968
Merge pull request #1394 from uutils/dependabot/cargo/walkdir-2.2.8
...
build: bump walkdir from 2.2.7 to 2.2.8
2019-06-15 15:33:31 -07:00
dependabot-preview[bot]
7a24f5e517
build: bump walkdir from 2.2.7 to 2.2.8
...
Bumps [walkdir](https://github.com/BurntSushi/walkdir ) from 2.2.7 to 2.2.8.
- [Release notes](https://github.com/BurntSushi/walkdir/releases )
- [Commits](https://github.com/BurntSushi/walkdir/compare/2.2.7...2.2.8 )
Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-06-13 12:59:42 +00:00
dependabot-preview[bot]
e7c3d2e381
build: bump itertools from 0.7.11 to 0.8.0
...
Bumps [itertools](https://github.com/bluss/rust-itertools ) from 0.7.11 to 0.8.0.
- [Release notes](https://github.com/bluss/rust-itertools/releases )
- [Commits](https://github.com/bluss/rust-itertools/compare/0.7.11...0.8.0 )
Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-06-13 12:59:16 +00:00
dependabot-preview[bot]
a0ca860f93
build: bump regex-syntax from 0.6.6 to 0.6.7
...
Bumps [regex-syntax](https://github.com/rust-lang/regex ) from 0.6.6 to 0.6.7.
- [Release notes](https://github.com/rust-lang/regex/releases )
- [Changelog](https://github.com/rust-lang/regex/blob/master/CHANGELOG.md )
- [Commits](https://github.com/rust-lang/regex/compare/regex-syntax-0.6.6...regex-syntax-0.6.7 )
Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-06-13 12:59:04 +00:00
dependabot-preview[bot]
688e08127b
build: bump byteorder from 1.3.1 to 1.3.2
...
Bumps [byteorder](https://github.com/BurntSushi/byteorder ) from 1.3.1 to 1.3.2.
- [Release notes](https://github.com/BurntSushi/byteorder/releases )
- [Changelog](https://github.com/BurntSushi/byteorder/blob/master/CHANGELOG.md )
- [Commits](https://github.com/BurntSushi/byteorder/compare/1.3.1...1.3.2 )
Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-06-13 12:57:14 +00:00
dependabot-preview[bot]
fa73fe1c64
build: bump libc from 0.2.56 to 0.2.58
...
Bumps [libc](https://github.com/rust-lang/libc ) from 0.2.56 to 0.2.58.
- [Release notes](https://github.com/rust-lang/libc/releases )
- [Commits](https://github.com/rust-lang/libc/compare/0.2.56...0.2.58 )
2019-06-03 13:29:25 +00:00
cnd
917f0220a6
Merge pull request #1384 from uutils/dependabot/cargo/libc-0.2.56
...
build: bump libc from 0.2.54 to 0.2.56
2019-05-31 18:40:13 +04:00