rustdoc: render 1-tuples as (T,) instead of (T)
This commit is contained in:
parent
aeab2501d1
commit
3d2fd5ec03
1 changed files with 4 additions and 1 deletions
|
|
@ -428,7 +428,10 @@ impl fmt::Show for clean::Type {
|
|||
}
|
||||
clean::Tuple(ref typs) => {
|
||||
primitive_link(f, clean::PrimitiveTuple,
|
||||
format!("({:#})", typs).as_slice())
|
||||
match typs.as_slice() {
|
||||
[ref one] => format!("({},)", one),
|
||||
many => format!("({:#})", many)
|
||||
}.as_slice())
|
||||
}
|
||||
clean::Vector(ref t) => {
|
||||
primitive_link(f, clean::Slice, format!("[{}]", **t).as_slice())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue