mirror of
https://github.com/servo/servo.git
synced 2025-07-24 15:50:21 +01:00
Manually format remaining problems
Use line comments instead of block comments as block comments contain trailing whitespace after formatting with rustfmt. Skip tests for malloc_size_of and script_plugins with rustfmt as they have many block comments.
This commit is contained in:
parent
cb07debcb6
commit
095d446ccd
5 changed files with 51 additions and 52 deletions
|
@ -223,16 +223,15 @@ impl<'a> DetailedGlyphStore {
|
|||
entry_offset, glyphs
|
||||
);
|
||||
|
||||
/* TODO: don't actually assert this until asserts are compiled
|
||||
in/out based on severity, debug/release, etc. This assertion
|
||||
would wreck the complexity of the lookup.
|
||||
|
||||
See Rust Issue #3647, #2228, #3627 for related information.
|
||||
|
||||
do self.detail_lookup.borrow |arr| {
|
||||
assert !arr.contains(entry)
|
||||
}
|
||||
*/
|
||||
// TODO: don't actually assert this until asserts are compiled
|
||||
// in/out based on severity, debug/release, etc. This assertion
|
||||
// would wreck the complexity of the lookup.
|
||||
//
|
||||
// See Rust Issue #3647, #2228, #3627 for related information.
|
||||
//
|
||||
// do self.detail_lookup.borrow |arr| {
|
||||
// assert !arr.contains(entry)
|
||||
// }
|
||||
|
||||
self.detail_lookup.push(entry);
|
||||
self.detail_buffer.extend_from_slice(glyphs);
|
||||
|
|
|
@ -172,20 +172,21 @@ pub fn get_array_index_from_id(_cx: *mut JSContext, id: HandleId) -> Option<u32>
|
|||
None
|
||||
}
|
||||
// if id is length atom, -1, otherwise
|
||||
/*return if JSID_IS_ATOM(id) {
|
||||
let atom = JSID_TO_ATOM(id);
|
||||
//let s = *GetAtomChars(id);
|
||||
if s > 'a' && s < 'z' {
|
||||
return -1;
|
||||
// return if JSID_IS_ATOM(id) {
|
||||
// let atom = JSID_TO_ATOM(id);
|
||||
// //let s = *GetAtomChars(id);
|
||||
// if s > 'a' && s < 'z' {
|
||||
// return -1;
|
||||
// }
|
||||
//
|
||||
// let i = 0;
|
||||
// let str = AtomToLinearString(JSID_TO_ATOM(id));
|
||||
// return if StringIsArray(str, &mut i) != 0 { i } else { -1 }
|
||||
// } else {
|
||||
// IdToInt32(cx, id);
|
||||
// }
|
||||
}
|
||||
|
||||
let i = 0;
|
||||
let str = AtomToLinearString(JSID_TO_ATOM(id));
|
||||
return if StringIsArray(str, &mut i) != 0 { i } else { -1 }
|
||||
} else {
|
||||
IdToInt32(cx, id);
|
||||
}*/}
|
||||
|
||||
/// Find the enum equivelent of a string given by `v` in `pairs`.
|
||||
/// Returns `Err(())` on JSAPI failure (there is a pending exception), and
|
||||
/// `Ok((None, value))` if there was no matching string.
|
||||
|
|
|
@ -118,12 +118,9 @@ impl URL {
|
|||
|
||||
// https://w3c.github.io/FileAPI/#dfn-revokeObjectURL
|
||||
pub fn RevokeObjectURL(global: &GlobalScope, url: DOMString) {
|
||||
/*
|
||||
If the value provided for the url argument is not a Blob URL OR
|
||||
if the value provided for the url argument does not have an entry in the Blob URL Store,
|
||||
|
||||
this method call does nothing. User agents may display a message on the error console.
|
||||
*/
|
||||
// If the value provided for the url argument is not a Blob URL OR
|
||||
// if the value provided for the url argument does not have an entry in the Blob URL Store,
|
||||
// this method call does nothing. User agents may display a message on the error console.
|
||||
let origin = get_blob_origin(&global.get_url());
|
||||
|
||||
if let Ok(url) = ServoUrl::parse(&url) {
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
/* 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 http://mozilla.org/MPL/2.0/. */
|
||||
#![rustfmt::skip]
|
||||
|
||||
/**
|
||||
```
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
/* 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 http://mozilla.org/MPL/2.0/. */
|
||||
#![rustfmt::skip]
|
||||
|
||||
pub mod unrooted_must_root {
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue