]> git.lizzy.rs Git - rust.git/commitdiff
Remove trailing whitespace for fn types /w non-unit return
authorMarcus Klaas <mail@marcusklaas.nl>
Sun, 27 Mar 2016 18:20:51 +0000 (20:20 +0200)
committerMarcus Klaas <mail@marcusklaas.nl>
Sun, 27 Mar 2016 18:40:23 +0000 (20:40 +0200)
src/types.rs
tests/source/type_alias.rs
tests/target/type_alias.rs

index 7ac4bd1c6747cd9b0567ad07a5158fabfa00d6f6..5a8e456bedba46523bbf523af57d836704cdeff4 100644 (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()
index e4429bb8ddf1f53753af864c15098cdf1efae465..93e155534ecac0f79522ed1fbab203bc196ec9b6 100644 (file)
@@ -25,3 +25,5 @@
 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);
index d175aa60a6740166252fafa40d4ee43f8d7f6c1a..16c77b273c1fa05cc26790b3f9e17d8403da9b10 100644 (file)
@@ -49,3 +49,7 @@
 
 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);