Use Rust 1.75 toolchain (#9437)

This commit is contained in:
Micha Reiser 2024-01-08 18:03:16 +01:00 committed by GitHub
parent ba71772d93
commit 94968fedd5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
17 changed files with 63 additions and 30 deletions

View file

@ -260,24 +260,6 @@ impl<'a> Escape for UnicodeEscape<'a> {
}
}
#[cfg(test)]
mod unicode_escape_tests {
use super::*;
#[test]
fn changed() {
fn test(s: &str) -> bool {
UnicodeEscape::new_repr(s).changed()
}
assert!(!test("hello"));
assert!(!test("'hello'"));
assert!(!test("\"hello\""));
assert!(test("'\"hello"));
assert!(test("hello\n"));
}
}
pub struct AsciiEscape<'a> {
source: &'a [u8],
layout: EscapeLayout,
@ -453,3 +435,21 @@ impl std::fmt::Display for BytesRepr<'_, '_> {
self.write(formatter)
}
}
#[cfg(test)]
mod unicode_escape_tests {
use super::*;
#[test]
fn changed() {
fn test(s: &str) -> bool {
UnicodeEscape::new_repr(s).changed()
}
assert!(!test("hello"));
assert!(!test("'hello'"));
assert!(!test("\"hello\""));
assert!(test("'\"hello"));
assert!(test("hello\n"));
}
}