Run rustfmt and keep it running on CI (#2023)

Thought we did this awhile back, but looks like we forgot to do so!
This commit is contained in:
Alex Crichton
2020-03-02 11:44:14 -06:00
committed by GitHub
parent 15e9c54a20
commit 381660c49b
14 changed files with 120 additions and 62 deletions

View File

@ -5,10 +5,10 @@ use wasm_bindgen_test::*;
wasm_bindgen_test_configure!(run_in_browser);
pub mod anchor_element;
pub mod blob;
pub mod body_element;
pub mod br_element;
pub mod button_element;
pub mod blob;
pub mod console;
pub mod div_element;
pub mod element;

View File

@ -10,8 +10,8 @@
//!
//! @see https://github.com/rustwasm/wasm-bindgen/issues/1005
use wasm_bindgen::{JsCast, JsValue};
use web_sys::{WebGl2RenderingContext, WebGlRenderingContext, WebSocket};
use wasm_bindgen::{JsValue, JsCast};
// Ensure that our whitelisted WebGlRenderingContext methods compile with immutable slices.
fn test_webgl_rendering_context_immutable_slices() {
@ -60,9 +60,9 @@ fn test_webgl_rendering_context_immutable_slices() {
fn test_webgl2_rendering_context_immutable_slices() {
let gl = JsValue::null().unchecked_into::<WebGl2RenderingContext>();
gl.tex_image_3d_with_opt_u8_array(0, 0, 0, 0, 0, 0, 0, 0, 0, Some(&[1]));
gl.tex_sub_image_3d_with_opt_u8_array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, Some(&[1]));
gl.compressed_tex_image_3d_with_u8_array(0, 0, 0, 0, 0, 0, 0, &[1]);
gl.tex_image_3d_with_opt_u8_array(0, 0, 0, 0, 0, 0, 0, 0, 0, Some(&[1]));
gl.tex_sub_image_3d_with_opt_u8_array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, Some(&[1]));
gl.compressed_tex_image_3d_with_u8_array(0, 0, 0, 0, 0, 0, 0, &[1]);
}
// Ensure that our whitelisted WebSocket methods compile with immutable slices.