Commit graph

3292 commits

Author SHA1 Message Date
nicoo
fb08d9ff9e factor::numeric::Montgomery::add: Deal with rare overflow case 2020-06-18 14:32:58 +02:00
Sylvestre Ledru
f6e0e4ea35 vscode: install rust support & rla 2020-06-18 12:53:29 +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
Sylvestre Ledru
87af997c7a
Merge pull request #1541 from Arcterus/uumain-osstring
Use an iterator over OsString for uumain()
2020-06-16 15:02:31 +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
5cea5faee0
Update Cargo.lock 2020-06-16 03:59:45 -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
Sylvestre Ledru
1309972149
Merge pull request #1539 from uutils/fix.disable-failing
Fix ~ disable failing tests
2020-06-15 09:30:37 +02:00
Roy Ivy III
813e57d225 fix cargo clippy complaint (redundant_clone) 2020-06-14 23:38:30 -05:00
Roy Ivy III
3a661e1f9e tests ~ suppress failing WSL logname test (add investigate ToDO) 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
Roy Ivy III
6dfe2dd4a3 tests ~ disable failing 'test_hostname::test_hostname_ip' test on MacOS
- also adds FixME to prompt future correction
2020-06-14 23:38:30 -05:00
Roy Ivy III
2c5d154b67 fix ~ compiler warning (unused import) 2020-06-14 23:38:30 -05:00
Roy Ivy III
cbac6cc903 tests ~ increase test detail to diagnose MacOS hostname test failure 2020-06-14 23:38:30 -05:00
Roy Ivy III
5584194a13 docs ~ update cspell word exceptions 2020-06-14 23:38:30 -05:00
Roy Ivy III
b055ec34e7 tests ~ disable randomly failing test ('test_factor::test_random_big') under CI
- avoid randomly failing builds; reactivate when fixed
- ref: #1531
2020-06-14 23:38:30 -05:00
Roy Ivy III
d144182add tests/refactor ~ use is_ci() for CI host platform testing 2020-06-14 12:20:31 -05:00
Roy Ivy III
407d455b12 tests ~ add is_ci() test 2020-06-14 12:20:31 -05:00
Roy Ivy III
51cb023cd7 maint/CICD ~ pass CI from environment to cross containers 2020-06-13 21:54:21 -05:00
Roy Ivy III
6d15599c37 update deps ~ Cargo.lock 2020-06-13 13:55:55 -05:00
Roy Ivy III
2c4af65dc5 deps ~ update uucore dependency (use 'canary' everywhere for CI testing) 2020-06-13 13:40:19 -05:00
Sylvestre Ledru
54ada64232 fix ~ update docs + fix Makefile after @rivy's recent changes 2020-06-13 13:39:47 -05:00
Sylvestre Ledru
7b452f3bfe style(nproc): reformat with rustfmt 2020-06-09 13:38:29 +02:00
Alex Lyon
b7b347ff03
Merge pull request #1523 from sylvestre/tempdir
refactor(global): Move from tempdir to tempfile:
2020-06-09 03:07:53 -07: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
358af0939c
Merge pull request #1534 from sylvestre/logname
Logname - add test and simplify the code a bit
2020-06-08 09:34:42 +02:00
Sylvestre Ledru
f87b041e27
test(hostid) add a test for hostid (#1533) 2020-06-08 09:09:44 +02:00
Sylvestre Ledru
851e25d134 refactor(logname): simplify the code 2020-06-07 17:54:30 +02:00
Sylvestre Ledru
332dc5d2f2 test(logname) add a test for logname 2020-06-07 17:53:54 +02:00
Sylvestre Ledru
5963b15746 refactor(nproc): fix some bugs and use clap 2020-06-02 23:29:21 +02:00
Sylvestre Ledru
c33f52baf1 test(nproc): add a test 2020-06-02 23:29:18 +02:00
Sylvestre Ledru
ed1ebe09ff refactor(groups): move to clap 2020-06-02 23:16:18 +02:00