From 2f81ae156c420356f09ab162fb5c70875706f4cd Mon Sep 17 00:00:00 2001 From: Erich Gubler Date: Sat, 21 Sep 2024 20:27:32 -0400 Subject: [PATCH] =?UTF-8?q?style:=20use=20`concat!(=E2=80=A6)`=20in=20`DOW?= =?UTF-8?q?NLEVEL=5F*=5FMESSAGE`=20(#6305)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- wgpu-core/src/lib.rs | 30 ++++++++++++++++++++---------- 1 file changed, 20 insertions(+), 10 deletions(-) diff --git a/wgpu-core/src/lib.rs b/wgpu-core/src/lib.rs index ccbe64d52..521238a7d 100644 --- a/wgpu-core/src/lib.rs +++ b/wgpu-core/src/lib.rs @@ -128,16 +128,26 @@ pub fn hal_label(opt: Option<&str>, flags: wgt::InstanceFlags) -> Option<&str> { opt } -const DOWNLEVEL_WARNING_MESSAGE: &str = "The underlying API or device in use does not \ -support enough features to be a fully compliant implementation of WebGPU. A subset of the features can still be used. \ -If you are running this program on native and not in a browser and wish to limit the features you use to the supported subset, \ -call Adapter::downlevel_properties or Device::downlevel_properties to get a listing of the features the current \ -platform supports."; -const DOWNLEVEL_ERROR_MESSAGE: &str = "This is not an invalid use of WebGPU: the underlying API or device does not \ -support enough features to be a fully compliant implementation. A subset of the features can still be used. \ -If you are running this program on native and not in a browser and wish to work around this issue, call \ -Adapter::downlevel_properties or Device::downlevel_properties to get a listing of the features the current \ -platform supports."; +const DOWNLEVEL_WARNING_MESSAGE: &str = concat!( + "The underlying API or device in use does not ", + "support enough features to be a fully compliant implementation of WebGPU. ", + "A subset of the features can still be used. ", + "If you are running this program on native and not in a browser and wish to limit ", + "the features you use to the supported subset, ", + "call Adapter::downlevel_properties or Device::downlevel_properties to get ", + "a listing of the features the current ", + "platform supports." +); + +const DOWNLEVEL_ERROR_MESSAGE: &str = concat!( + "This is not an invalid use of WebGPU: the underlying API or device does not ", + "support enough features to be a fully compliant implementation. ", + "A subset of the features can still be used. ", + "If you are running this program on native and not in a browser ", + "and wish to work around this issue, call ", + "Adapter::downlevel_properties or Device::downlevel_properties ", + "to get a listing of the features the current platform supports." +); #[cfg(feature = "api_log_info")] macro_rules! api_log {