Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: discard arguments in empty backend #87

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 13 additions & 4 deletions profiling/src/empty_impl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,13 @@
/// ```
#[macro_export]
macro_rules! scope {
($name:expr) => {};
($name:expr, $data:expr) => {};
($name:expr) => {
let _ = $name;
};
($name:expr, $data:expr) => {
let _ = $name;
let _ = $data;
};
}

/// Opens a scope automatically named after the current function.
Expand All @@ -31,7 +36,9 @@ macro_rules! scope {
#[macro_export]
macro_rules! function_scope {
() => {};
($data:expr) => {};
($data:expr) => {
let _ = $data;
};
}

/// Registers a thread with the profiler API(s). This is usually setting a name for the thread.
Expand All @@ -41,7 +48,9 @@ macro_rules! function_scope {
#[macro_export]
macro_rules! register_thread {
() => {};
($name:expr) => {};
($name:expr) => {
let _ = $name;
};
}

/// Finishes the frame. This isn't strictly necessary for some kinds of applications but a pretty
Expand Down
Loading