mirror of
https://github.com/servo/servo.git
synced 2025-08-04 05:00:08 +01:00
Auto merge of #17998 - emilio:outdated, r=SimonSapin
style: Remove outdated comments. (And tidy a bit a misindented function while at it). <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/17998) <!-- Reviewable:end -->
This commit is contained in:
commit
82de4c49f3
1 changed files with 6 additions and 8 deletions
|
@ -403,10 +403,12 @@ impl<T: SelectorMapEntry> SelectorMap<T> {
|
||||||
///
|
///
|
||||||
/// The first non-None value returned from |f| is returned.
|
/// The first non-None value returned from |f| is returned.
|
||||||
#[inline(always)]
|
#[inline(always)]
|
||||||
fn find_from_left<F, R>(mut iter: SelectorIter<SelectorImpl>,
|
fn find_from_left<F, R>(
|
||||||
mut f: F)
|
mut iter: SelectorIter<SelectorImpl>,
|
||||||
-> Option<R>
|
mut f: F
|
||||||
where F: FnMut(&Component<SelectorImpl>) -> Option<R>,
|
) -> Option<R>
|
||||||
|
where
|
||||||
|
F: FnMut(&Component<SelectorImpl>) -> Option<R>,
|
||||||
{
|
{
|
||||||
for ss in &mut iter {
|
for ss in &mut iter {
|
||||||
if let Some(r) = f(ss) {
|
if let Some(r) = f(ss) {
|
||||||
|
@ -432,8 +434,6 @@ fn find_from_left<F, R>(mut iter: SelectorIter<SelectorImpl>,
|
||||||
pub fn get_id_name(iter: SelectorIter<SelectorImpl>)
|
pub fn get_id_name(iter: SelectorIter<SelectorImpl>)
|
||||||
-> Option<Atom> {
|
-> Option<Atom> {
|
||||||
find_from_left(iter, |ss| {
|
find_from_left(iter, |ss| {
|
||||||
// TODO(pradeep): Implement case-sensitivity based on the
|
|
||||||
// document type and quirks mode.
|
|
||||||
if let Component::ID(ref id) = *ss {
|
if let Component::ID(ref id) = *ss {
|
||||||
return Some(id.clone());
|
return Some(id.clone());
|
||||||
}
|
}
|
||||||
|
@ -446,8 +446,6 @@ pub fn get_id_name(iter: SelectorIter<SelectorImpl>)
|
||||||
pub fn get_class_name(iter: SelectorIter<SelectorImpl>)
|
pub fn get_class_name(iter: SelectorIter<SelectorImpl>)
|
||||||
-> Option<Atom> {
|
-> Option<Atom> {
|
||||||
find_from_left(iter, |ss| {
|
find_from_left(iter, |ss| {
|
||||||
// TODO(pradeep): Implement case-sensitivity based on the
|
|
||||||
// document type and quirks mode.
|
|
||||||
if let Component::Class(ref class) = *ss {
|
if let Component::Class(ref class) = *ss {
|
||||||
return Some(class.clone());
|
return Some(class.clone());
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue