fix: add --all to cargo fmt in script/test and autoformat codebase
cargo fmt without --all fails with "Failed to find targets" in workspace repos. This was blocking every story's gates. Also ran cargo fmt --all to fix all existing formatting issues. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -67,14 +67,21 @@ fn compute_code_challenge(verifier: &str) -> String {
|
||||
/// Base64url-encode without padding (RFC 7636).
|
||||
fn base64url_encode(data: &[u8]) -> String {
|
||||
// Standard base64 then convert to base64url
|
||||
const CHARS: &[u8] =
|
||||
b"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
||||
const CHARS: &[u8] = b"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
||||
let mut result = String::new();
|
||||
let mut i = 0;
|
||||
while i < data.len() {
|
||||
let b0 = data[i] as u32;
|
||||
let b1 = if i + 1 < data.len() { data[i + 1] as u32 } else { 0 };
|
||||
let b2 = if i + 2 < data.len() { data[i + 2] as u32 } else { 0 };
|
||||
let b1 = if i + 1 < data.len() {
|
||||
data[i + 1] as u32
|
||||
} else {
|
||||
0
|
||||
};
|
||||
let b2 = if i + 2 < data.len() {
|
||||
data[i + 2] as u32
|
||||
} else {
|
||||
0
|
||||
};
|
||||
let triple = (b0 << 16) | (b1 << 8) | b2;
|
||||
|
||||
result.push(CHARS[((triple >> 18) & 0x3F) as usize] as char);
|
||||
@@ -238,7 +245,11 @@ pub async fn oauth_callback(
|
||||
let status = resp.status();
|
||||
let body = resp.text().await.unwrap_or_default();
|
||||
|
||||
slog!("[oauth] Token exchange response (HTTP {}): {}", status, body);
|
||||
slog!(
|
||||
"[oauth] Token exchange response (HTTP {}): {}",
|
||||
status,
|
||||
body
|
||||
);
|
||||
|
||||
if !status.is_success() {
|
||||
return html_response(
|
||||
|
||||
Reference in New Issue
Block a user