Skip to main content

max / balanced_breakfast

Bump rand to 0.10.2 0.8 -> 0.10: thread_rng() -> rand::rng(), fill_bytes now via rand::Rng. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Author: Max Johnson <me@maxj.phd> · 2026-07-21 00:19 UTC
Commit: 4c2811ddf4ecaa0edbe4f2be4e93477292c22bce
Parent: 5c651c6
4 files changed, +208 insertions, -82 deletions
M Cargo.lock +201 -75
@@ -26,7 +26,7 @@ checksum = "b169f7a6d4742236a0a00c541b845991d0ac43e546831af1249753ab4c3aa3a0"
26 26 dependencies = [
27 27 "cfg-if",
28 28 "cipher",
29 - "cpufeatures",
29 + "cpufeatures 0.2.17",
30 30 ]
31 31
32 32 [[package]]
@@ -132,7 +132,7 @@ checksum = "3c3610892ee6e0cbce8ae2700349fcf8f98adb0dbfbee85aec3c9179d29cc072"
132 132 dependencies = [
133 133 "base64ct",
134 134 "blake2",
135 - "cpufeatures",
135 + "cpufeatures 0.2.17",
136 136 "password-hash",
137 137 ]
138 138
@@ -191,6 +191,29 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
191 191 checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8"
192 192
193 193 [[package]]
194 + name = "aws-lc-rs"
195 + version = "1.17.3"
196 + source = "registry+https://github.com/rust-lang/crates.io-index"
197 + checksum = "00bdb5da18dac48ca2cc7cd4a98e533e8635a58e2361d13a1a4ee3888e0d72f1"
198 + dependencies = [
199 + "aws-lc-sys",
200 + "zeroize",
201 + ]
202 +
203 + [[package]]
204 + name = "aws-lc-sys"
205 + version = "0.43.0"
206 + source = "registry+https://github.com/rust-lang/crates.io-index"
207 + checksum = "43103168cc76fe62678a375e722fc9cb3a0146159ac5828bc4f0dfd755c2224c"
208 + dependencies = [
209 + "cc",
210 + "cmake",
211 + "dunce",
212 + "fs_extra",
213 + "pkg-config",
214 + ]
215 +
216 + [[package]]
194 217 name = "balanced-breakfast-desktop"
195 218 version = "0.3.3"
196 219 dependencies = [
@@ -205,7 +228,7 @@ dependencies = [
205 228 "makeover",
206 229 "open",
207 230 "parking_lot",
208 - "rand 0.8.5",
231 + "rand 0.10.2",
209 232 "regex",
210 233 "roxmltree",
211 234 "serde",
@@ -263,7 +286,7 @@ dependencies = [
263 286 "keyring",
264 287 "parking_lot",
265 288 "pter 0.1.0",
266 - "rand 0.8.5",
289 + "rand 0.10.2",
267 290 "readable-readability",
268 291 "regex",
269 292 "rhai",
@@ -503,6 +526,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
503 526 checksum = "47b26a0954ae34af09b50f0de26458fa95369a0d478d8236d3f93082b219bd29"
504 527 dependencies = [
505 528 "find-msvc-tools",
529 + "jobserver",
530 + "libc",
506 531 "shlex",
507 532 ]
508 533
@@ -540,6 +565,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
540 565 checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801"
541 566
542 567 [[package]]
568 + name = "cfg_aliases"
569 + version = "0.2.2"
570 + source = "registry+https://github.com/rust-lang/crates.io-index"
571 + checksum = "f079e83a288787bcd14a6aea84cee5c87a67c5a3e660c30f557a3d24761b3527"
572 +
573 + [[package]]
543 574 name = "chacha20"
544 575 version = "0.9.1"
545 576 source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -547,7 +578,18 @@ checksum = "c3613f74bd2eac03dad61bd53dbe620703d4371614fe0bc3b9f04dd36fe4e818"
547 578 dependencies = [
548 579 "cfg-if",
549 580 "cipher",
550 - "cpufeatures",
581 + "cpufeatures 0.2.17",
582 + ]
583 +
584 + [[package]]
585 + name = "chacha20"
586 + version = "0.10.1"
587 + source = "registry+https://github.com/rust-lang/crates.io-index"
588 + checksum = "d524456ba66e72eb8b115ff89e01e497f8e6d11d78b70b1aa13c0fbd97540a81"
589 + dependencies = [
590 + "cfg-if",
591 + "cpufeatures 0.3.0",
592 + "rand_core 0.10.1",
551 593 ]
552 594
553 595 [[package]]
@@ -557,7 +599,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
557 599 checksum = "10cd79432192d1c0f4e1a0fef9527696cc039165d729fb41b3f4f4f354c2dc35"
558 600 dependencies = [
559 601 "aead",
560 - "chacha20",
602 + "chacha20 0.9.1",
561 603 "cipher",
562 604 "poly1305",
563 605 "zeroize",
@@ -589,6 +631,15 @@ dependencies = [
589 631 ]
590 632
591 633 [[package]]
634 + name = "cmake"
635 + version = "0.1.58"
636 + source = "registry+https://github.com/rust-lang/crates.io-index"
637 + checksum = "c0f78a02292a74a88ac736019ab962ece0bc380e3f977bf72e376c5d78ff0678"
638 + dependencies = [
639 + "cc",
640 + ]
641 +
642 + [[package]]
592 643 name = "combine"
593 644 version = "4.6.7"
594 645 source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -709,6 +760,15 @@ dependencies = [
709 760 ]
710 761
711 762 [[package]]
763 + name = "cpufeatures"
764 + version = "0.3.0"
765 + source = "registry+https://github.com/rust-lang/crates.io-index"
766 + checksum = "8b2a41393f66f16b0823bb79094d54ac5fbd34ab292ddafb9a0456ac9f87d201"
767 + dependencies = [
768 + "libc",
769 + ]
770 +
771 + [[package]]
712 772 name = "crc"
713 773 version = "3.4.0"
714 774 source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -1349,6 +1409,12 @@ dependencies = [
1349 1409 ]
1350 1410
1351 1411 [[package]]
1412 + name = "fs_extra"
1413 + version = "1.3.0"
1414 + source = "registry+https://github.com/rust-lang/crates.io-index"
1415 + checksum = "42703706b716c37f96a77aea830392ad231f44c9e9a67872fa5548707e11b11c"
1416 +
1417 + [[package]]
1352 1418 name = "futf"
1353 1419 version = "0.1.5"
1354 1420 source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -1603,8 +1669,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
1603 1669 checksum = "ff2abc00be7fca6ebc474524697ae276ad847ad0a6b3faa4bcb027e9a4614ad0"
1604 1670 dependencies = [
1605 1671 "cfg-if",
1672 + "js-sys",
1606 1673 "libc",
1607 1674 "wasi 0.11.1+wasi-snapshot-preview1",
1675 + "wasm-bindgen",
1608 1676 ]
1609 1677
1610 1678 [[package]]
@@ -1615,11 +1683,25 @@ checksum = "899def5c37c4fd7b2664648c28120ecec138e4d395b459e5ca34f9cce2dd77fd"
1615 1683 dependencies = [
1616 1684 "cfg-if",
1617 1685 "libc",
1618 - "r-efi",
1686 + "r-efi 5.3.0",
1619 1687 "wasip2",
1620 1688 ]
1621 1689
1622 1690 [[package]]
1691 + name = "getrandom"
1692 + version = "0.4.3"
1693 + source = "registry+https://github.com/rust-lang/crates.io-index"
1694 + checksum = "300e883d756b2e4ec94e02791f39b04b522276138852cfc41d9fb7e904106099"
1695 + dependencies = [
1696 + "cfg-if",
1697 + "js-sys",
1698 + "libc",
1699 + "r-efi 6.0.0",
1700 + "rand_core 0.10.1",
1701 + "wasm-bindgen",
1702 + ]
1703 +
1704 + [[package]]
1623 1705 name = "ghash"
1624 1706 version = "0.5.1"
1625 1707 source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -2374,6 +2456,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
2374 2456 checksum = "8eaf4bc02d17cbdd7ff4c7438cafcdf7fb9a4613313ad11b4f8fefe7d3fa0130"
2375 2457
2376 2458 [[package]]
2459 + name = "jobserver"
2460 + version = "0.1.35"
2461 + source = "registry+https://github.com/rust-lang/crates.io-index"
2462 + checksum = "1c00acbd29eabad4a2392fa0e921c874934dbbf4194312ad20f04a0ed67a3cb3"
2463 + dependencies = [
2464 + "getrandom 0.4.3",
2465 + "libc",
2466 + ]
2467 +
2468 + [[package]]
2377 2469 name = "js-sys"
2378 2470 version = "0.3.85"
2379 2471 source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -2593,6 +2685,12 @@ dependencies = [
2593 2685 ]
2594 2686
2595 2687 [[package]]
2688 + name = "lru-slab"
2689 + version = "0.1.2"
2690 + source = "registry+https://github.com/rust-lang/crates.io-index"
2691 + checksum = "112b39cec0b298b6c1999fee3e31427f74f676e4cb9879ed1a121b43661a4154"
2692 +
2693 + [[package]]
2596 2694 name = "mac"
2597 2695 version = "0.1.1"
2598 2696 source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -3671,7 +3769,7 @@ version = "0.8.0"
3671 3769 source = "registry+https://github.com/rust-lang/crates.io-index"
3672 3770 checksum = "8159bd90725d2df49889a078b54f4f79e87f1f8a8444194cdca81d38f5393abf"
3673 3771 dependencies = [
3674 - "cpufeatures",
3772 + "cpufeatures 0.2.17",
3675 3773 "opaque-debug",
3676 3774 "universal-hash",
3677 3775 ]
@@ -3683,7 +3781,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
3683 3781 checksum = "9d1fe60d06143b2430aa532c94cfe9e29783047f06c0d7fd359a9a51b729fa25"
3684 3782 dependencies = [
3685 3783 "cfg-if",
3686 - "cpufeatures",
3784 + "cpufeatures 0.2.17",
3687 3785 "opaque-debug",
3688 3786 "universal-hash",
3689 3787 ]
@@ -3858,6 +3956,63 @@ dependencies = [
3858 3956 ]
3859 3957
3860 3958 [[package]]
3959 + name = "quinn"
3960 + version = "0.11.11"
3961 + source = "registry+https://github.com/rust-lang/crates.io-index"
3962 + checksum = "0c1a41e437b6bbd489372cd4971de128e85c855f56c57f283d20ff016cf7c0a8"
3963 + dependencies = [
3964 + "bytes",
3965 + "cfg_aliases",
3966 + "pin-project-lite",
3967 + "quinn-proto",
3968 + "quinn-udp",
3969 + "rustc-hash",
3970 + "rustls",
3971 + "socket2 0.6.2",
3972 + "thiserror 2.0.18",
3973 + "tokio",
3974 + "tracing",
3975 + "web-time",
3976 + ]
3977 +
3978 + [[package]]
3979 + name = "quinn-proto"
3980 + version = "0.11.16"
3981 + source = "registry+https://github.com/rust-lang/crates.io-index"
3982 + checksum = "2f4bfc015262b9df63c8845072ce59068853ff5872180c2ce2f13038b970e560"
3983 + dependencies = [
3984 + "aws-lc-rs",
3985 + "bytes",
3986 + "getrandom 0.4.3",
3987 + "lru-slab",
3988 + "rand 0.10.2",
3989 + "rand_pcg 0.10.2",
3990 + "ring",
3991 + "rustc-hash",
3992 + "rustls",
3993 + "rustls-pki-types",
3994 + "slab",
3995 + "thiserror 2.0.18",
3996 + "tinyvec",
3997 + "tracing",
3998 + "web-time",
3999 + ]
4000 +
4001 + [[package]]
4002 + name = "quinn-udp"
4003 + version = "0.5.15"
4004 + source = "registry+https://github.com/rust-lang/crates.io-index"
4005 + checksum = "35a133f956daabe89a61a685c2649f13d82d5aa4bd5d12d1277e1072a21c0694"
4006 + dependencies = [
4007 + "cfg_aliases",
4008 + "libc",
4009 + "once_cell",
4010 + "socket2 0.6.2",
4011 + "tracing",
4012 + "windows-sys 0.61.2",
4013 + ]
4014 +
4015 + [[package]]
3861 4016 name = "quote"
3862 4017 version = "1.0.44"
3863 4018 source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -3873,6 +4028,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
3873 4028 checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f"
3874 4029
3875 4030 [[package]]
4031 + name = "r-efi"
4032 + version = "6.0.0"
4033 + source = "registry+https://github.com/rust-lang/crates.io-index"
4034 + checksum = "f8dcc9c7d52a811697d2151c701e0d08956f92b0e24136cf4cf27b57a6a0d9bf"
4035 +
4036 + [[package]]
3876 4037 name = "rand"
3877 4038 version = "0.7.3"
3878 4039 source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -3883,7 +4044,7 @@ dependencies = [
3883 4044 "rand_chacha 0.2.2",
3884 4045 "rand_core 0.5.1",
3885 4046 "rand_hc",
3886 - "rand_pcg",
4047 + "rand_pcg 0.2.1",
3887 4048 ]
3888 4049
3889 4050 [[package]]
@@ -3899,12 +4060,13 @@ dependencies = [
3899 4060
3900 4061 [[package]]
3901 4062 name = "rand"
3902 - version = "0.9.4"
4063 + version = "0.10.2"
3903 4064 source = "registry+https://github.com/rust-lang/crates.io-index"
3904 - checksum = "44c5af06bb1b7d3216d91932aed5265164bf384dc89cd6ba05cf59a35f5f76ea"
4065 + checksum = "c7f5fa3a058cd35567ef9bfa5e75732bee0f9e4c55fa90477bef2dfcdbc4be80"
3905 4066 dependencies = [
3906 - "rand_chacha 0.9.0",
3907 - "rand_core 0.9.5",
4067 + "chacha20 0.10.1",
4068 + "getrandom 0.4.3",
4069 + "rand_core 0.10.1",
3908 4070 ]
3909 4071
3910 4072 [[package]]
@@ -3928,16 +4090,6 @@ dependencies = [
3928 4090 ]
3929 4091
3930 4092 [[package]]
3931 - name = "rand_chacha"
3932 - version = "0.9.0"
3933 - source = "registry+https://github.com/rust-lang/crates.io-index"
3934 - checksum = "d3022b5f1df60f26e1ffddd6c66e8aa15de382ae63b3a0c1bfc0e4d3e3f325cb"
3935 - dependencies = [
3936 - "ppv-lite86",
3937 - "rand_core 0.9.5",
3938 - ]
3939 -
3940 - [[package]]
3941 4093 name = "rand_core"
3942 4094 version = "0.5.1"
3943 4095 source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -3957,12 +4109,9 @@ dependencies = [
3957 4109
3958 4110 [[package]]
3959 4111 name = "rand_core"
3960 - version = "0.9.5"
4112 + version = "0.10.1"
3961 4113 source = "registry+https://github.com/rust-lang/crates.io-index"
3962 - checksum = "76afc826de14238e6e8c374ddcc1fa19e374fd8dd986b0d2af0d02377261d83c"
3963 - dependencies = [
3964 - "getrandom 0.3.4",
3965 - ]
4114 + checksum = "63b8176103e19a2643978565ca18b50549f6101881c443590420e4dc998a3c69"
3966 4115
3967 4116 [[package]]
3968 4117 name = "rand_hc"
@@ -3983,6 +4132,15 @@ dependencies = [
3983 4132 ]
3984 4133
3985 4134 [[package]]
4135 + name = "rand_pcg"
4136 + version = "0.10.2"
4137 + source = "registry+https://github.com/rust-lang/crates.io-index"
4138 + checksum = "caa0f4137e1c0a72f4c651489402276c8e8e1cf081f3b0ba156d2cbeef09e86a"
4139 + dependencies = [
4140 + "rand_core 0.10.1",
4141 + ]
4142 +
4143 + [[package]]
3986 4144 name = "raw-window-handle"
3987 4145 version = "0.6.2"
3988 4146 source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -4082,9 +4240,9 @@ checksum = "a96887878f22d7bad8a3b6dc5b7440e0ada9a245242924394987b21cf2210a4c"
4082 4240
4083 4241 [[package]]
4084 4242 name = "reqwest"
4085 - version = "0.12.28"
4243 + version = "0.13.2"
4086 4244 source = "registry+https://github.com/rust-lang/crates.io-index"
4087 - checksum = "eddd3ca559203180a307f12d114c268abf583f59b03cb906fd0b3ff8646c1147"
4245 + checksum = "ab3f43e3283ab1488b624b44b0e988d0acea0b3214e694730a055cb6b2efa801"
4088 4246 dependencies = [
4089 4247 "base64 0.22.1",
4090 4248 "bytes",
@@ -4105,51 +4263,16 @@ dependencies = [
4105 4263 "native-tls",
4106 4264 "percent-encoding",
4107 4265 "pin-project-lite",
4108 - "rustls-pki-types",
4109 - "serde",
4110 - "serde_json",
4111 - "serde_urlencoded",
4112 - "sync_wrapper",
4113 - "tokio",
4114 - "tokio-native-tls",
4115 - "tokio-util",
4116 - "tower",
4117 - "tower-http",
4118 - "tower-service",
4119 - "url",
4120 - "wasm-bindgen",
4121 - "wasm-bindgen-futures",
4122 - "wasm-streams 0.4.2",
4123 - "web-sys",
4124 - ]
4125 -
4126 - [[package]]
4127 - name = "reqwest"
4128 - version = "0.13.2"
4129 - source = "registry+https://github.com/rust-lang/crates.io-index"
4130 - checksum = "ab3f43e3283ab1488b624b44b0e988d0acea0b3214e694730a055cb6b2efa801"
4131 - dependencies = [
4132 - "base64 0.22.1",
4133 - "bytes",
4134 - "futures-core",
4135 - "futures-util",
4136 - "http",
4137 - "http-body",
4138 - "http-body-util",
4139 - "hyper",
4140 - "hyper-rustls",
4141 - "hyper-util",
4142 - "js-sys",
4143 - "log",
4144 - "percent-encoding",
4145 - "pin-project-lite",
4266 + "quinn",
4146 4267 "rustls",
4147 4268 "rustls-pki-types",
4148 4269 "rustls-platform-verifier",
4149 4270 "serde",
4150 4271 "serde_json",
4272 + "serde_urlencoded",
4151 4273 "sync_wrapper",
4152 4274 "tokio",
4275 + "tokio-native-tls",
4153 4276 "tokio-rustls",
4154 4277 "tokio-util",
4155 4278 "tower",
@@ -4158,7 +4281,7 @@ dependencies = [
4158 4281 "url",
4159 4282 "wasm-bindgen",
4160 4283 "wasm-bindgen-futures",
4161 - "wasm-streams 0.5.0",
4284 + "wasm-streams",
4162 4285 "web-sys",
4163 4286 ]
4164 4287
@@ -4307,6 +4430,7 @@ version = "0.23.36"
4307 4430 source = "registry+https://github.com/rust-lang/crates.io-index"
4308 4431 checksum = "c665f33d38cea657d9614f766881e4d510e0eda4239891eea56b4cadcf01801b"
4309 4432 dependencies = [
4433 + "aws-lc-rs",
4310 4434 "log",
4311 4435 "once_cell",
4312 4436 "ring",
@@ -4334,6 +4458,7 @@ version = "1.14.0"
4334 4458 source = "registry+https://github.com/rust-lang/crates.io-index"
4335 4459 checksum = "be040f8b0a225e40375822a563fa9524378b9d63112f53e19ffff34df5d33fdd"
4336 4460 dependencies = [
4461 + "web-time",
4337 4462 "zeroize",
4338 4463 ]
4339 4464
@@ -4370,6 +4495,7 @@ version = "0.103.10"
4370 4495 source = "registry+https://github.com/rust-lang/crates.io-index"
4371 4496 checksum = "df33b2b81ac578cabaf06b89b0631153a3f416b0a886e8a7a1707fb51abbd1ef"
4372 4497 dependencies = [
4498 + "aws-lc-rs",
4373 4499 "ring",
4374 4500 "rustls-pki-types",
4375 4501 "untrusted",
@@ -4776,7 +4902,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
4776 4902 checksum = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba"
4777 4903 dependencies = [
4778 4904 "cfg-if",
4779 - "cpufeatures",
4905 + "cpufeatures 0.2.17",
4780 4906 "digest",
4781 4907 ]
4782 4908
@@ -4787,7 +4913,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
4787 4913 checksum = "a7507d819769d01a365ab707794a4084392c824f54a7a6a7862f8c3d0892b283"
4788 4914 dependencies = [
4789 4915 "cfg-if",
4790 - "cpufeatures",
4916 + "cpufeatures 0.2.17",
4791 4917 "digest",
4792 4918 ]
4793 4919
@@ -5341,8 +5467,8 @@ dependencies = [
5341 5467 "chrono",
5342 5468 "keyring",
5343 5469 "parking_lot",
5344 - "rand 0.9.4",
5345 - "reqwest 0.12.28",
5470 + "rand 0.10.2",
5471 + "reqwest",
5346 5472 "rusqlite",
5347 5473 "serde",
5348 5474 "serde_json",
@@ -5504,7 +5630,7 @@ dependencies = [
5504 5630 "percent-encoding",
5505 5631 "plist",
5506 5632 "raw-window-handle",
5507 - "reqwest 0.13.2",
5633 + "reqwest",
Lines truncated
M Cargo.toml +1 -1
@@ -34,7 +34,7 @@ roxmltree = "0.21"
34 34 # Encryption
35 35 aes-gcm = "0.10"
36 36 base64 = "0.22"
37 - rand = "0.8"
37 + rand = "0.10"
38 38
39 39 # Keychain access
40 40 keyring = { version = "3", features = ["apple-native", "linux-native", "windows-native"] }
@@ -12,7 +12,7 @@ use aes_gcm::{AeadCore, Aes256Gcm, KeyInit};
12 12 use base64::engine::general_purpose::STANDARD as BASE64;
13 13 use base64::Engine;
14 14 use bb_interface::{ConfigFieldType, ConfigSchema};
15 - use rand::RngCore;
15 + use rand::Rng;
16 16 use std::path::Path;
17 17 use zeroize::Zeroizing;
18 18
@@ -24,7 +24,7 @@ pub type EncryptionKey = Zeroizing<[u8; 32]>;
24 24 /// Generate a random 256-bit encryption key.
25 25 fn generate_key() -> EncryptionKey {
26 26 let mut key = Zeroizing::new([0u8; 32]);
27 - rand::thread_rng().fill_bytes(key.as_mut());
27 + rand::rng().fill_bytes(key.as_mut());
28 28 key
29 29 }
30 30
@@ -69,10 +69,10 @@ pub struct SyncSettingsInput {
69 69 fn generate_code_verifier() -> String {
70 70 use base64::engine::general_purpose::URL_SAFE_NO_PAD;
71 71 use base64::Engine;
72 - use rand::RngCore;
72 + use rand::Rng;
73 73
74 74 let mut bytes = [0u8; 32];
75 - rand::thread_rng().fill_bytes(&mut bytes);
75 + rand::rng().fill_bytes(&mut bytes);
76 76 URL_SAFE_NO_PAD.encode(bytes)
77 77 }
78 78
@@ -88,10 +88,10 @@ fn generate_code_challenge(verifier: &str) -> String {
88 88 fn generate_state() -> String {
89 89 use base64::engine::general_purpose::URL_SAFE_NO_PAD;
90 90 use base64::Engine;
91 - use rand::RngCore;
91 + use rand::Rng;
92 92
93 93 let mut bytes = [0u8; 16];
94 - rand::thread_rng().fill_bytes(&mut bytes);
94 + rand::rng().fill_bytes(&mut bytes);
95 95 URL_SAFE_NO_PAD.encode(bytes)
96 96 }
97 97