From b0b93468d81ad9f45b6516e6c56a395de2a856d8 Mon Sep 17 00:00:00 2001 From: Sebastian Imlay Date: Sun, 14 Aug 2022 16:06:53 -0400 Subject: [PATCH] Fixed indents on feature flagged compiling of examples --- examples/browser/main.rs | 10 +++++----- examples/ios-beta/main.rs | 4 ++-- examples/webview_custom_protocol.rs | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/examples/browser/main.rs b/examples/browser/main.rs index 80d2785..4fa0325 100644 --- a/examples/browser/main.rs +++ b/examples/browser/main.rs @@ -73,7 +73,7 @@ impl Dispatcher for BasicApp { fn on_ui_message(&self, message: Self::Message) { let window = self.window.delegate.as_ref().unwrap(); -#[cfg(feature = "webview")] + #[cfg(feature = "webview")] { let webview = &window.content; @@ -100,7 +100,7 @@ impl WebViewDelegate for WebViewInstance {} struct AppWindow { toolbar: Toolbar, -#[cfg(feature = "webview")] + #[cfg(feature = "webview")] content: WebView } @@ -108,14 +108,14 @@ impl AppWindow { pub fn new() -> Self { AppWindow { toolbar: Toolbar::new("com.example.BrowserToolbar", BrowserToolbar::new()), -#[cfg(feature = "webview")] + #[cfg(feature = "webview")] content: WebView::with(WebViewConfig::default(), WebViewInstance::default()) } } pub fn load_url(&self, url: &str) { self.toolbar.delegate.as_ref().unwrap().set_url(url); -#[cfg(feature = "webview")] + #[cfg(feature = "webview")] self.content.load_url(url); } } @@ -129,7 +129,7 @@ impl WindowDelegate for AppWindow { window.set_minimum_content_size(400., 400.); window.set_toolbar(&self.toolbar); -#[cfg(feature = "webview")] + #[cfg(feature = "webview")] window.set_content_view(&self.content); self.load_url("https://www.duckduckgo.com/"); diff --git a/examples/ios-beta/main.rs b/examples/ios-beta/main.rs index af9cfb5..cc728a1 100644 --- a/examples/ios-beta/main.rs +++ b/examples/ios-beta/main.rs @@ -57,7 +57,7 @@ impl ViewDelegate for RootView { #[derive(Default)] pub struct WindowScene { -#[cfg(target_os= "ios")] + #[cfg(target_os= "ios")] pub window: RwLock>, pub root_view_controller: RwLock>> } @@ -84,6 +84,6 @@ impl WindowSceneDelegate for WindowScene { } fn main() { -#[cfg(target_os= "ios")] + #[cfg(target_os= "ios")] App::new(TestApp::default(), || Box::new(WindowScene::default())).run(); } diff --git a/examples/webview_custom_protocol.rs b/examples/webview_custom_protocol.rs index fb97072..7fd5a27 100644 --- a/examples/webview_custom_protocol.rs +++ b/examples/webview_custom_protocol.rs @@ -64,7 +64,7 @@ impl WebViewDelegate for WebViewInstance { } struct AppWindow { -#[cfg(feature = "webview")] + #[cfg(feature = "webview")] content: WebView }