mirror of
https://github.com/servo/servo.git
synced 2025-06-12 10:24:43 +00:00
Move '&&' to the end of the previous line.
Following https://github.com/servo/servo/issues/10692 this is just a formating change to satisfy a new tidy requirement of not having '&&' at the beginning of a line.
This commit is contained in:
parent
01b111c43e
commit
924d804583
11 changed files with 29 additions and 29 deletions
|
@ -469,9 +469,9 @@ impl<'a> GlyphStore {
|
|||
character: char,
|
||||
data: &GlyphData) {
|
||||
let glyph_is_compressible = is_simple_glyph_id(data.id) &&
|
||||
is_simple_advance(data.advance)
|
||||
&& data.offset == Point2D::zero()
|
||||
&& data.cluster_start; // others are stored in detail buffer
|
||||
is_simple_advance(data.advance) &&
|
||||
data.offset == Point2D::zero() &&
|
||||
data.cluster_start; // others are stored in detail buffer
|
||||
|
||||
debug_assert!(data.ligature_start); // can't compress ligature continuation glyphs.
|
||||
debug_assert!(i < self.char_len());
|
||||
|
|
|
@ -412,8 +412,8 @@ impl Shaper {
|
|||
|
||||
let mut covered_byte_span = char_byte_span.clone();
|
||||
// extend, clipping at end of text range.
|
||||
while covered_byte_span.end() < byte_max
|
||||
&& byte_to_glyph[covered_byte_span.end()] == NO_GLYPH {
|
||||
while covered_byte_span.end() < byte_max &&
|
||||
byte_to_glyph[covered_byte_span.end()] == NO_GLYPH {
|
||||
let range = text.char_range_at(covered_byte_span.end());
|
||||
drop(range.ch);
|
||||
covered_byte_span.extend_to(range.next);
|
||||
|
|
|
@ -194,9 +194,9 @@ impl<'a> PostorderFlowTraversal for AssignBSizes<'a> {
|
|||
#[inline]
|
||||
fn should_process(&self, flow: &mut Flow) -> bool {
|
||||
let base = flow::base(flow);
|
||||
base.restyle_damage.intersects(REFLOW_OUT_OF_FLOW | REFLOW)
|
||||
base.restyle_damage.intersects(REFLOW_OUT_OF_FLOW | REFLOW) &&
|
||||
// The fragmentation countainer is responsible for calling Flow::fragment recursively
|
||||
&& !base.flags.contains(CAN_BE_FRAGMENTED)
|
||||
!base.flags.contains(CAN_BE_FRAGMENTED)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -136,10 +136,10 @@ impl Cookie {
|
|||
if string == domain_string {
|
||||
return true;
|
||||
}
|
||||
if string.ends_with(domain_string)
|
||||
&& string.as_bytes()[string.len()-domain_string.len()-1] == b'.'
|
||||
&& string.parse::<Ipv4Addr>().is_err()
|
||||
&& string.parse::<Ipv6Addr>().is_err() {
|
||||
if string.ends_with(domain_string) &&
|
||||
string.as_bytes()[string.len()-domain_string.len()-1] == b'.' &&
|
||||
string.parse::<Ipv4Addr>().is_err() &&
|
||||
string.parse::<Ipv6Addr>().is_err() {
|
||||
return true;
|
||||
}
|
||||
false
|
||||
|
|
|
@ -28,8 +28,8 @@ impl LateLintPass for TransmutePass {
|
|||
match expr.node {
|
||||
hir::ExprPath(_, ref path) => {
|
||||
if path.segments.last()
|
||||
.map_or(false, |ref segment| segment.identifier.name.as_str() == "transmute")
|
||||
&& args.len() == 1 {
|
||||
.map_or(false, |ref segment| segment.identifier.name.as_str() == "transmute") &&
|
||||
args.len() == 1 {
|
||||
let tcx = cx.tcx;
|
||||
cx.span_lint(TRANSMUTE_TYPE_LINT, ex.span,
|
||||
&format!("Transmute to {:?} from {:?} detected",
|
||||
|
|
|
@ -161,8 +161,8 @@ impl HTMLCollection {
|
|||
}
|
||||
impl CollectionFilter for TagNameNSFilter {
|
||||
fn filter(&self, elem: &Element, _root: &Node) -> bool {
|
||||
((self.qname.ns == Namespace(atom!("*"))) || (self.qname.ns == *elem.namespace()))
|
||||
&& ((self.qname.local == atom!("*")) || (self.qname.local == *elem.local_name()))
|
||||
((self.qname.ns == Namespace(atom!("*"))) || (self.qname.ns == *elem.namespace())) &&
|
||||
((self.qname.local == atom!("*")) || (self.qname.local == *elem.local_name()))
|
||||
}
|
||||
}
|
||||
let filter = TagNameNSFilter {
|
||||
|
|
|
@ -244,8 +244,8 @@ impl HTMLFormElement {
|
|||
let base = doc.url();
|
||||
// TODO: Handle browsing contexts
|
||||
// Step 4
|
||||
if submit_method_flag == SubmittedFrom::NotFromFormSubmitMethod
|
||||
&& !submitter.no_validate(self)
|
||||
if submit_method_flag == SubmittedFrom::NotFromFormSubmitMethod &&
|
||||
!submitter.no_validate(self)
|
||||
{
|
||||
if self.interactive_validation().is_err() {
|
||||
// TODO: Implement event handlers on all form control elements
|
||||
|
|
|
@ -132,8 +132,8 @@ impl HTMLTableElementMethods for HTMLTableElement {
|
|||
|
||||
impl CollectionFilter for TableRowFilter {
|
||||
fn filter(&self, elem: &Element, root: &Node) -> bool {
|
||||
elem.is::<HTMLTableRowElement>()
|
||||
&& (root.is_parent_of(elem.upcast())
|
||||
elem.is::<HTMLTableRowElement>() &&
|
||||
(root.is_parent_of(elem.upcast())
|
||||
|| self.sections.iter().any(|ref section| section.is_parent_of(elem.upcast())))
|
||||
}
|
||||
}
|
||||
|
@ -250,9 +250,9 @@ impl HTMLTableElementMethods for HTMLTableElement {
|
|||
struct TBodiesFilter;
|
||||
impl CollectionFilter for TBodiesFilter {
|
||||
fn filter(&self, elem: &Element, root: &Node) -> bool {
|
||||
elem.is::<HTMLTableSectionElement>()
|
||||
&& elem.local_name() == &atom!("tbody")
|
||||
&& elem.upcast::<Node>().GetParentNode().r() == Some(root)
|
||||
elem.is::<HTMLTableSectionElement>() &&
|
||||
elem.local_name() == &atom!("tbody") &&
|
||||
elem.upcast::<Node>().GetParentNode().r() == Some(root)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -29,8 +29,8 @@ use util::str::DOMString;
|
|||
struct CellsFilter;
|
||||
impl CollectionFilter for CellsFilter {
|
||||
fn filter(&self, elem: &Element, root: &Node) -> bool {
|
||||
(elem.is::<HTMLTableHeaderCellElement>() || elem.is::<HTMLTableDataCellElement>())
|
||||
&& elem.upcast::<Node>().GetParentNode().r() == Some(root)
|
||||
(elem.is::<HTMLTableHeaderCellElement>() || elem.is::<HTMLTableDataCellElement>()) &&
|
||||
elem.upcast::<Node>().GetParentNode().r() == Some(root)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -44,8 +44,8 @@ impl HTMLTableSectionElement {
|
|||
struct RowsFilter;
|
||||
impl CollectionFilter for RowsFilter {
|
||||
fn filter(&self, elem: &Element, root: &Node) -> bool {
|
||||
elem.is::<HTMLTableRowElement>()
|
||||
&& elem.upcast::<Node>().GetParentNode().r() == Some(root)
|
||||
elem.is::<HTMLTableRowElement>() &&
|
||||
elem.upcast::<Node>().GetParentNode().r() == Some(root)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -274,9 +274,9 @@ fn find_native_libs(args: &Args) -> HashMap<String, PathBuf> {
|
|||
(Some(file_name), Some(extension)) => {
|
||||
let file_name = file_name.to_str().unwrap();
|
||||
|
||||
if file_name.starts_with("lib")
|
||||
&& extension == "so"
|
||||
&& args.shared_libraries.contains(file_name) {
|
||||
if file_name.starts_with("lib") &&
|
||||
extension == "so" &&
|
||||
args.shared_libraries.contains(file_name) {
|
||||
println!("Adding the file {:?}", file_name);
|
||||
native_shared_libs.insert(file_name.to_string(), path.to_path_buf().clone());
|
||||
break;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue