I have been trying to make rustfmt
stop putting macro arguments on separate lines.
I have checked the manual but didn't find anything.
I added a call to rustfmt
to my build process in order to force a common coding style.
I'm using a logging library which provides macros for different log levels and I would like to make their calls one-liners in order to stop expanding the code for simple log-calls.
Currently the call:
error!("{} failed to so something {}: {}", &something, &reason.get_exact_reason(), ¶m.do_something());
will be reformatted to:
error!(
"{} failed to so something {}: {}",
&something,
&reason.get_exact_reason(),
¶m.do_something()
);
which unnecessarily adds many lines of code if I want to make multiple logs in one function.
While I understand that reformatting the code in this way for normal function calls would make sense to improve readability, I don't think its necessary for something like log-calls.
Does anybody know how to do this?
Increasing max_width
didn't help and would not necessarily be a good approach anyway, I think.