mirror of
https://github.com/openai/codex.git
synced 2026-11-15 21:50:46 +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:
@@ -16,12 +16,8 @@ fn microphone_selection_excludes_playback_channels() {
|
||||
plugged_in[3] = 0.7;
|
||||
let mut unplugged = plugged_in;
|
||||
unplugged[0] = 0.0;
|
||||
let interleaved = [plugged_in, unplugged].concat();
|
||||
let captured: Vec<_> = interleaved
|
||||
.chunks_exact(/*chunk_size*/ 16)
|
||||
.map(|frame| source.sample(frame))
|
||||
.collect();
|
||||
assert_eq!(captured, vec![0.25, 0.0]);
|
||||
let captured = [source.sample(&plugged_in), source.sample(&unplugged)];
|
||||
assert_eq!(captured, [0.25, 0.0]);
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
||||
@@ -67,8 +67,8 @@ impl PlaybackWriter {
|
||||
at: Instant::now(),
|
||||
generation: self.epoch,
|
||||
};
|
||||
for (sample, bytes) in frame.samples.iter_mut().zip(bytes.chunks_exact(4)) {
|
||||
*sample = f32::from_le_bytes(bytes.try_into().map_err(|_| "invalid speaker buffer")?);
|
||||
for (sample, bytes) in frame.samples.iter_mut().zip(bytes.as_chunks().0) {
|
||||
*sample = f32::from_le_bytes(*bytes);
|
||||
if !sample.is_finite() {
|
||||
return Err("invalid speaker sample");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user