aboutsummaryrefslogtreecommitdiffstats
path: root/ports
diff options
context:
space:
mode:
authorSamson <16504129+sagudev@users.noreply.github.com>2023-09-08 14:11:31 +0200
committerGitHub <noreply@github.com>2023-09-08 12:11:31 +0000
commit711dbbd4afe161fc334db198357d814e99e5ac57 (patch)
tree5c0e3a6a18dd26c9e39a47a790c6ec36f0ff8d4d /ports
parenta0cff6a0858e675b805a71238ab96fa295a271f8 (diff)
downloadservo-711dbbd4afe161fc334db198357d814e99e5ac57.tar.gz
servo-711dbbd4afe161fc334db198357d814e99e5ac57.zip
remove `extern crate` (#30311)
* remove extern crate * Update components/script_plugins/lib.rs Co-authored-by: Martin Robinson <mrobinson@igalia.com> --------- Co-authored-by: Martin Robinson <mrobinson@igalia.com>
Diffstat (limited to 'ports')
-rw-r--r--ports/libsimpleservo/api/src/lib.rs3
-rw-r--r--ports/libsimpleservo/capi/src/lib.rs6
-rw-r--r--ports/libsimpleservo/jniapi/src/lib.rs3
-rw-r--r--ports/servoshell/app.rs1
-rw-r--r--ports/servoshell/browser.rs1
-rw-r--r--ports/servoshell/build.rs6
-rw-r--r--ports/servoshell/events_loop.rs1
-rw-r--r--ports/servoshell/headed_window.rs1
-rw-r--r--ports/servoshell/keyutils.rs1
-rw-r--r--ports/servoshell/main2.rs5
-rw-r--r--ports/servoshell/minibrowser.rs1
-rw-r--r--ports/servoshell/resources.rs2
12 files changed, 8 insertions, 23 deletions
diff --git a/ports/libsimpleservo/api/src/lib.rs b/ports/libsimpleservo/api/src/lib.rs
index 9df7845bbf5..d425caa15fb 100644
--- a/ports/libsimpleservo/api/src/lib.rs
+++ b/ports/libsimpleservo/api/src/lib.rs
@@ -2,9 +2,6 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
-#[macro_use]
-extern crate log;
-
pub mod gl_glue;
pub use servo::config::prefs::{add_user_prefs, PrefValue};
diff --git a/ports/libsimpleservo/capi/src/lib.rs b/ports/libsimpleservo/capi/src/lib.rs
index 7263fd8c914..fddfc0a1093 100644
--- a/ports/libsimpleservo/capi/src/lib.rs
+++ b/ports/libsimpleservo/capi/src/lib.rs
@@ -2,12 +2,6 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
-#[macro_use]
-extern crate lazy_static;
-
-#[macro_use]
-extern crate log;
-
mod prefs;
#[cfg(target_os = "windows")]
diff --git a/ports/libsimpleservo/jniapi/src/lib.rs b/ports/libsimpleservo/jniapi/src/lib.rs
index 8223964cc11..d5cd51e8851 100644
--- a/ports/libsimpleservo/jniapi/src/lib.rs
+++ b/ports/libsimpleservo/jniapi/src/lib.rs
@@ -4,9 +4,6 @@
#![allow(non_snake_case)]
-#[macro_use]
-extern crate log;
-
use android_logger::{self, Filter};
use gstreamer::debug_set_threshold_from_string;
use jni::objects::{GlobalRef, JClass, JObject, JString, JValue};
diff --git a/ports/servoshell/app.rs b/ports/servoshell/app.rs
index 2c9a666ca5f..2152537a6b7 100644
--- a/ports/servoshell/app.rs
+++ b/ports/servoshell/app.rs
@@ -12,6 +12,7 @@ use crate::parser::get_default_url;
use crate::window_trait::WindowPortsMethods;
use crate::{headed_window, headless_window};
use gleam::gl;
+use log::warn;
use servo::compositing::windowing::EmbedderEvent;
use servo::config::opts;
use servo::servo_config::pref;
diff --git a/ports/servoshell/browser.rs b/ports/servoshell/browser.rs
index b947a9b6b84..57c5ae07c79 100644
--- a/ports/servoshell/browser.rs
+++ b/ports/servoshell/browser.rs
@@ -8,6 +8,7 @@ use crate::window_trait::{WindowPortsMethods, LINE_HEIGHT};
use arboard::Clipboard;
use euclid::{Point2D, Vector2D};
use keyboard_types::{Key, KeyboardEvent, Modifiers, ShortcutMatcher};
+use log::{error, debug, warn, info};
use servo::compositing::windowing::{WebRenderDebugOption, EmbedderEvent};
use servo::embedder_traits::{
ContextMenuResult, EmbedderMsg, FilterPattern, PermissionPrompt, PermissionRequest,
diff --git a/ports/servoshell/build.rs b/ports/servoshell/build.rs
index e7b34dc2506..2aadf13beed 100644
--- a/ports/servoshell/build.rs
+++ b/ports/servoshell/build.rs
@@ -2,12 +2,6 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
-#[cfg(target_os = "macos")]
-extern crate cc;
-
-#[cfg(windows)]
-extern crate winres;
-
use vergen::EmitBuilder;
fn main() {
diff --git a/ports/servoshell/events_loop.rs b/ports/servoshell/events_loop.rs
index 0d36b614426..c9bc35753ce 100644
--- a/ports/servoshell/events_loop.rs
+++ b/ports/servoshell/events_loop.rs
@@ -4,6 +4,7 @@
//! An event loop implementation that works in headless mode.
+use log::warn;
use servo::embedder_traits::EventLoopWaker;
use std::sync::{Arc, Condvar, Mutex};
use std::time;
diff --git a/ports/servoshell/headed_window.rs b/ports/servoshell/headed_window.rs
index e57e0400389..96317141cec 100644
--- a/ports/servoshell/headed_window.rs
+++ b/ports/servoshell/headed_window.rs
@@ -11,6 +11,7 @@ use euclid::{
Angle, Point2D, Rotation3D, Scale, Size2D, UnknownUnit,
Vector2D, Vector3D,
};
+use log::{trace, debug, info};
#[cfg(any(target_os = "linux", target_os = "windows"))]
use winit::window::Icon;
use winit::event::{ElementState, KeyboardInput, MouseButton, MouseScrollDelta, TouchPhase, VirtualKeyCode};
diff --git a/ports/servoshell/keyutils.rs b/ports/servoshell/keyutils.rs
index ddc54afe544..2586929b3bc 100644
--- a/ports/servoshell/keyutils.rs
+++ b/ports/servoshell/keyutils.rs
@@ -2,6 +2,7 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
+use log::info;
use winit::event::{ElementState, KeyboardInput, ModifiersState, VirtualKeyCode};
use keyboard_types::{Code, Key, KeyState, KeyboardEvent, Location, Modifiers};
diff --git a/ports/servoshell/main2.rs b/ports/servoshell/main2.rs
index f1254dc2aa7..df654c22bea 100644
--- a/ports/servoshell/main2.rs
+++ b/ports/servoshell/main2.rs
@@ -2,10 +2,6 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
-#[macro_use]
-extern crate lazy_static;
-#[macro_use]
-extern crate log;
#[cfg(any(target_os = "macos", target_os = "linux"))]
#[macro_use]
extern crate sig;
@@ -38,6 +34,7 @@ use std::io::Write;
use std::panic;
use std::process;
use std::thread;
+use log::{warn,error};
pub mod platform {
#[cfg(target_os = "macos")]
diff --git a/ports/servoshell/minibrowser.rs b/ports/servoshell/minibrowser.rs
index efb8aab7eea..bc8f741514b 100644
--- a/ports/servoshell/minibrowser.rs
+++ b/ports/servoshell/minibrowser.rs
@@ -5,6 +5,7 @@
use std::{cell::{RefCell, Cell}, sync::Arc, time::Instant};
use egui::{TopBottomPanel, Modifiers, Key};
+use log::{warn, trace};
use servo::{servo_url::ServoUrl, compositing::windowing::EmbedderEvent};
use servo::webrender_surfman::WebrenderSurfman;
diff --git a/ports/servoshell/resources.rs b/ports/servoshell/resources.rs
index dfd358e9f01..0a859ba3950 100644
--- a/ports/servoshell/resources.rs
+++ b/ports/servoshell/resources.rs
@@ -9,7 +9,7 @@ use std::io;
use std::path::PathBuf;
use std::sync::Mutex;
-lazy_static! {
+lazy_static::lazy_static! {
static ref CMD_RESOURCE_DIR: Mutex<Option<String>> = Mutex::new(None);
}