mirror of
https://github.com/openai/codex.git
synced 2026-11-13 21:30:47 +00:00
Upgrade the Rust toolchain to 1.99.1 (#61205)
## What changed - Update the workspace, Bazel toolchain and lockfile, CI and release workflows, and Windows setup script from Rust `1.95.0` to `1.99.1`. - Adapt Rust code to the updated toolchain and Clippy lints, including `try_update` for atomics, `as_chunks` for fixed-size slices, and targeted allowances for generated tonic services. - Refresh the halfwidth sound mark rendering snapshot to use literal characters in debug output. GitOrigin-RevId: 5852029f687436dc814c2bca68141ee1f4a67d49
This commit is contained in:
@@ -444,7 +444,9 @@ fn sha256_digest_arg(flag_name: &str, value: &str) -> anyhow::Result<[u8; 32]> {
|
||||
}
|
||||
|
||||
let mut digest = [0u8; 32];
|
||||
for (index, pair) in trimmed.as_bytes().chunks_exact(2).enumerate() {
|
||||
const HEX_DIGITS_PER_BYTE: usize = 2;
|
||||
let (pairs, _) = trimmed.as_bytes().as_chunks::<HEX_DIGITS_PER_BYTE>();
|
||||
for (index, pair) in pairs.iter().enumerate() {
|
||||
let high = hex_nibble(flag_name, pair[0])?;
|
||||
let low = hex_nibble(flag_name, pair[1])?;
|
||||
digest[index] = (high << 4) | low;
|
||||
|
||||
Reference in New Issue
Block a user