If remove end attribute from fn fibonacci, it always match Silent although there is start attribute. Is this example working properly or it's the expected behavior?
I'm expecting if only specify start attribute, it should match EzTraceArgs::Start
#[derive(AttrArgs)]
enum EzTraceArgs {
StartAndEnd { start: String, end: String },
Start { start: String },
End { end: String },
Silent,
}
#[ez_trace(start = "{name}({args})")]
fn fibonacci(n: u32) -> u32 {
if n == 0 || n == 1 {
n
} else {
fibonacci(n - 1) + fibonacci(n - 2)
}
}
If remove
endattribute fromfn fibonacci, it always matchSilentalthough there isstartattribute. Is this example working properly or it's the expected behavior?I'm expecting if only specify
startattribute, it should matchEzTraceArgs::Start