about summary refs log tree commit diff
diff options
context:
space:
mode:
authoronestacked <chrisi.schrefl@gmail.com>2022-09-23 18:20:57 +0200
committeronestacked <chrisi.schrefl@gmail.com>2022-09-23 18:20:57 +0200
commit6267c60f6a1eb8bb135bb3d37edd4ab9ab352d6e (patch)
tree47b49ce7a7dc070d0f9a19c2631df7ebad80b367
parent53049f7dcd382246fb1f7ad975b81e9a293acccd (diff)
downloadrust-6267c60f6a1eb8bb135bb3d37edd4ab9ab352d6e.tar.gz
rust-6267c60f6a1eb8bb135bb3d37edd4ab9ab352d6e.zip
Added some spacing in const closure
-rw-r--r--library/core/src/const_closure.rs10
1 files changed, 10 insertions, 0 deletions
diff --git a/library/core/src/const_closure.rs b/library/core/src/const_closure.rs
index 536c3eb0022..6ea94c95473 100644
--- a/library/core/src/const_closure.rs
+++ b/library/core/src/const_closure.rs
@@ -17,6 +17,7 @@ pub(crate) struct ConstFnOnceClosure<CapturedData, Function> {
     data: CapturedData,
     func: Function,
 }
+
 impl<CapturedData, Function> ConstFnOnceClosure<CapturedData, Function> {
     /// Function for creating a new closure.
     ///
@@ -36,6 +37,7 @@ impl<CapturedData, Function> ConstFnOnceClosure<CapturedData, Function> {
         Self { data, func }
     }
 }
+
 impl<CapturedData, ClosureArguments, Function> const FnOnce<ClosureArguments>
     for ConstFnOnceClosure<CapturedData, Function>
 where
@@ -48,6 +50,7 @@ where
         (self.func)(self.data, args)
     }
 }
+
 /// Struct representing a closure with mutably borrowed data.
 ///
 /// Example:
@@ -68,6 +71,7 @@ pub(crate) struct ConstFnMutClosure<'a, CapturedData: ?Sized, Function> {
     data: &'a mut CapturedData,
     func: Function,
 }
+
 impl<'a, CapturedData: ?Sized, Function> ConstFnMutClosure<'a, CapturedData, Function> {
     /// Function for creating a new closure.
     ///
@@ -85,6 +89,7 @@ impl<'a, CapturedData: ?Sized, Function> ConstFnMutClosure<'a, CapturedData, Fun
         Self { data, func }
     }
 }
+
 impl<'a, CapturedData: ?Sized, ClosureArguments, Function, ClosureReturnValue> const
     FnOnce<ClosureArguments> for ConstFnMutClosure<'a, CapturedData, Function>
 where
@@ -97,6 +102,7 @@ where
         self.call_mut(args)
     }
 }
+
 impl<'a, CapturedData: ?Sized, ClosureArguments, Function, ClosureReturnValue> const
     FnMut<ClosureArguments> for ConstFnMutClosure<'a, CapturedData, Function>
 where
@@ -126,6 +132,7 @@ pub(crate) struct ConstFnClosure<'a, CapturedData: ?Sized, Function> {
     data: &'a CapturedData,
     func: Function,
 }
+
 impl<'a, CapturedData: ?Sized, Function> ConstFnClosure<'a, CapturedData, Function> {
     /// Function for creating a new closure.
     ///
@@ -144,6 +151,7 @@ impl<'a, CapturedData: ?Sized, Function> ConstFnClosure<'a, CapturedData, Functi
         Self { data, func }
     }
 }
+
 impl<'a, CapturedData: ?Sized, Function, ClosureArguments, ClosureReturnValue> const
     FnOnce<ClosureArguments> for ConstFnClosure<'a, CapturedData, Function>
 where
@@ -155,6 +163,7 @@ where
         self.call_mut(args)
     }
 }
+
 impl<'a, CapturedData: ?Sized, Function, ClosureArguments, ClosureReturnValue> const
     FnMut<ClosureArguments> for ConstFnClosure<'a, CapturedData, Function>
 where
@@ -164,6 +173,7 @@ where
         self.call(args)
     }
 }
+
 impl<
     'a,
     CapturedData: ?Sized,