Skip to content

Commit 717c5d4

Browse files
sionsmithclaude
andcommitted
Fix type inference for rng.gen() on Windows
Explicit u8 type annotation needed for cross-platform compilation. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent ca631a4 commit 717c5d4

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/auth/auth_code_pkce.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ const REDIRECT_URI: &str = "http://localhost:8400/callback";
1616
fn generate_pkce() -> (String, String) {
1717
use rand::Rng;
1818
let mut rng = rand::thread_rng();
19-
let verifier_bytes: Vec<u8> = (0..32).map(|_| rng.gen()).collect();
19+
let verifier_bytes: Vec<u8> = (0..32).map(|_| rng.gen::<u8>()).collect();
2020
let verifier = URL_SAFE_NO_PAD.encode(&verifier_bytes);
2121

2222
let mut hasher = Sha256::new();
@@ -39,7 +39,7 @@ pub async fn authenticate(
3939
let state: String = {
4040
use rand::Rng;
4141
let mut rng = rand::thread_rng();
42-
let bytes: Vec<u8> = (0..16).map(|_| rng.gen()).collect();
42+
let bytes: Vec<u8> = (0..16).map(|_| rng.gen::<u8>()).collect();
4343
URL_SAFE_NO_PAD.encode(&bytes)
4444
};
4545

0 commit comments

Comments
 (0)