Bump rust toolchain to 1.92 (current stable) (#6356)

This commit is contained in:
Jack Amadeo
2026-01-06 14:13:20 -05:00
committed by GitHub
parent 7be90cdacc
commit fb1d3dfd3d
27 changed files with 38 additions and 80 deletions
@@ -1,5 +1,8 @@
#[cfg(target_os = "linux")]
mod linux;
#[cfg(target_os = "macos")]
mod macos;
#[cfg(target_os = "windows")]
mod windows;
#[cfg(target_os = "windows")]
@@ -184,9 +184,8 @@ new file mode 100644
// mpatch may add a trailing newline
let content = std::fs::read_to_string(&file_path).unwrap();
assert!(content == "different\ncontent" || content == "different\ncontent\n");
} else {
} else if let Err(err) = result {
// Or it might return an error
let err = result.unwrap_err();
assert!(
err.message.contains("diff")
|| err.message.contains("version")
@@ -213,8 +212,7 @@ new file mode 100644
// The behavior might be different with patcher - it might create the file
// or it might fail. Let's check what happens.
if result.is_err() {
let err = result.unwrap_err();
if let Err(err) = result {
// Could be "Failed to read" or similar
assert!(err.message.contains("Failed") || err.message.contains("exist"));
} else {
@@ -483,7 +483,7 @@ pub fn format_file_content(
};
let language = lang::get_language_identifier(path);
if view_range.is_some() {
if let Some((start, end)) = view_range {
formatdoc! {"
### {path} (lines {start}-{end})
```{language}
@@ -491,8 +491,8 @@ pub fn format_file_content(
```
",
path=path.display(),
start=view_range.unwrap().0,
end=if view_range.unwrap().1 == -1 { "end".to_string() } else { view_range.unwrap().1.to_string() },
start=start,
end=if end == -1 { "end".to_string() } else { end.to_string() },
language=language,
content=display_content,
}