Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Raphaël Gomès
micro-timer
Commits
bdca8bc20819
Commit
d61f640b
authored
Feb 27, 2020
by
Raphaël Gomès
Browse files
Add contract that `log` is an export from the client crate
parent
011cdfa0cfa0
Changes
3
Show whitespace changes
Inline
Side-by-side
Cargo.toml
View file @
bdca8bc2
...
...
@@ -10,4 +10,6 @@ proc-macro = true
[dependencies]
syn
=
{
version
=
"1.0.16"
,
features
=
[
"full"
,
"extra-traits"
]}
quote
=
"1.0.2"
[dev-dependencies]
log
=
"0.4.8"
\ No newline at end of file
src/lib.rs
View file @
bdca8bc2
...
...
@@ -34,8 +34,8 @@ pub fn timed(_attr_ts: TokenStream, fn_ts: TokenStream) -> TokenStream {
let
mut
inner
=
||
{
#
inner_block
};
let
ret
=
inner
();
log
::
trace!
(
"
Elapsed
{}: {:?}"
,
crate
::
log
::
trace!
(
"
Duration of `
{}
`
: {:?}"
,
#
original_func_name
,
timer
.elapsed
()
);
...
...
tests/tests.rs
View file @
bdca8bc2
use
log
;
use
micro_timer
::
timed
;
use
std
::
time
::
Duration
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment