Commit graph

1570 commits

Author SHA1 Message Date
nicoo
3a90e31307 factor::numeric::inv_mod_u64: Provide a more-helpful error message 2020-06-19 13:39:42 +02:00
nicoo
ef12991ee7 factors: Avoid repeatedly locking and flushing stdout
By default, stdout's LineWriter results one syscall per line, i.e. a billion
syscalls when factoring a billion numbers...

Buffering the output yields a ~28% speedup.
2020-06-18 16:45:40 -07:00
nicoo
2869248318 factor::Factors: Use a tree-based map internally
This eliminate the need for sorting the prime factors for display.
25% performance improvement after the changes from factor/montgomery.
2020-06-18 16:44:08 -07:00
nicoo
4b4d11b61a
factor: Add/update copyright notices as necessary (#1546) 2020-06-18 21:38:28 +02:00
Alex Lyon
6105cce69a
Merge pull request #1529 from nbraud/factor/montgomery
factor: Faster modular arithmetic with the Montgomery transform
2020-06-18 09:19:12 -07:00
nicoo
fb08d9ff9e factor::numeric::Montgomery::add: Deal with rare overflow case 2020-06-18 14:32:58 +02:00
Alex Lyon
e02b8a60f7
hashsum: switch from getopts to clap (#1542)
* hashsum: switch from getopts to clap

Additionally, slightly refactor.  This commit will be the first of
a series of commits refactoring (at the very least) `hashsum`.
2020-06-18 11:46:00 +02:00
Sylvestre Ledru
f17a112781
feature(ln): implement -r (#1540)
* bump the minimal version of rustc to 1.32

* feature(ln): implement -r

* fix two issues

* Use cow

* rustfmt the change

* with cargo.lock 1.31

* try to unbreak windows
2020-06-18 00:54:18 -07:00
nicoo
d1470dadf8 factor::numeric::gcd: Silence the (erroneous) dead code lint 2020-06-16 15:45:10 +02:00
nicoo
334e02786d factor: Run cargo fmt 2020-06-16 15:43:25 +02:00
Alex Lyon
8377abadb6
Fix to build on Rust 1.32.0 and formatting 2020-06-16 04:08:17 -05:00
Alex Lyon
110d6844ad
Use an iterator over OsString for uumain()
Additionally, restructure `uname` so that we don't need to find the
iterator's length.
2020-06-16 03:28:02 -05:00
nicoo
f1788d9e70 fixup! factor::numeric::Montgomery: Fix overflow bug 2020-06-16 01:17:16 +02:00
nicoo
4851619d62 factor::miller_rabin: Avoid repeatedly transforming 1 and -1
Approx. 25% speedup
2020-06-15 23:05:31 +02:00
nicoo
cb6051c580 factor::numeric::Montgomery: Fix overflow bug 2020-06-15 22:40:57 +02:00
nicoo
2238065c9d factor::numeric: Simplify Montgomery (remove superfluous Wrapping) 2020-06-15 19:18:34 +02:00
nicoo
19a0645a0a factor::numeric: Simplify inv_mod_u64
Just call `u64::wrapping_{mul,sub}` instead of (de)constructing Wrapping<u64>
values.
2020-06-15 19:18:34 +02:00
nicoo
918035e01e factor: Fix for old Rust 2020-06-15 19:18:34 +02:00
nicoo
f84d0f9398 factor::Factors::add: Make the precondition check a debug_assert 2020-06-15 19:18:34 +02:00
nicoo
33e18b4cd3 factor::numeric::Montgomery: Add debug assertions
In debug mode, checks that all arithmetic operations coincide with the
plain-u64 versions, as long as the latter does not overflow.
2020-06-15 19:18:34 +02:00
nicoo
8a4d0d30ad factor::numeric: Implement Montgomery's transform
This is a facter way to perform arithmetic mod n, when n is odd and a 64b
number.
2020-06-15 19:18:29 +02:00
nicoo
e91155519a factor::factor: Add integration tests 2020-06-15 19:10:16 +02:00
nicoo
bada7530fb factor::miller_rabin: Add tests 2020-06-15 19:10:16 +02:00
Roy Ivy III
813e57d225 fix cargo clippy complaint (redundant_clone) 2020-06-14 23:38:30 -05:00
Roy Ivy III
39e3c57198 fix cargo clippy complaint (clone_on_copy) 2020-06-14 23:38:30 -05:00
Sylvestre Ledru
7b452f3bfe style(nproc): reformat with rustfmt 2020-06-09 13:38:29 +02:00
Sylvestre Ledru
ac34d136f2 refactor(global): Move from tempdir to tempfile:
* the crate has been deprecated
2020-06-09 11:30:19 +02:00
Alex Lyon
80987250d2
Merge pull request #1521 from sylvestre/nproc
Add tests for nproc + clap migration
2020-06-08 19:18:00 -07:00
Alex Lyon
49771d4fda
Merge pull request #1535 from sylvestre/1.32
Move to 1.32 as minimal supported version
2020-06-08 14:31:02 -07:00
Sylvestre Ledru
5926315507 bump the minimal version of rustc to 1.32 2020-06-08 22:54:28 +02:00
Sylvestre Ledru
d0890b72cd
Merge pull request #1522 from sylvestre/groups
groups: clap migration
2020-06-08 22:19:08 +02:00
Sylvestre Ledru
851e25d134 refactor(logname): simplify the code 2020-06-07 17:54:30 +02:00
Sylvestre Ledru
5963b15746 refactor(nproc): fix some bugs and use clap 2020-06-02 23:29:21 +02:00
Sylvestre Ledru
ed1ebe09ff refactor(groups): move to clap 2020-06-02 23:16:18 +02:00
Sylvestre Ledru
78c04a254e refactor ~ rename MinSRV => MinRustV 2020-06-02 12:23:48 -05:00
Roy Ivy III
fbbd881ca9 docs ~ reduce sub-crate meta-information keywords to the maximum of five 2020-05-31 15:48:54 -05:00
Roy Ivy III
b2a566d50d fix/mknod ~ correct uucore feature dependency 2020-05-30 02:21:05 -05:00
Roy Ivy III
2fd7e15d63 fix/install ~ correct uucore feature dependency 2020-05-30 02:21:05 -05:00
Roy Ivy III
4b0dd73adb fix/chmod ~ correct uucore feature dependency 2020-05-30 02:21:05 -05:00
Roy Ivy III
923c47a408 refactor ~ remove outdated clippy attributes 2020-05-30 01:36:02 -05:00
Roy Ivy III
fb5ab86aee refactor help text and variable names 2020-05-30 01:36:02 -05:00
Roy Ivy III
8cf58de0a7 docs ~ polish/update comments 2020-05-30 01:36:02 -05:00
Roy Ivy III
619d0ab72b docs ~ add markdown-lint directives 2020-05-30 01:36:02 -05:00
Roy Ivy III
f82de13847 docs ~ spell-check repairs and addition of exceptions 2020-05-30 01:36:02 -05:00
Roy Ivy III
38ebc14b29 maint/build ~ remove .gitignore from sub-crate 'cut' 2020-05-29 22:59:48 -05:00
Roy Ivy III
21a4da905f fix cargo clippy complaint (single_component_path_imports) 2020-05-29 22:59:48 -05:00
Roy Ivy III
8fa8bb61ab change ~ install_sigpipe_hook() => mute_sigpipe_panic() (from uucore v0.0.4) 2020-05-29 22:59:48 -05:00
Roy Ivy III
ea3235c7e2 change ~ new_coreopts!() => app!() (from uucore v0.0.4) 2020-05-29 22:59:48 -05:00
Roy Ivy III
4b8fc7445b change ~ disp_err!() => show_usage_error!() (from uucore v0.0.4) 2020-05-29 22:59:48 -05:00
Roy Ivy III
6f465eeb9f deps ~ update utils to uucore/uucore_procs v0.0.4 2020-05-29 22:59:48 -05:00
Roy Ivy III
e3fd15e73c fix cargo clippy complaint (single_component_path_imports) 2020-05-29 22:59:48 -05:00
Roy Ivy III
156031b929 fix/sync ~ update to correct current WinAPI usage (ref #1496) 2020-05-29 22:59:48 -05:00
Roy Ivy III
fc9abdc179 fix/tail ~ update to correct current WinAPI usage (ref #1496) 2020-05-29 22:59:48 -05:00
Roy Ivy III
64f888d364 fix/cp ~ update to correct current WinAPI usage (ref #1496) 2020-05-29 22:59:48 -05:00
Roy Ivy III
251905da3d fix/du ~ update to correct WinAPI usage (fixes #1496) 2020-05-29 22:59:47 -05:00
Roy Ivy III
131bca3d53 fix/split ~ fix 'edition=2018' trait specification error 2020-05-29 22:59:47 -05:00
Roy Ivy III
3129c8fbe5 fix/od ~ fix 'edition=2018' trait specification error 2020-05-29 22:59:47 -05:00
Roy Ivy III
d4aa3a2231 fix 'edition="2018"' module import errors
- ref: <https://users.rust-lang.org/t/imports-can-only-refer-to-extern-crate-names/24388> @@ <https://archive.is/iCaXp>
2020-05-29 22:59:47 -05:00
Roy Ivy III
d70db1f7d2 docs ~ improve/update sub-crate meta information 2020-05-29 22:59:47 -05:00
Roy Ivy III
45a1609a38 update held/pinned dependencies (to maintain MinSRV v1.31.0) 2020-05-29 22:59:47 -05:00
Roy Ivy III
52ae491fcd change ~ rename base binary to 'coreutils' 2020-05-29 22:59:47 -05:00
Roy Ivy III
7cfa8be5f2 docs ~ add meta information to sub-crates 2020-05-29 22:59:47 -05:00
Roy Ivy III
6cb609aeee docs/codespell ~ fix spelling errors 2020-05-29 22:59:47 -05:00
Roy Ivy III
0cb5fbd6b5 change ~ remove transition-only and unneeded code for independent sub-crates 2020-05-29 22:59:46 -05:00
Roy Ivy III
db2e950918 change ~ make all sub-crates independent 2020-05-29 22:59:40 -05:00
Roy Ivy III
6606408ce9 refactor/polish ~ whitespace normalization (consistent indentation [either tabs *or* spaces], EOF EOLNs, no trailing whitespace) 2020-05-24 17:29:07 -05:00
Roy Ivy III
8263d31fbb change ~ improve help display for main multi-call binary 2020-05-24 17:29:07 -05:00
Roy Ivy III
c457dfbbc4 fix/uutils ~ support function/util (aka, applet) symlink aliasing where possible
## [why]

`std::env::current_exe()` has platform dependent behavior and will often
return the target binary, not the symlink name, when the binary is executed
via symlink. So, to support symlinking, the first (0th) arg from `std::env::args()`
is used, when possible, with fallback to `std::env::current_ext()` if args are
missing or empty.

- ref: <https://github.com/rust-lang/rust/issues/43617>
2020-05-24 17:29:07 -05:00
Roy Ivy III
bebf36bffb change/uutils ~ allow (almost) any name for the multi-binary container
- final multi-binary will now function correctly with any binary/executable name
- multi-binary container acts as the specified util IF EITHER ...
  1. the binary/executable name exactly matches the name of an applet/util
  2. the binary/exectuable name matches <PREFIX><UTIL_NAME> pattern
     * where the PREFIX is any string ending in a non-alphanumeric character
2020-05-24 17:29:07 -05:00
Roy Ivy III
09abcf8cbe
Merge pull request #1525 from nbraud/factor/faster
Performance improvements for `factor`
2020-05-24 16:54:04 -05:00
Nicolas Braud-Santoni
4c3682aec7
factor::Factors::add: Split up to work without NLL
Co-authored-by: Roy Ivy III <rivy.dev@gmail.com>
2020-05-24 19:14:37 +02:00
nicoo
36a2948959 factor::miller_rabin: Avoid unecessary exponentiation
Instead of computing a^r and a^(n-1) = a^(r 2ⁱ) separately,
compute the latter by repeatedly squaring the former.

33.6% performance improvement
2020-05-24 19:10:34 +02:00
nicoo
543c7b941a factor::rho: Small refactor 2020-05-24 19:10:29 +02:00
nicoo
30fd6a0309 factor::numeric: Replace lose functions with an Arithmetic trait 2020-05-24 18:16:21 +02:00
nicoo
29eb8fd77b format: Make clippy happy 2020-05-24 17:06:19 +02:00
nicoo
8241037690 factor::miller_rabin: Extract dividers from the primality test
Another 36% improvement.
2020-05-24 15:41:23 +02:00
nicoo
6b9585b1dc factor::miller_rabbin: Refactor before extracting dividers
Replace iterated division with u64::trailing_zeros, hoist the selection of `mul`
out of the loop, another cool 49.5% runtime improvement.
2020-05-24 15:41:23 +02:00
nicoo
e3ecc81d97 factor: Move the Miller-Rabin primality test to its own module. 2020-05-24 15:41:23 +02:00
nicoo
74054feb94 factor::factor: Remove extraneous call to the primality test
Another 6.97% runtime improvement
2020-05-24 15:41:23 +02:00
nicoo
e1a6dbe619 factor::table: Remove obsolete, commented code 2020-05-24 15:41:23 +02:00
nicoo
169740629b factor::table: Remove extraneous calls to the primality test
50% performance improvement on factoring all numbers between 2 and 10⁶.
2020-05-24 15:41:23 +02:00
nicoo
418fd61759 factor::factor: Short-circuit the fallback to Pollard's rho
When the remainder is smaller than the max. entry in the table,
it is guaranteed to be prime.
2020-05-24 15:41:23 +02:00
nicoo
bc11e57962 factor::factor: Use u64::trailing_zero instead of iterated division
No significant performance impact (most of the time is spent elsewhere),
but an easy and satisfying fix nevertheless.
2020-05-24 15:41:23 +02:00
nicoo
a1b2522750 factor: Move each factorisation method to its own module
Also decoupled the factorisation methods; now factor::factor contains
the logic that chains the different algorithms and aggregates results.

As a side-effect, rho::factor now performs extraneous allocations (as each
recursive step creates a new `Factors` value, which is then aggregated into
the previous one) but there is no significant performance impact.
2020-05-24 15:41:23 +02:00
nicoo
d9095a2539 factor: Refactor (eheh) around a Factors datatype
It is clearer to see what is going on, as opposed to passing around an
unmarked `Vec<u64>`, and there is a single place to add invariants checks.

This is also a more compact memory representation: each prime factor is
represented only once, with an additional byte for multiplicity.  The
performance impact is however not significant.
2020-05-24 15:41:23 +02:00
Sylvestre Ledru
75b7f768ea
fix(mv): Allow move across file systems (#1524)
Co-authored-by: Arni Dagur <arni@dagur.eu>
2020-05-24 12:49:56 +02:00
Sylvestre Ledru
272b66aac8
refactor(hostname): use clap instead of getopts for consistency (#1516)
* refactor(hostname): use clap instead of getopts for consistency

* deps ~ uucore/wide is required

Co-authored-by: Roy Ivy III <rivy.dev@gmail.com>
2020-05-22 17:27:03 +02:00
Sylvestre Ledru
817a237821
Merge pull request #1513 from sylvestre/uptime-since
feature(uptime): add option --since
2020-05-21 22:18:52 +02:00
Sylvestre Ledru
2fe2fe7275
be less prescriptive with clap versions (#1514) 2020-05-21 22:18:13 +02:00
Sylvestre Ledru
0a02aeda71
refactor(hostname): rely on the hostname crate (#1517) 2020-05-21 10:58:38 +02:00
Sylvestre Ledru
3994af5678
Update src/uu/uptime/src/uptime.rs
Co-authored-by: Roy Ivy III <rivy.dev@gmail.com>
2020-05-21 10:58:23 +02:00
Sylvestre Ledru
340b5badda
Update src/uu/uptime/src/uptime.rs
Co-authored-by: Roy Ivy III <rivy.dev@gmail.com>
2020-05-21 10:58:15 +02:00
Sylvestre Ledru
6bc9b38fa9 fix(cp): Remove an unused dep to the getops crate 2020-05-17 12:09:55 +02:00
Sylvestre Ledru
719f2bf8ae feature(uptime): add option --since
For this, I:
* moved from getops to clap
* remove the millisecond maths
2020-05-17 11:50:08 +02:00
Roy Ivy III
8e886c30dc
Merge pull request #1511 from sylvestre/more
fix(more) handle no arguments without panic; add test and a FixME
2020-05-15 19:17:01 -05:00
Sylvestre Ledru
80203a7a02 fix(more) Return a proper error message when no argument is provided
Fix #1509
2020-05-15 17:48:35 -05:00
Roy Ivy III
9052bc4de7
Merge pull request #1503 from sylvestre/arch
test(arch): add tests and description text
2020-05-10 20:11:10 -05:00
Anuvrat Parashar
ce064dc62e feature(head): Introduce NLines to handle negative lines parameters 2020-05-10 21:32:48 +02:00
Sylvestre Ledru
1565f4d1d9
Update src/uu/arch/src/arch.rs
Co-authored-by: Roy Ivy III <rivy.dev@gmail.com>
2020-05-10 21:05:38 +02:00
Roy Ivy III
6e77f99f61
Merge pull request #1507 from sylvestre/id
add/id ~ long option variant and tests
2020-05-10 12:21:07 -05:00
Sylvestre Ledru
a83fe2f098
Merge pull request #1508 from muskuloes/master
Flush output buffer for expand/unexpand commands
2020-05-09 21:17:58 +02:00
muskuloes
c84f89257e fix clippy warning: extract function 2020-05-09 19:28:13 +02:00
muskuloes
b4752e079f flush output of unexpand command as well 2020-05-09 19:28:13 +02:00
muskuloes
fb8f3ebf96 expand: flush output buffer 2020-05-09 19:28:13 +02:00
Sylvestre Ledru
91ac5343db
remove artifact 2020-05-09 10:23:03 +02:00
Sylvestre Ledru
9fb00df9b3 test(id): add tests for id 2020-05-09 00:14:10 +02:00
Sylvestre Ledru
90dfa70bd3 feature(id): add --user, --group & --groups 2020-05-09 00:07:04 +02:00
Sylvestre Ledru
437e3aeab7 style(sort): Fix a clippy warning 2020-05-07 23:13:11 +02:00
elgris
71ba8b3fd6 sort: add "dictionary-order" flag.
The flag makes 'sort' command ignore non-dictionary symbols
(non-alphanumeric and non-spaces). The only difference with GNU sort is
that it takes ALL alphanumeric symbols, not only ASCII ones.
2020-05-07 23:08:24 +02:00
Sylvestre Ledru
f44e5465b8 cleanup(yes, whoami): remove some old workaround to force cargo rebuilds 2020-05-06 23:39:49 +02:00
Sylvestre Ledru
16bf4b1893 test(arch): Add some tests 2020-05-06 00:39:13 +02:00
E5ten
2a61fc7f72 feature(uname): Add -o/--operating-system flag
The code for the flag already existed it had just not been added to the argument parsing. Replace "print the operating system name." in -s help text with "print the kernel name." so the -o option can use the previous -s help text.
2020-05-05 13:23:42 +02:00
Roy Ivy III
ab0ef90b4a refact/cat ~ fix style issues 2020-05-04 13:04:02 -05:00
Sylvestre Ledru
6294736d79 Merge branch 'fix-cat' of https://github.com/phungleson/coreutils into phungleson-fix-cat 2020-05-04 13:09:21 +02:00
Sylvestre Ledru
7e3f32d4db style(df): rustfmt src/uu/df/src/df.rs 2020-05-04 10:56:16 +02:00
Sylvestre Ledru
06fe387c76
Merge pull request #1495 from orottier/wc
wc: Do not decode UTF8 when only counting bytes/newlines
2020-05-04 10:54:18 +02:00
Otto Rottier
dab1b9ba1a
rustfmt src/uu/wc/src/wc.rs
Co-authored-by: Sylvestre Ledru <sledru@mozilla.com>
2020-05-04 07:45:30 +02:00
Roy Ivy III
f12c27a57d
Merge pull request #1487 from sylvestre/df-human
refactor and fix some `df` build and cosmetic issues
2020-05-03 15:15:14 -05:00
Roy Ivy III
23b49101c0 fix/df ~ fix build script for sub-crate builds 2020-05-03 14:54:57 -05:00
Roy Ivy III
81d85f398b fix/df ~ missing windows imports 2020-05-03 14:54:57 -05:00
Roy Ivy III
091a356807 fix/df ~ correct number suffix display by using number_prefix PrefixNames::symbol() 2020-05-03 14:53:13 -05:00
Otto Rottier
e3bd6b6848 wc: Do not decode UTF8 when only counting bytes/newlines 2020-05-03 20:39:09 +02:00
Sylvestre Ledru
fc83024ebe refactor(df): use number_prefix like 'ls' instead of doing the display by hand 2020-05-03 13:29:55 -05:00
Sylvestre Ledru
90de33d5d7 maint/df: relax the dependencies 2020-05-03 12:27:55 -05:00
Sylvestre Ledru
850bd9c32d fix(date): fix the date
Date didn't work out of the box.
Refactor it a bit to match other programs
2020-05-03 12:26:17 -05:00
Roy Ivy III
2d5d0680d8 fix(df) ~ fix lint complaint (unused import) 2020-05-03 12:00:42 -05:00
Sylvestre Ledru
8d1f0edfc4 refact(df): follow the same directory pattern than the other software 2020-05-03 11:51:33 -05:00
Sylvestre Ledru
c85756e509 fix(df): Linux: Fix the mount path and type 2020-05-03 11:51:33 -05:00
Sylvestre Ledru
8f6770401d feat(df): Add the support of path for df. ex: df /boot 2020-05-03 11:51:33 -05:00
Sylvestre Ledru
6e8c901204 fix: typo fixes found by codespell 2020-05-01 23:36:33 +02:00
Sylvestre Ledru
2aed7cb035 fix(df): Fix Windows support
- add required handleapi feature for winapi crate
- remove unneeded 'unsafe' section
- remove unused import (GetDiskFreeSpaceExW)
- fix Windows df execution

Co-Authored-By: Roy Ivy III <rivy.dev@gmail.com>
2020-04-28 13:16:19 -05:00
Sylvestre Ledru
f9456e80c3 fix(df): Add support for freebsd 2020-04-28 13:11:22 -05:00
Sylvestre Ledru
8545f03e0f fix(df): Improve MacOSX support 2020-04-28 13:11:21 -05:00
Sylvestre Ledru
dd1a212550 style(df): Fix warnings + cargo fmt
Co-Authored-By: Roy Ivy III <rivy.dev@gmail.com>
2020-04-28 13:11:04 -05:00
Sylvestre Ledru
d5228b5a64 feat(df) add 'df' uutil 2020-04-28 13:05:55 -05:00
Roy Ivy III
5aa2b039a5 change ~ fixup paths (within workspace packages) to common code 2020-04-14 13:46:19 -05:00
Roy Ivy III
78c362c8b5 change ~ fixup paths (within workspace packages) 2020-04-14 13:46:18 -05:00
Roy Ivy III
f0b0e3b867 change ~ reorganize code files 2020-04-14 13:46:18 -05:00
Sylvestre Ledru
cf35d75491 rustfmt the tests 2020-04-13 20:36:03 +02:00
Roy Ivy III
08a2cd0fc8
Merge pull request #1449 from rivy/add.cicd
Improves build and maint; fixes all testing issues; adds GHA CICD; fixes a long list of lints
2020-04-13 10:12:24 -05:00
Roy Ivy III
6a18d7f7be update ~ (maint!) use fixed/patched uucore (v0.0.2); await upgrade upstream
- fixes musl (no-utmpx) build bug
- fixes failing windows real{link,path} tests
2020-04-12 22:39:55 -05:00
Roy Ivy III
b8da0d7a8c maint/docs ~ add license notation to all workspace packages 2020-04-12 16:57:11 -05:00
Roy Ivy III
d704fb2b61 printf: refactor ~ remove redundant string allocation 2020-04-12 16:56:05 -05:00
Roy Ivy III
3e3dff3a57 ls: refactor ~ improve line bundling of imports 2020-04-12 16:56:05 -05:00
Roy Ivy III
84f05f209c expand: refactor/polish ~ simplify if condition 2020-04-12 16:56:04 -05:00
Roy Ivy III
ecb8f2873a refactor ~ change repair of 'fix cargo clippy complaints (fatal/same if clause)'
.# [why]

The initial refactoring/repair led to comments within if conditions which is
objectionable to some of the devs. So, this changes the refactor to completely split
the if clauses into separate if statements (with corresponding commentary).

Note: this refactor is "less mechanical" and does increase the risk of changing the
actual effect of the code. But the change is small and the tests are passing.
2020-04-12 16:56:04 -05:00
Roy Ivy III
156502a332 refactor ~ reduce excessive use of scope prefixes 2020-04-12 16:56:04 -05:00
Roy Ivy III
78d55f0e32 refactor/polish ~ fix cargo clippy complaints (fix/remove allow range_plus_one) 2020-04-12 16:56:04 -05:00
Roy Ivy III
1c97a29a56 maint/build ~ refactor dependency specifications (sorted, single lines) of 'Cargo.toml' 2020-04-12 16:56:04 -05:00
Roy Ivy III
7e15375d82 refactor ~ clean up main directory (move '{mk,uu}main.rs' into src/#common) 2020-04-11 18:50:12 -05:00
Roy Ivy III
9675addc50 refactor/polish ~ fix cargo clippy complaints (skip_while_next) 2020-04-11 18:50:11 -05:00
Roy Ivy III
0cf704a1bf refactor/polish ~ fix cargo clippy complaints (wildcard_in_or_patt) 2020-04-11 18:50:11 -05:00
Roy Ivy III
5224c3cd49 refactor/polish ~ fix rustc complaints (unused_parens) 2020-04-11 18:50:11 -05:00
Roy Ivy III
ecc895e7a1 refactor/polish ~ fix cargo clippy complaints (iter_nth_zero) 2020-04-11 18:50:11 -05:00
Roy Ivy III
ce0bb218a7 refactor/polish ~ fix cargo clippy complaints (deprecated std::error::Error::description) 2020-04-11 18:50:11 -05:00
Roy Ivy III
0635c5fe93 refactor/polish ~ fix cargo clippy complaints (unused_parens) 2020-04-11 18:50:11 -05:00
Roy Ivy III
c484fb8065 refactor/polish ~ fix cargo clippy complaints (missing_safety_doc; with ToDO for safety note) 2020-04-11 18:50:10 -05:00
Roy Ivy III
0fdf27c5c2 refactor/polish ~ fix cargo clippy complaints (iter_skip_next) 2020-04-11 18:50:10 -05:00
Roy Ivy III
84e26b3d0b refactor/polish ~ fix cargo clippy complaints (or_fun_call) 2020-04-11 18:50:10 -05:00
Roy Ivy III
9b145bb6c4 refactor/polish ~ fix cargo clippy complaints (unreadable_literal) 2020-04-11 18:50:10 -05:00
Roy Ivy III
75f05df119 refactor/polish ~ fix cargo clippy complaints (redundant_static_lifetimes) 2020-04-11 18:50:10 -05:00
Roy Ivy III
c4a69f2f4e refactor/polish ~ fix cargo clippy complaints (allow trivially_copy_pass_by_ref) 2020-04-11 18:50:10 -05:00
Roy Ivy III
1d26e901f9 fix 32-bit/i686 target builds 2020-04-11 18:50:09 -05:00
Sylvestre Ledru
deda30e3f5
Merge pull request #1421 from felixonmars/patch-1
Correct some typos in printf.rs
2020-04-08 19:03:57 +02:00
Son
a573a24d28 Add test 0 to 8 and 10 to 31 2020-02-09 14:18:21 +11:00
Son
7c9cc92163 Test write tab 2020-02-09 13:41:12 +11:00
Son
76ff2f5480 Test new line 2020-02-09 13:26:51 +11:00
Son
29729818f0 Empty test to start with cat 2020-02-09 11:18:18 +11:00
Roy Ivy III
5af8503a5e cargo fmt 2020-01-28 00:05:06 -06:00
Roy Ivy III
15722e3ace refactor/polish ~ fix cargo clippy complaints (unused imports) 2020-01-28 00:04:41 -06:00
Roy Ivy III
daecc56d47 refactor/polish ~ fix cargo clippy complaints (unwrap_or_else) 2020-01-27 22:35:28 -06:00
Roy Ivy III
b4866afb9a refactor/polish ~ fix cargo clippy complaints (deprecated uint64_t) 2020-01-27 22:35:28 -06:00
Roy Ivy III
a6bdad314d refactor/polish ~ fix cargo clippy complaints (allow deprecated mem::uninitialized)
.# [why]

`std::mem::MaybeUninit` is likely preffered. But `MaybeUninit` was not
stabilized until rust v1.36.0 and conversion from `mem::uninitialized` is
not obviously straight-forward at the moment.

So, 'std::mem::uninitialized' is allowed instead of increasing MinSRV to v1.36.0.

* ref: https://github.com/rust-lang/rust/blob/master/RELEASES.md
2020-01-27 22:35:28 -06:00
Roy Ivy III
082f9520b2 refactor/polish ~ fix cargo clippy complaints (allow useless_let_if_seq) 2020-01-27 22:35:28 -06:00
Roy Ivy III
d82a170351 refactor/polish ~ fix cargo clippy complaints (allow unreadable_literal {for dynamic code}) 2020-01-27 22:35:28 -06:00
Roy Ivy III
372ddf9222 refactor/polish ~ fix cargo clippy complaints (allow too_many_args) 2020-01-27 22:35:28 -06:00
Roy Ivy III
6c7c4788d8 refactor/polish ~ fix cargo clippy complaints (allow single_match) 2020-01-27 22:35:28 -06:00
Roy Ivy III
6230ab302a refactor/polish ~ fix cargo clippy complaints (allow range_plus_one; clippy bug workaround)
* ref: <https://github.com/rust-lang/rust-clippy/issues/4898>
2020-01-27 22:35:28 -06:00
Roy Ivy III
522d3ae1b6 refactor/polish ~ fix cargo clippy complaints (allow ptr_arg) 2020-01-27 22:35:27 -06:00
Roy Ivy III
b8c0711273 refactor/polish ~ fix cargo clippy complaints (allow ptr_arg) 2020-01-27 22:35:27 -06:00
Roy Ivy III
e80970cb92 refactor/polish ~ fix cargo clippy complaints (allow module_inception) 2020-01-27 22:35:27 -06:00
Roy Ivy III
cc49983314 refactor/polish ~ fix cargo clippy complaints (allow missing_safety_doc) 2020-01-27 22:35:27 -06:00
Roy Ivy III
df68c396c4 refactor/polish ~ fix cargo clippy complaints (allow map_clone)
.# [why]

Although `copied()` is preffered, it was not stabilized until rust v1.35.0.
So, 'map_clone' is allowed instead of increasing MinSRV to v1.35.0.

* ref: https://github.com/rust-lang/rust/blob/master/RELEASES.md
2020-01-27 22:35:27 -06:00
Roy Ivy III
99ce03f259 refactor/polish ~ fix cargo clippy complaints (allow many_single_char_names) 2020-01-27 22:35:27 -06:00
Roy Ivy III
44a60f773f refactor/polish ~ fix cargo clippy complaints (allow 'let_and_return') 2020-01-27 22:35:27 -06:00
Roy Ivy III
a90e1abbd8 refactor/polish ~ fix cargo clippy complaints (allow enum_variant_names) 2020-01-27 22:35:27 -06:00
Roy Ivy III
5241eca084 refactor/polish ~ fix cargo clippy complaints (allow comparison_chain {for f64 comparisons}) 2020-01-27 22:35:27 -06:00
Roy Ivy III
784887cc84 refactor/polish ~ fix cargo clippy complaints (allow comparison_chain) 2020-01-27 22:35:27 -06:00
Roy Ivy III
5094d6ffcc refactor/polish ~ fix cargo clippy complaints (allow complexity) 2020-01-27 22:35:26 -06:00
Roy Ivy III
37c9b0e331 refactor/polish ~ fix cargo clippy complaints ('better' ref use/toplevel_ref_arg) 2020-01-27 22:35:26 -06:00
Roy Ivy III
58779be6bb refactor/polish ~ fix cargo clippy complaints (transmute_ptr_to_ptr) 2020-01-27 22:35:26 -06:00
Roy Ivy III
1deac8df87 refactor/polish ~ fix cargo clippy complaints (new_ret_no_self) 2020-01-27 22:35:26 -06:00
Roy Ivy III
6131f6f0e1 refactor/polish ~ fix cargo clippy complaints (borrowed_box) 2020-01-27 22:35:26 -06:00
Roy Ivy III
8f2cdcfcb5 refactor/polish ~ fix cargo clippy complaints (trivially_copy_pass_by_ref) 2020-01-27 22:35:26 -06:00
Roy Ivy III
37a3db1819 refactor/polish ~ fix cargo clippy complaints (flat_map_identity) 2020-01-27 22:35:26 -06:00
Roy Ivy III
bffea950d9 refactor/polish ~ fix cargo clippy complaints (zero_ptr) 2020-01-27 22:35:26 -06:00
Roy Ivy III
248dfbac08 refactor/polish ~ fix cargo clippy complaints (comparison_chain) 2020-01-27 22:35:16 -06:00
Roy Ivy III
2ef9c9a28e refactor/polish ~ fix cargo clippy complaints (unnecessary_unwrap) 2020-01-27 21:33:53 -06:00
Roy Ivy III
7cc3571657 refactor/polish ~ fix cargo clippy complaints (remove unit value as function arg) 2020-01-27 21:33:53 -06:00
Roy Ivy III
8ec50b72d1 refactor/polish ~ fix cargo clippy complaints (inefficient to_string()) 2020-01-27 21:33:53 -06:00