diff options
author | Pyfisch <pyfisch@gmail.com> | 2018-08-24 15:44:25 +0200 |
---|---|---|
committer | Pyfisch <pyfisch@gmail.com> | 2018-09-01 13:24:57 +0200 |
commit | 349047b096fc8d121bc1a5be1ab74eabe648285b (patch) | |
tree | a18c07097a9935a54c8c2f5c5a317a8479bc1dcf /components/layout/persistent_list.rs | |
parent | 577830de909dd692f2d178d139984f45bbf929c3 (diff) | |
download | servo-349047b096fc8d121bc1a5be1ab74eabe648285b.tar.gz servo-349047b096fc8d121bc1a5be1ab74eabe648285b.zip |
Rustfmt layout crate
Diffstat (limited to 'components/layout/persistent_list.rs')
-rw-r--r-- | components/layout/persistent_list.rs | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/components/layout/persistent_list.rs b/components/layout/persistent_list.rs index 8de9daa2ed4..0a8337bfaa7 100644 --- a/components/layout/persistent_list.rs +++ b/components/layout/persistent_list.rs @@ -18,7 +18,10 @@ struct PersistentListEntry<T> { type PersistentListLink<T> = Option<Arc<PersistentListEntry<T>>>; -impl<T> PersistentList<T> where T: Send + Sync { +impl<T> PersistentList<T> +where + T: Send + Sync, +{ #[inline] pub fn new() -> PersistentList<T> { PersistentList { @@ -58,7 +61,10 @@ impl<T> PersistentList<T> where T: Send + Sync { } } -impl<T> Clone for PersistentList<T> where T: Send + Sync { +impl<T> Clone for PersistentList<T> +where + T: Send + Sync, +{ fn clone(&self) -> PersistentList<T> { // This establishes the persistent nature of this list: we can clone a list by just cloning // its head. @@ -69,11 +75,17 @@ impl<T> Clone for PersistentList<T> where T: Send + Sync { } } -pub struct PersistentListIterator<'a, T> where T: 'a + Send + Sync { +pub struct PersistentListIterator<'a, T> +where + T: 'a + Send + Sync, +{ entry: Option<&'a PersistentListEntry<T>>, } -impl<'a, T> Iterator for PersistentListIterator<'a, T> where T: Send + Sync + 'static { +impl<'a, T> Iterator for PersistentListIterator<'a, T> +where + T: Send + Sync + 'static, +{ type Item = &'a T; #[inline] |