mirror of
https://github.com/slint-ui/slint.git
synced 2025-08-04 18:58:36 +00:00
Mark all format-like macros for Clippy
See https://doc.rust-lang.org/nightly/clippy/attribs.html#clippyformat_args
This commit is contained in:
parent
fd0f6e822a
commit
6987de828c
3 changed files with 4 additions and 1 deletions
|
@ -131,6 +131,7 @@ pub fn print_to_console(env: Env, function: &str, arguments: core::fmt::Argument
|
|||
}
|
||||
|
||||
#[macro_export]
|
||||
#[clippy::format_args]
|
||||
macro_rules! console_err {
|
||||
($env:expr, $($t:tt)*) => ($crate::print_to_console($env, "error", format_args!($($t)*)))
|
||||
}
|
||||
|
|
|
@ -19,6 +19,7 @@ use core::ops::Deref;
|
|||
/// assert_eq!(s, slint::SharedString::from("Hello world"));
|
||||
/// ```
|
||||
#[macro_export]
|
||||
#[clippy::format_args]
|
||||
macro_rules! format {
|
||||
($($arg:tt)*) => {{
|
||||
$crate::string::format(core::format_args!($($arg)*))
|
||||
|
|
|
@ -117,9 +117,10 @@ pub fn default_debug_log(_arguments: core::fmt::Arguments) {
|
|||
}
|
||||
}
|
||||
|
||||
#[macro_export]
|
||||
/// This macro allows producing debug output that will appear on stderr in regular builds
|
||||
/// and in the console log for wasm builds.
|
||||
#[macro_export]
|
||||
#[clippy::format_args]
|
||||
macro_rules! debug_log {
|
||||
($($t:tt)*) => ($crate::tests::debug_log_impl(format_args!($($t)*)))
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue