Bug 1617369 - Reformat recent rust changes with rustfmt r=emilio,necko-reviewers
authorSylvestre Ledru <sledru@mozilla.com>
Wed, 04 Nov 2020 17:03:33 +0000
changeset 555906 b76268bfeb60d78738df3dec94a285aace5a4dda
parent 555905 2977d4891ceeed019dc906dff3feb6c9f530213c
child 555907 8a260892acc935e4f0911b38029e69e8178c06c3
push id130201
push usersledru@mozilla.com
push dateWed, 04 Nov 2020 19:00:28 +0000
treeherderautoland@b76268bfeb60 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersemilio, necko-reviewers
bugs1617369
milestone84.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1617369 - Reformat recent rust changes with rustfmt r=emilio,necko-reviewers # ignore-this-changeset Differential Revision: https://phabricator.services.mozilla.com/D95435
gfx/webrender_bindings/src/swgl_bindings.rs
js/src/wasm/cranelift/src/lib.rs
js/src/wasm/cranelift/src/wasm2clif.rs
netwerk/socket/neqo_glue/src/lib.rs
--- a/gfx/webrender_bindings/src/swgl_bindings.rs
+++ b/gfx/webrender_bindings/src/swgl_bindings.rs
@@ -931,19 +931,23 @@ impl SwCompositor {
                                 Some(texture) => SwCompositeSource::BGRA(texture),
                                 None => return,
                             },
                             3 => match (
                                 self.gl.lock_texture(info.textures[0]),
                                 self.gl.lock_texture(info.textures[1]),
                                 self.gl.lock_texture(info.textures[2]),
                             ) {
-                                (Some(y_texture), Some(u_texture), Some(v_texture)) => {
-                                    SwCompositeSource::YUV(y_texture, u_texture, v_texture, info.color_space, info.color_depth)
-                                }
+                                (Some(y_texture), Some(u_texture), Some(v_texture)) => SwCompositeSource::YUV(
+                                    y_texture,
+                                    u_texture,
+                                    v_texture,
+                                    info.color_space,
+                                    info.color_depth,
+                                ),
                                 _ => return,
                             },
                             _ => panic!("unsupported number of YUV planes: {}", info.yuv_planes),
                         },
                         None => return,
                     }
                 } else if let Some(texture) = self.gl.lock_texture(tile.color_id) {
                     // Lock the texture representing the picture cache tile.
--- a/js/src/wasm/cranelift/src/lib.rs
+++ b/js/src/wasm/cranelift/src/lib.rs
@@ -132,19 +132,19 @@
 mod bindings;
 mod compile;
 mod isa;
 mod utils;
 mod wasm2clif;
 
 use log::{self, error};
 use std::ffi::CString;
+use std::fmt::Display;
 use std::os::raw::c_char;
 use std::ptr;
-use std::fmt::Display;
 
 use crate::bindings::{CompiledFunc, FuncCompileInput, ModuleEnvironment, StaticEnvironment};
 use crate::compile::BatchCompiler;
 use cranelift_codegen::CodegenError;
 
 /// Initializes all the process-wide Cranelift state. It must be called at least once, before any
 /// other use of this crate. It is not an issue if it is called more than once; subsequent calls
 /// are useless though.
@@ -255,17 +255,17 @@ pub unsafe extern "C" fn cranelift_compi
     // have a bad time. Would be nice to be able to enforce lifetimes accross languages, somehow.
     let result = result.as_mut().unwrap();
     result.reset(&compiler.current_func);
 
     true
 }
 
 #[no_mangle]
-pub unsafe extern "C" fn cranelift_compiler_free_error(s: *mut c_char)  {
+pub unsafe extern "C" fn cranelift_compiler_free_error(s: *mut c_char) {
     // Convert back into a `CString` and then let it drop.
     let _cstr = CString::from_raw(s);
 }
 
 /// Returns true whether a platform (target ISA) is supported or not.
 #[no_mangle]
 pub unsafe extern "C" fn cranelift_supports_platform() -> bool {
     isa::platform::IS_SUPPORTED
--- a/js/src/wasm/cranelift/src/wasm2clif.rs
+++ b/js/src/wasm/cranelift/src/wasm2clif.rs
@@ -657,18 +657,18 @@ impl<'static_env, 'module_env> TransEnv<
         // C++ `SymbolicAccess` linker expects it.
 
         let func_addr = pos.ins().func_addr(POINTER_TYPE, fnref);
         let call_ins = pos.ins().call_indirect(sigref, func_addr, &[]);
         let mut built_arguments = pos.func.dfg[call_ins].take_value_list().unwrap();
         built_arguments.push(instance, &mut pos.func.dfg.value_lists);
         built_arguments.extend(arguments.iter().cloned(), &mut pos.func.dfg.value_lists);
         built_arguments.push(vmctx, &mut pos.func.dfg.value_lists);
-        built_arguments.push(vmctx, &mut pos.func.dfg.value_lists);  // callee_tls
-        built_arguments.push(vmctx, &mut pos.func.dfg.value_lists);  // caller_tls
+        built_arguments.push(vmctx, &mut pos.func.dfg.value_lists); // callee_tls
+        built_arguments.push(vmctx, &mut pos.func.dfg.value_lists); // caller_tls
         pos.func.dfg[call_ins].put_value_list(built_arguments);
 
         self.switch_to_wasm_tls_realm(pos);
         self.reload_tls_and_pinned_regs(pos);
 
         if call.ret.is_none() {
             return None;
         }
--- a/netwerk/socket/neqo_glue/src/lib.rs
+++ b/netwerk/socket/neqo_glue/src/lib.rs
@@ -1,14 +1,14 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * 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 neqo_common::event::Provider;
 use neqo_common::{self as common, qlog::NeqoQlog, qwarn, Datagram, Role};
-use neqo_common::event::Provider;
 use neqo_crypto::{init, PRErrorCode};
 use neqo_http3::Error as Http3Error;
 use neqo_http3::{Http3Client, Http3ClientEvent, Http3Parameters, Http3State};
 use neqo_qpack::QpackSettings;
 use neqo_transport::Error as TransportError;
 use neqo_transport::{CongestionControlAlgorithm, FixedConnectionIdManager, Output, QuicVersion};
 use nserror::*;
 use nsstring::*;