🎨 Fit the helper's extension list and uuid test in rustfmt widths
rustfmt breaks the extension enumeration at the binding and an array literal past its 60-character width; the test names its non-hex argument instead.
This commit is contained in:
1 parent
a4a1a7ef4b
commit
669f26b71b
2 files changed
+4
-3
No files matched your search
@@ -536,8 +536,8 @@ pub(crate) fn shared_options(
|
||||
let mut options = rt::DeviceOptions::default();
|
||||
let (_, raw) = instance.raw();
|
||||
// SAFETY: the instance listed the device and is alive.
|
||||
let names = unsafe { raw.enumerate_device_extension_properties(physical.raw()) }
|
||||
.unwrap_or_default();
|
||||
let names =
|
||||
unsafe { raw.enumerate_device_extension_properties(physical.raw()) }.unwrap_or_default();
|
||||
let lists =
|
||||
|name: &std::ffi::CStr| (names.iter()).any(|p| p.extension_name_as_c_str() == Ok(name));
|
||||
let fences = crate::os::rt_present_fences(instance.extensions(), lists);
|
||||
|
||||
@@ -642,7 +642,8 @@ mod tests {
|
||||
assert_eq!(uuid_of(Some(OsStr::new(&named.to_uppercase()))), Ok(uuid));
|
||||
let short = &named[..30];
|
||||
let signed = format!("+{}", &named[1..]);
|
||||
for bad in ["", short, signed.as_str(), "zz9f8e7d6c5b4a39281706f5e4d3c2b1"] {
|
||||
let not_hex = format!("zz{}", &named[2..]);
|
||||
for bad in ["", short, signed.as_str(), not_hex.as_str()] {
|
||||
let refused = uuid_of(Some(OsStr::new(bad))).unwrap_err();
|
||||
assert!(refused.contains("names no deviceUUID"), "{bad}: {refused}");
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user