Merge pull request #885 from marcusklaas/empty-trait-type-params

Remove trailing whitespace for fn types /w non-unit return
This commit is contained in:
Nick Cameron 2016-03-29 08:17:52 +13:00
commit cfc9f70116
3 changed files with 7 additions and 1 deletions

View file

@ -268,7 +268,7 @@ fn format_function_type<'a, I>(inputs: I,
FunctionRetTy::Default(..) => String::new(),
};
let infix = if output.len() + list_str.len() > width {
let infix = if output.len() > 0 && output.len() + list_str.len() > width {
format!("\n{}", (offset - 1).to_string(context.config))
} else {
String::new()

View file

@ -25,3 +25,5 @@ pub type WithWhereClause<LONGPARAMETERNAME, T> where T: Clone, LONGPARAMETERNAME
pub type Exactly100CharstoEqualWhereTest<T, U, PARAMET> where T: Clone + Ord + Eq + SomeOtherTrait = Option<T>;
pub type Exactly101CharstoEqualWhereTest<T, U, PARAMETE> where T: Clone + Ord + Eq + SomeOtherTrait = Option<T>;
type RegisterPlugin = unsafe fn(pt: *const c_char, plugin: *mut c_void, data: *mut CallbackData);

View file

@ -49,3 +49,7 @@ pub type Exactly100CharstoEqualWhereTest<T, U, PARAMET> where T: Clone + Ord + E
pub type Exactly101CharstoEqualWhereTest<T, U, PARAMETE>
where T: Clone + Ord + Eq + SomeOtherTrait = Option<T>;
type RegisterPlugin = unsafe fn(pt: *const c_char,
plugin: *mut c_void,
data: *mut CallbackData);