Repository: servo/servo
File: components/servo/servo.rs (Rust)

Code before:
            },
            EmbedderMsg::PlayGamepadHapticEffect(
                webview_id,
                gamepad_index,
                gamepad_haptic_effect_type,
                callback,
            ) => {
                if let Some(webview) = self.get_webview_handle(webview_id) {
                    webview.delegate().play_gamepad_haptic_effect(
                        webview,
                        gamepad_index,
                        gamepad_haptic_effect_type,
                        Box::new(move |msg| {
                            callback
                                .send(msg)
                                .expect("Could not send message via callback")
                        }),
                    );
                }
            },
            EmbedderMsg::StopGamepadHapticEffect(webview_id, gamepad_index, callback) => {
                if let Some(webview) = self.get_webview_handle(webview_id) {
                    webview.delegate().stop_gamepad_haptic_effect(
                        webview,
                        gamepad_index,
                        Box::new(move |msg| {
                            callback
                                .send(msg)
                                .expect("Could not send message via callback")
                        }),
                    );
                }
            },
            EmbedderMsg::ShowNotification(webview_id, notification) => {
                match webview_id.and_then(|webview_id| self.get_webview_handle(webview_id)) {
                    Some(webview) => webview.delegate().show_notification(webview, notification),
                    None => self.delegate.borrow().show_notification(notification),
                }
            },
            EmbedderMsg::ShowConsoleApiMessage(webview_id, level, message) => {
                match webview_id.and_then(|webview_id| self.get_webview_handle(webview_id)) {
                    Some(webview) => webview
                        .delegate()
                        .show_console_message(webview, level, message),
                    None => self.delegate.borrow().show_console_message(level, message),
                }
            },
            EmbedderMsg::ShowEmbedderControl(control_id, position, embedder_control_request) => {
                if let Some(webview) = self.get_webview_handle(control_id.webview_id) {
                    webview.show_embedder_control(control_id, position, embedder_control_request);
                }

Review comment (suggestion):
```suggestion
                        Box::new(move |success| {
```

Code after:
            EmbedderMsg::PlayGamepadHapticEffect(
                webview_id,
                gamepad_index,
                gamepad_haptic_effect_type,
                callback,
            ) => {
                if let Some(webview) = self.get_webview_handle(webview_id) {
                    webview.delegate().play_gamepad_haptic_effect(
                        webview,
                        gamepad_index,
                        gamepad_haptic_effect_type,
                        Box::new(move |success| {
                            callback
                                .send(success)
                                .expect("Could not send message via callback")
                        }),
                    );
                }
            },
            #[cfg(feature = "gamepad")]
            EmbedderMsg::StopGamepadHapticEffect(webview_id, gamepad_index, callback) => {
                if let Some(webview) = self.get_webview_handle(webview_id) {
                    webview.delegate().stop_gamepad_haptic_effect(
                        webview,
                        gamepad_index,
                        Box::new(move |success| {
                            callback
                                .send(success)
                                .expect("Could not send message via callback")
                        }),
                    );
                }
            },
            EmbedderMsg::ShowNotification(webview_id, notification) => {
                match webview_id.and_then(|webview_id| self.get_webview_handle(webview_id)) {
                    Some(webview) => webview.delegate().show_notification(webview, notification),
                    None => self.delegate.borrow().show_notification(notification),
                }
            },
            EmbedderMsg::ShowConsoleApiMessage(webview_id, level, message) => {
                match webview_id.and_then(|webview_id| self.get_webview_handle(webview_id)) {
                    Some(webview) => webview
                        .delegate()
                        .show_console_message(webview, level, message),
                    None => self.delegate.borrow().show_console_message(level, message),
                }
            },
            EmbedderMsg::ShowEmbedderControl(control_id, position, embedder_control_request) => {
                if let Some(webview) = self.get_webview_handle(control_id.webview_id) {
                    webview.show_embedder_control(control_id, position, embedder_control_request);
                }