Commit 82e7fe1
committed
protocol: Remove explicit
We only bring in `rand` explicitly for the `Rng` trait, coming from
`RngCore`. The `Rng` trait is a nightmare to implement, and we only use
a single call to `.fill`. If we export a far simpler trait that
represents filling a 32 byte slice, then users can have a far easier
time implementing this trait. This has come up in the past with this
project: https://github.com/issues/recent?issue=alfred-hodler%7Cpushtx%7C3
This also removes the need for `rand` as a dependency at all, and it may
be brought in through `bitcoin` (or later `secp256k1`)rand dependency1 parent eceb074 commit 82e7fe1
4 files changed
+37
-15
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
| 16 | + | |
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
23 | 22 | | |
24 | 23 | | |
25 | 24 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
20 | 19 | | |
21 | 20 | | |
22 | | - | |
| 21 | + | |
23 | 22 | | |
24 | 23 | | |
25 | 24 | | |
| |||
117 | 116 | | |
118 | 117 | | |
119 | 118 | | |
120 | | - | |
| 119 | + | |
121 | 120 | | |
122 | 121 | | |
123 | 122 | | |
| |||
126 | 125 | | |
127 | 126 | | |
128 | 127 | | |
129 | | - | |
| 128 | + | |
130 | 129 | | |
131 | 130 | | |
132 | 131 | | |
133 | | - | |
| 132 | + | |
| 133 | + | |
134 | 134 | | |
135 | 135 | | |
136 | 136 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
582 | 582 | | |
583 | 583 | | |
584 | 584 | | |
585 | | - | |
| 585 | + | |
586 | 586 | | |
587 | 587 | | |
588 | 588 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
234 | 234 | | |
235 | 235 | | |
236 | 236 | | |
237 | | - | |
| 237 | + | |
238 | 238 | | |
239 | 239 | | |
240 | | - | |
| 240 | + | |
241 | 241 | | |
242 | 242 | | |
243 | 243 | | |
| |||
376 | 376 | | |
377 | 377 | | |
378 | 378 | | |
379 | | - | |
| 379 | + | |
380 | 380 | | |
381 | 381 | | |
382 | 382 | | |
| |||
783 | 783 | | |
784 | 784 | | |
785 | 785 | | |
| 786 | + | |
| 787 | + | |
| 788 | + | |
| 789 | + | |
| 790 | + | |
| 791 | + | |
| 792 | + | |
| 793 | + | |
| 794 | + | |
| 795 | + | |
| 796 | + | |
| 797 | + | |
| 798 | + | |
| 799 | + | |
| 800 | + | |
| 801 | + | |
| 802 | + | |
| 803 | + | |
| 804 | + | |
| 805 | + | |
| 806 | + | |
| 807 | + | |
| 808 | + | |
786 | 809 | | |
787 | 810 | | |
788 | 811 | | |
789 | 812 | | |
790 | 813 | | |
| 814 | + | |
791 | 815 | | |
792 | 816 | | |
793 | 817 | | |
794 | | - | |
795 | 818 | | |
796 | 819 | | |
797 | 820 | | |
| |||
972 | 995 | | |
973 | 996 | | |
974 | 997 | | |
975 | | - | |
| 998 | + | |
976 | 999 | | |
977 | 1000 | | |
978 | 1001 | | |
| |||
1039 | 1062 | | |
1040 | 1063 | | |
1041 | 1064 | | |
1042 | | - | |
| 1065 | + | |
1043 | 1066 | | |
1044 | 1067 | | |
1045 | 1068 | | |
| |||
1088 | 1111 | | |
1089 | 1112 | | |
1090 | 1113 | | |
1091 | | - | |
| 1114 | + | |
1092 | 1115 | | |
1093 | 1116 | | |
1094 | 1117 | | |
| |||
0 commit comments