Commit 623b6af0 authored by Raphaël Gomès's avatar Raphaël Gomès
Browse files

Version 0.2.1

Documentation and comment fixes
parent a38af0076ed2
......@@ -37,16 +37,16 @@ dependencies = [
[[package]]
name = "micro-timer"
version = "0.2.0"
version = "0.2.1"
dependencies = [
"log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)",
"micro-timer-macros 0.2.0",
"micro-timer-macros 0.2.1",
"scopeguard 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "micro-timer-macros"
version = "0.2.0"
version = "0.2.1"
dependencies = [
"log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)",
"pretty_assertions 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)",
......
......@@ -5,7 +5,7 @@ name = "micro-timer"
description = "Dumb tiny logging timer"
license-file = "LICENCE"
readme = "README.md"
version = "0.2.0"
version = "0.2.1"
authors = ["Raphaël Gomès <rgomes@octobus.net>"]
edition = "2018"
homepage = "https://heptapod.octobus.net/Alphare/micro-timer"
......
......@@ -8,7 +8,7 @@ In ``Cargo.toml``:
```toml
[dependencies]
micro-timer = "0.1.2"
micro-timer = "0.2.1"
log = "0.4.8"
```
......
......@@ -3,7 +3,7 @@ name = "micro-timer-macros"
description = "Macros for the micro-timer crate"
license-file = "LICENCE"
readme = "README.md"
version = "0.2.0"
version = "0.2.1"
authors = ["Raphaël Gomès <rgomes@octobus.net>"]
edition = "2018"
homepage = "https://heptapod.octobus.net/Alphare/micro-timer"
......
......@@ -45,9 +45,6 @@ fn inner_timed(_attr_ts: TokenStream, fn_ts: TokenStream) -> TokenStream {
.collect();
let span = outer.sig.ident.span();
// We use `__micro_timer_inner` as a name in case it pops up in error
// messages to make it obvious that it's an issue caused by this crate,
// it is not meant to prevent name collision.
let block = quote_spanned! {
span=>
{
......@@ -101,16 +98,17 @@ mod tests {
let expected: TokenStream = syn::parse_quote! {
fn my_super_function(_value: usize) -> usize {
let __micro_timer_instant = ::std::time::Instant::now();
::micro_timer::scopeguard::guard_on_success(
__micro_timer_instant,
|timer| {
crate::log::trace!(
"Duration of `{}`: {:?}",
"my_super_function",
timer.elapsed()
);
}
);
let __micro_timer_guard =
::micro_timer::scopeguard::guard_on_success(
__micro_timer_instant,
|timer| {
crate::log::trace!(
"Duration of `{}`: {:?}",
"my_super_function",
timer.elapsed()
);
}
);
let timer = 10;
timer
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment