Format everything and add rustfmt to travis (#951)

* Format everything and add rustfmt to travis

* Remove extern crate winit from examples and add force_multiline_blocks

* Format the code properly

* Fix inconsistent period in PULL_REQUEST_TEMPLATE.md

* Only run rustfmt on nightly

* Travis fixings
This commit is contained in:
Osspial 2019-06-21 11:33:15 -04:00 committed by GitHub
parent b1b5aefc4b
commit e2c84725de
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
109 changed files with 4787 additions and 3679 deletions

View file

@ -2,9 +2,11 @@
use std::os::raw::c_void;
use crate::dpi::LogicalSize;
use crate::monitor::MonitorHandle;
use crate::window::{Window, WindowBuilder};
use crate::{
dpi::LogicalSize,
monitor::MonitorHandle,
window::{Window, WindowBuilder},
};
/// Additional methods on `Window` that are specific to MacOS.
pub trait WindowExtMacOS {
@ -97,7 +99,8 @@ pub trait WindowBuilderExtMacOS {
/// Sets the activation policy for the window being built.
fn with_activation_policy(self, activation_policy: ActivationPolicy) -> WindowBuilder;
/// Enables click-and-drag behavior for the entire window, not just the titlebar.
fn with_movable_by_window_background(self, movable_by_window_background: bool) -> WindowBuilder;
fn with_movable_by_window_background(self, movable_by_window_background: bool)
-> WindowBuilder;
/// Makes the titlebar transparent and allows the content to appear behind it.
fn with_titlebar_transparent(self, titlebar_transparent: bool) -> WindowBuilder;
/// Hides the window title.
@ -120,7 +123,10 @@ impl WindowBuilderExtMacOS for WindowBuilder {
}
#[inline]
fn with_movable_by_window_background(mut self, movable_by_window_background: bool) -> WindowBuilder {
fn with_movable_by_window_background(
mut self,
movable_by_window_background: bool,
) -> WindowBuilder {
self.platform_specific.movable_by_window_background = movable_by_window_background;
self
}