Skip to content

Commit 2995e1b

Browse files
committed
Merge pull request #488 from marcusklaas/fn-arg-indents
Fix indentation for function arguments
2 parents d326a29 + 8e2a910 commit 2995e1b

File tree

3 files changed

+15
-1
lines changed

3 files changed

+15
-1
lines changed

src/items.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -481,7 +481,9 @@ impl<'a> FmtVisitor<'a> {
481481
let context = self.get_context();
482482
let mut arg_item_strs = try_opt!(args.iter()
483483
.map(|arg| {
484-
arg.rewrite(&context, multi_line_budget, indent)
484+
arg.rewrite(&context,
485+
multi_line_budget,
486+
arg_indent)
485487
})
486488
.collect::<Option<Vec<_>>>());
487489

tests/source/fn-simple.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,8 @@ pub fn http_fetch_async(listener:Box< AsyncCORSResponseListener+Send >, script_
2424
}
2525

2626
fn some_func<T:Box<Trait+Bound>>(val:T){}
27+
28+
fn zzzzzzzzzzzzzzzzzzzz<Type, NodeType>
29+
(selff: Type, mut handle: node::Handle<IdRef<'id, Node<K, V>>, Type, NodeType>)
30+
-> SearchStack<'a, K, V, Type, NodeType>{
31+
}

tests/target/fn-simple.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,3 +37,10 @@ pub fn http_fetch_async(listener: Box<AsyncCORSResponseListener + Send>,
3737

3838
fn some_func<T: Box<Trait + Bound>>(val: T) {
3939
}
40+
41+
fn zzzzzzzzzzzzzzzzzzzz<Type, NodeType>(selff: Type,
42+
mut handle: node::Handle<IdRef<'id, Node<K, V>>,
43+
Type,
44+
NodeType>)
45+
-> SearchStack<'a, K, V, Type, NodeType> {
46+
}

0 commit comments

Comments
 (0)