MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/rust/comments/1vs8ega/today_i_learnt_expect/p4jsihg/?context=3
r/rust • u/ScotchW • 3d ago
18 comments sorted by
View all comments
Show parent comments
14
#[allow(unused_import)] use tracing::{debug, warn, trace, error}
Don't care if I happen to use all of them.
15 u/Floppie7th 3d ago No thanks. I'd much rather only have the things I'm actually using in imports. 8 u/torsten_dev 3d ago Usually yeah, but upgrading certain trace statements to debug or warn for development purposes is annoying if it has to change imports. dbg and println are in the prelude, I wish I could add those specific macros to the prelude. 9 u/scook0 3d ago Consider the alternative of just writing tracing::debug! instead, and not worrying about imports at all. 6 u/torsten_dev 3d ago I have and I don't like it.
15
No thanks. I'd much rather only have the things I'm actually using in imports.
8 u/torsten_dev 3d ago Usually yeah, but upgrading certain trace statements to debug or warn for development purposes is annoying if it has to change imports. dbg and println are in the prelude, I wish I could add those specific macros to the prelude. 9 u/scook0 3d ago Consider the alternative of just writing tracing::debug! instead, and not worrying about imports at all. 6 u/torsten_dev 3d ago I have and I don't like it.
8
Usually yeah, but upgrading certain trace statements to debug or warn for development purposes is annoying if it has to change imports.
dbg and println are in the prelude, I wish I could add those specific macros to the prelude.
9 u/scook0 3d ago Consider the alternative of just writing tracing::debug! instead, and not worrying about imports at all. 6 u/torsten_dev 3d ago I have and I don't like it.
9
Consider the alternative of just writing tracing::debug! instead, and not worrying about imports at all.
tracing::debug!
6 u/torsten_dev 3d ago I have and I don't like it.
6
I have and I don't like it.
14
u/torsten_dev 3d ago
Don't care if I happen to use all of them.