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:
@@ -262,10 +262,8 @@ fn render_windows_opaque_fallback(path_bytes: &[u8]) -> Option<String> {
|
||||
if !path_bytes.len().is_multiple_of(2) {
|
||||
return None;
|
||||
}
|
||||
let path_wide = path_bytes
|
||||
.chunks_exact(2)
|
||||
.map(|bytes| u16::from_le_bytes([bytes[0], bytes[1]]))
|
||||
.collect::<Vec<_>>();
|
||||
let (units, _) = path_bytes.as_chunks();
|
||||
let path_wide: Vec<_> = units.iter().copied().map(u16::from_le_bytes).collect();
|
||||
|
||||
// Windows absolute paths either have a rooted drive prefix (`C:\\`) or a
|
||||
// rooted namespace/UNC prefix (`\\server`, `\\.\\`, or `\\?\\`).
|
||||
|
||||
@@ -586,10 +586,8 @@ impl PathUri {
|
||||
let decoded_path = {
|
||||
use std::os::windows::ffi::OsStringExt;
|
||||
path_bytes.len().is_multiple_of(2).then(|| {
|
||||
let path_wide = path_bytes
|
||||
.chunks_exact(2)
|
||||
.map(|bytes| u16::from_le_bytes([bytes[0], bytes[1]]))
|
||||
.collect::<Vec<_>>();
|
||||
let (units, _) = path_bytes.as_chunks();
|
||||
let path_wide: Vec<_> = units.iter().copied().map(u16::from_le_bytes).collect();
|
||||
std::path::PathBuf::from(std::ffi::OsString::from_wide(&path_wide))
|
||||
})
|
||||
};
|
||||
@@ -818,9 +816,8 @@ fn infer_opaque_path_convention(path_bytes: &[u8]) -> Option<PathConvention> {
|
||||
return None;
|
||||
}
|
||||
|
||||
let mut path_wide = path_bytes
|
||||
.chunks_exact(2)
|
||||
.map(|bytes| u16::from_le_bytes([bytes[0], bytes[1]]));
|
||||
let (units, _) = path_bytes.as_chunks();
|
||||
let mut path_wide = units.iter().copied().map(u16::from_le_bytes);
|
||||
let first = path_wide.next()?;
|
||||
let second = path_wide.next()?;
|
||||
let has_drive = u8::try_from(first).is_ok_and(|drive| drive.is_ascii_alphabetic())
|
||||
|
||||
@@ -92,7 +92,7 @@ where
|
||||
.iter()
|
||||
.map(|spec| longest_suffix_prefix_len(pending, spec.open))
|
||||
.max()
|
||||
.map_or(0, std::convert::identity)
|
||||
.unwrap_or(0)
|
||||
}
|
||||
|
||||
fn push_visible_prefix(out: &mut StreamTextChunk<ExtractedInlineTag<T>>, pending: &str) {
|
||||
|
||||
Reference in New Issue
Block a user