mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +01:00
Auto merge of #14592 - asajeffrey:util-goodbye, r=mbrubeck
Remove the util crate <!-- Please describe your changes on the following line: --> This PR removes the `util` crate. * Replaced the `spawn_named` and `clamp` functions by appropriate uses of `std:🧵:Builder::spawn`, `std::cmp::min` and `std::cmp::max`. * Moved `opts`, `prefs` and `resource_files` into a new `config` crate. * Moved `remutex` and `geometry` into their own crates. --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes do not require tests because they are refactorings <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/14592) <!-- Reviewable:end -->
This commit is contained in:
commit
4eb653817f
133 changed files with 396 additions and 352 deletions
|
@ -10,7 +10,6 @@ extern crate ipc_channel;
|
|||
extern crate rand;
|
||||
#[cfg(target_os = "linux")]
|
||||
extern crate tinyfiledialogs;
|
||||
extern crate util;
|
||||
extern crate uuid;
|
||||
|
||||
pub mod test;
|
||||
|
@ -29,7 +28,6 @@ use std::collections::{HashMap, HashSet};
|
|||
use std::string::String;
|
||||
use std::thread;
|
||||
use std::time::Duration;
|
||||
use util::thread::spawn_named;
|
||||
|
||||
// A transaction not completed within 30 seconds shall time out. Such a transaction shall be considered to have failed.
|
||||
// https://www.bluetooth.org/DocMan/handlers/DownloadDoc.ashx?doc_id=286439 (Vol. 3, page 480)
|
||||
|
@ -88,9 +86,9 @@ impl BluetoothThreadFactory for IpcSender<BluetoothRequest> {
|
|||
fn new() -> IpcSender<BluetoothRequest> {
|
||||
let (sender, receiver) = ipc::channel().unwrap();
|
||||
let adapter = BluetoothAdapter::init().ok();
|
||||
spawn_named("BluetoothThread".to_owned(), move || {
|
||||
thread::Builder::new().name("BluetoothThread".to_owned()).spawn(move || {
|
||||
BluetoothManager::new(receiver, adapter).start();
|
||||
});
|
||||
}).expect("Thread spawning failed");
|
||||
sender
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue