Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch some crates to the 2018 edition #22086

Merged
merged 8 commits into from Nov 6, 2018

Switch most crates to the 2018 edition

  • Loading branch information
SimonSapin committed Nov 6, 2018
commit 9f9bf8f6bc1897aa7c637a4a0d4021ec6b6c2819
@@ -3,6 +3,7 @@ name = "servo_allocator"
version = "0.0.1"
authors = ["The Servo Project Developers"]
license = "MPL-2.0"
edition = "2018"
publish = false

[lib]
@@ -3,6 +3,7 @@ name = "servo_atoms"
version = "0.0.1"
authors = ["The Servo Project Developers"]
license = "MPL-2.0"
edition = "2018"
publish = false
build = "build.rs"

@@ -3,6 +3,7 @@ name = "bluetooth"
version = "0.0.1"
authors = ["The Servo Project Developers"]
license = "MPL-2.0"
edition = "2018"
publish = false

[lib]
@@ -3,6 +3,7 @@ name = "bluetooth_traits"
version = "0.0.1"
authors = ["The Servo Project Developers"]
license = "MPL-2.0"
edition = "2018"
publish = false

[lib]
@@ -3,6 +3,7 @@ name = "canvas"
version = "0.0.1"
authors = ["The Servo Project Developers"]
license = "MPL-2.0"
edition = "2018"
publish = false

[lib]
@@ -3,6 +3,7 @@ name = "canvas_traits"
version = "0.0.1"
authors = ["The Servo Project Developers"]
license = "MPL-2.0"
edition = "2018"
publish = false

[lib]
@@ -3,6 +3,7 @@ name = "servo_channel"
version = "0.0.1"
authors = ["The Servo Project Developers"]
license = "MPL-2.0"
edition = "2018"
publish = false

[lib]
@@ -3,6 +3,7 @@ name = "compositing"
version = "0.0.1"
authors = ["The Servo Project Developers"]
license = "MPL-2.0"
edition = "2018"
publish = false
build = "build.rs"

@@ -20,7 +20,7 @@ use msg::constellation_msg::{PipelineId, PipelineIndex, PipelineNamespaceId};
use net_traits::image::base::Image;
#[cfg(feature = "gleam")]
use net_traits::image::base::PixelFormat;
use profile_traits::time::{self, ProfilerCategory, profile};
use profile_traits::time::{self as profile_time, ProfilerCategory, profile};
use script_traits::{AnimationState, AnimationTickType, ConstellationMsg, LayoutControlMsg};
use script_traits::{MouseButton, MouseEventType, ScrollState, TouchEventType, TouchId};
use script_traits::{UntrustedNodeAddress, WindowSizeData, WindowSizeType};
@@ -150,7 +150,7 @@ pub struct IOCompositor<Window: WindowMethods> {
constellation_chan: Sender<ConstellationMsg>,

/// The channel on which messages can be sent to the time profiler.
time_profiler_chan: time::ProfilerChan,
time_profiler_chan: profile_time::ProfilerChan,

/// Touch input state machine
touch_handler: TouchHandler,
@@ -366,7 +366,7 @@ impl<Window: WindowMethods> IOCompositor<Window> {
// Tell the profiler, memory profiler, and scrolling timer to shut down.
if let Ok((sender, receiver)) = ipc::channel() {
self.time_profiler_chan
.send(time::ProfilerMsg::Exit(sender));
.send(profile_time::ProfilerMsg::Exit(sender));
let _ = receiver.recv();
}

@@ -3,6 +3,7 @@ name = "servo_config"
version = "0.0.1"
authors = ["The Servo Project Developers"]
license = "MPL-2.0"
edition = "2018"
publish = false

[lib]
@@ -3,6 +3,7 @@ name = "constellation"
version = "0.0.1"
authors = ["The Servo Project Developers"]
license = "MPL-2.0"
edition = "2018"
publish = false

[lib]
@@ -3,6 +3,7 @@ name = "debugger"
version = "0.0.1"
authors = ["The Servo Project Developers"]
license = "MPL-2.0"
edition = "2018"
publish = false

[lib]
@@ -3,6 +3,7 @@ name = "deny_public_fields"
version = "0.0.1"
authors = ["The Servo Project Developers"]
license = "MPL-2.0"
edition = "2018"
publish = false

[lib]
@@ -3,6 +3,7 @@ name = "devtools"
version = "0.0.1"
authors = ["The Servo Project Developers"]
license = "MPL-2.0"
edition = "2018"
publish = false

[lib]
@@ -3,6 +3,7 @@ name = "devtools_traits"
version = "0.0.1"
authors = ["The Servo Project Developers"]
license = "MPL-2.0"
edition = "2018"
publish = false

[lib]
@@ -3,6 +3,7 @@ name = "domobject_derive"
version = "0.0.1"
authors = ["The Servo Project Developers"]
license = "MPL-2.0"
edition = "2018"
publish = false

[lib]
@@ -3,6 +3,7 @@ name = "embedder_traits"
version = "0.0.1"
authors = ["The Servo Project Developers"]
license = "MPL-2.0"
edition = "2018"
publish = false

[lib]
@@ -3,6 +3,7 @@ name = "servo_geometry"
version = "0.0.1"
authors = ["The Servo Project Developers"]
license = "MPL-2.0"
edition = "2018"
publish = false

[lib]
@@ -4,6 +4,7 @@ name = "gfx"
version = "0.0.1"
authors = ["The Servo Project Developers"]
license = "MPL-2.0"
edition = "2018"
publish = false

[lib]
@@ -3,6 +3,7 @@ name = "gfx_traits"
version = "0.0.1"
authors = ["The Servo Project Developers"]
license = "MPL-2.0"
edition = "2018"
publish = false

[lib]
@@ -3,6 +3,7 @@ name = "jstraceable_derive"
version = "0.0.1"
authors = ["The Servo Project Developers"]
license = "MPL-2.0"
edition = "2018"
publish = false

[lib]
@@ -3,6 +3,7 @@ name = "layout"
version = "0.0.1"
authors = ["The Servo Project Developers"]
license = "MPL-2.0"
edition = "2018"
publish = false

[lib]
@@ -3,6 +3,7 @@ name = "layout_thread"
version = "0.0.1"
authors = ["The Servo Project Developers"]
license = "MPL-2.0"
edition = "2018"
publish = false

[lib]
@@ -3,6 +3,7 @@ name = "layout_traits"
version = "0.0.1"
authors = ["The Servo Project Developers"]
license = "MPL-2.0"
edition = "2018"
publish = false

[lib]
@@ -3,6 +3,7 @@ name = "metrics"
version = "0.0.1"
authors = ["The Servo Project Developers"]
license = "MPL-2.0"
edition = "2018"
publish = false

[lib]
@@ -3,6 +3,7 @@ name = "msg"
version = "0.0.1"
authors = ["The Servo Project Developers"]
license = "MPL-2.0"
edition = "2018"
publish = false

[lib]
@@ -3,6 +3,7 @@ name = "net"
version = "0.0.1"
authors = ["The Servo Project Developers"]
license = "MPL-2.0"
edition = "2018"
publish = false
autotests = false # Inhibit lookup for tests/*.rs without [[test]] sections

@@ -544,7 +544,7 @@ fn scheme_fetch(
*done_chan = Some((done_sender.clone(), done_receiver));
*response.body.lock().unwrap() = ResponseBody::Receiving(vec![]);

let mut res_body = response.body.clone();
let res_body = response.body.clone();

let cancellation_listener = context.cancellation_listener.clone();

@@ -589,7 +589,7 @@ fn scheme_fetch(
return;
}
let length = {
let mut buffer = reader.fill_buf().unwrap().to_vec();
let buffer = reader.fill_buf().unwrap().to_vec();
let mut buffer_len = buffer.len();
if let ResponseBody::Receiving(ref mut body) =
*res_body.lock().unwrap()
@@ -3,6 +3,7 @@ name = "net_traits"
version = "0.0.1"
authors = ["The Servo Project Developers"]
license = "MPL-2.0"
edition = "2018"
publish = false

[lib]
@@ -3,6 +3,7 @@ name = "pixels"
version = "0.0.1"
authors = ["The Servo Project Developers"]
license = "MPL-2.0"
edition = "2018"
publish = false

[lib]
@@ -3,6 +3,7 @@ name = "profile"
version = "0.0.1"
authors = ["The Servo Project Developers"]
license = "MPL-2.0"
edition = "2018"
publish = false

[lib]
@@ -3,6 +3,7 @@ name = "profile_traits"
version = "0.0.1"
authors = ["The Servo Project Developers"]
license = "MPL-2.0"
edition = "2018"
publish = false

[lib]
@@ -3,6 +3,7 @@ name = "servo_rand"
version = "0.0.1"
authors = ["The Servo Project Developers"]
license = "MPL-2.0"
edition = "2018"
publish = false

[lib]
@@ -4,6 +4,7 @@ name = "range"
version = "0.0.1"
authors = ["The Servo Project Developers"]
license = "MPL-2.0"
edition = "2018"
publish = false

[lib]
@@ -3,6 +3,7 @@ name = "servo_remutex"
version = "0.0.1"
authors = ["The Servo Project Developers"]
license = "MPL-2.0"
edition = "2018"
publish = false

[lib]
@@ -5,6 +5,7 @@ name = "script"
version = "0.0.1"
authors = ["The Servo Project Developers"]
license = "MPL-2.0"
edition = "2018"
publish = false

build = "build.rs"
@@ -321,9 +321,8 @@ impl AudioBufferMethods for AudioBuffer {
typedarray!(in(cx) let js_channel: Float32Array = js_channel);
if let Ok(mut js_channel) = js_channel {
let bytes_to_copy = min(self.length - start_in_channel, source.len() as u32) as usize;
let mut js_channel_data = unsafe { js_channel.as_mut_slice() };
let (_, mut js_channel_data) =
js_channel_data.split_at_mut(start_in_channel as usize);
let js_channel_data = unsafe { js_channel.as_mut_slice() };
let (_, js_channel_data) = js_channel_data.split_at_mut(start_in_channel as usize);
unsafe {
js_channel_data[0..bytes_to_copy].copy_from_slice(&source.as_slice()[0..bytes_to_copy])
};
@@ -5686,7 +5686,11 @@ def members():
yield name, arguments, rettype

def fmt(arguments):
return "".join(", %s: %s" % argument for argument in arguments)
keywords = {"async"}
return "".join(
", %s: %s" % (name if name not in keywords else "r#" + name, type_)
for name, type_ in arguments
)

def contains_unsafe_arg(arguments):
if not arguments or len(arguments) == 0:
@@ -6250,7 +6254,7 @@ def impl(self):
d = self.dictionary
if d.parent:
initParent = ("{\n"
" match try!(%s::%s::new(cx, val)) {\n"
" match r#try!(%s::%s::new(cx, val)) {\n"
" ConversionResult::Success(v) => v,\n"
" ConversionResult::Failure(error) => {\n"
" throw_type_error(cx, &error);\n"
@@ -6396,7 +6400,7 @@ def indent(s):
conversion = (
"{\n"
" rooted!(in(cx) let mut rval = UndefinedValue());\n"
" match try!(get_dictionary_property(cx, object.handle(), \"%s\", rval.handle_mut())) {\n"
" match r#try!(get_dictionary_property(cx, object.handle(), \"%s\", rval.handle_mut())) {\n"
" true => {\n"
"%s\n"
" },\n"
@@ -7167,7 +7171,7 @@ def getCallableDecl(self):
"methodName": self.methodName
}
getCallableFromProp = string.Template(
'try!(self.parent.get_callable_property(cx, "${methodName}"))'
'r#try!(self.parent.get_callable_property(cx, "${methodName}"))'
).substitute(replacements)
if not self.singleOperation:
return 'rooted!(in(cx) let callable =\n' + getCallableFromProp + ');\n'
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.