servo: Merge #17998 - style: Remove outdated comments (from emilio:outdated); r=SimonSapin

(And tidy a bit a misindented function while at it).

Source-Repo: https://github.com/servo/servo
Source-Revision: 82de4c49f378aed7c9497ba6995020fa79dbf942

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : 74dc73100221a360a89ae5f9d589b1b9b0310db3
This commit is contained in:
Emilio Cobos Álvarez 2017-08-07 13:21:42 -05:00
Родитель 6e103accde
Коммит 2fe95894f9
1 изменённых файлов: 6 добавлений и 8 удалений

Просмотреть файл

@ -403,10 +403,12 @@ impl<T: SelectorMapEntry> SelectorMap<T> {
///
/// The first non-None value returned from |f| is returned.
#[inline(always)]
fn find_from_left<F, R>(mut iter: SelectorIter<SelectorImpl>,
mut f: F)
-> Option<R>
where F: FnMut(&Component<SelectorImpl>) -> Option<R>,
fn find_from_left<F, R>(
mut iter: SelectorIter<SelectorImpl>,
mut f: F
) -> Option<R>
where
F: FnMut(&Component<SelectorImpl>) -> Option<R>,
{
for ss in &mut iter {
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>)
-> Option<Atom> {
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 {
return Some(id.clone());
}
@ -446,8 +446,6 @@ pub fn get_id_name(iter: SelectorIter<SelectorImpl>)
pub fn get_class_name(iter: SelectorIter<SelectorImpl>)
-> Option<Atom> {
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 {
return Some(class.clone());
}