I'm trying to configure braces for fns to appear on the next line except when the function signature fits on a single line. Is this currently possible? Sorry if this is a duplicate; I looked around a bit and couldn't find anything.
Examples
Single line fn
/// Open brace on same line
fn thing_doer() -> Result<Thing, DoError> {
// ...
}
Multi-line
/// Open brace always comes on next line independent of return and where clause.
fn thing_doer<S>(
a: &str,
b: S
) -> Result<Thing, DoError>
where S: Into<Potato>
{
// ...
}
Edits
- Updated multi-line example formatting