Skip to content

Commit 2b4765b

Browse files
committed
fix(gateway): annotate rng.gen as u8 for Windows inference
Signed-off-by: crimsonsunset <jsangio1@gmail.com>
1 parent 960c343 commit 2b4765b

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

crates/mcpmux-gateway/src/oauth/flow.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ impl OAuthFlow {
187187
fn generate_state() -> String {
188188
use rand::Rng;
189189
let mut rng = rand::thread_rng();
190-
let bytes: Vec<u8> = (0..16).map(|_| rng.gen()).collect();
190+
let bytes: Vec<u8> = (0..16).map(|_| rng.gen::<u8>()).collect();
191191
use base64::{engine::general_purpose::URL_SAFE_NO_PAD, Engine};
192192
URL_SAFE_NO_PAD.encode(&bytes)
193193
}

crates/mcpmux-gateway/src/oauth/pkce.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ impl PkceChallenge {
2222
pub fn generate() -> Self {
2323
// Generate 32 random bytes for the verifier
2424
let mut rng = rand::thread_rng();
25-
let random_bytes: Vec<u8> = (0..32).map(|_| rng.gen()).collect();
25+
let random_bytes: Vec<u8> = (0..32).map(|_| rng.gen::<u8>()).collect();
2626

2727
// Base64-URL encode to create verifier (43-128 characters)
2828
let verifier = URL_SAFE_NO_PAD.encode(&random_bytes);

0 commit comments

Comments
 (0)