Some(ref l) => {
let lifetime_str = try_opt!(l.rewrite(
context,
- Shape::legacy(usize::max_value(), Indent::empty()),
+ Shape::legacy(context.config.max_width(), Indent::empty()),
));
Some(format!("&{} {}self", lifetime_str, mut_str))
}
let mutability = explicit_self_mutability(&args[0]);
let type_str = try_opt!(ty.rewrite(
context,
- Shape::legacy(usize::max_value(), Indent::empty()),
+ Shape::legacy(context.config.max_width(), Indent::empty()),
));
Some(format!(
}
pub fn block_unindent(mut self, config: &Config) -> Indent {
- self.block_indent -= config.tab_spaces();
- self
+ if self.block_indent < config.tab_spaces() {
+ Indent::new(self.block_indent, 0)
+ } else {
+ self.block_indent -= config.tab_spaces();
+ self
+ }
}
pub fn width(&self) -> usize {