aclysma / profiling

Provides a very thin abstraction over instrumented profiling crates like puffin, optick, tracy, and superluminal-perf.
Apache License 2.0
323 stars 39 forks source link

WIP: Don't add additional scope when profile is not enabled #76

Open gwen-lg opened 1 month ago

gwen-lg commented 1 month ago

The additional scope break some clippy lint detection (like missing_errors_doc) This Fix #75

WIP: the change affect only when no profiling instrumentation is enabled. But if the puffin (by example) instrumentation is enabled, the problem is here again. And when I have tried remove the additional brace too in impl_block of profile-with-puffin, the macro failed with :

error: custom attribute panicked
 --> profiling/examples/simple.rs:8:1
  |
8 | #[profiling::all_functions]
  | ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  |
  = help: message: expected curly braces