Skip to content

Commit 6267c60

Browse files
committed
Added some spacing in const closure
1 parent 53049f7 commit 6267c60

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

library/core/src/const_closure.rs

+10
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ pub(crate) struct ConstFnOnceClosure<CapturedData, Function> {
1717
data: CapturedData,
1818
func: Function,
1919
}
20+
2021
impl<CapturedData, Function> ConstFnOnceClosure<CapturedData, Function> {
2122
/// Function for creating a new closure.
2223
///
@@ -36,6 +37,7 @@ impl<CapturedData, Function> ConstFnOnceClosure<CapturedData, Function> {
3637
Self { data, func }
3738
}
3839
}
40+
3941
impl<CapturedData, ClosureArguments, Function> const FnOnce<ClosureArguments>
4042
for ConstFnOnceClosure<CapturedData, Function>
4143
where
@@ -48,6 +50,7 @@ where
4850
(self.func)(self.data, args)
4951
}
5052
}
53+
5154
/// Struct representing a closure with mutably borrowed data.
5255
///
5356
/// Example:
@@ -68,6 +71,7 @@ pub(crate) struct ConstFnMutClosure<'a, CapturedData: ?Sized, Function> {
6871
data: &'a mut CapturedData,
6972
func: Function,
7073
}
74+
7175
impl<'a, CapturedData: ?Sized, Function> ConstFnMutClosure<'a, CapturedData, Function> {
7276
/// Function for creating a new closure.
7377
///
@@ -85,6 +89,7 @@ impl<'a, CapturedData: ?Sized, Function> ConstFnMutClosure<'a, CapturedData, Fun
8589
Self { data, func }
8690
}
8791
}
92+
8893
impl<'a, CapturedData: ?Sized, ClosureArguments, Function, ClosureReturnValue> const
8994
FnOnce<ClosureArguments> for ConstFnMutClosure<'a, CapturedData, Function>
9095
where
@@ -97,6 +102,7 @@ where
97102
self.call_mut(args)
98103
}
99104
}
105+
100106
impl<'a, CapturedData: ?Sized, ClosureArguments, Function, ClosureReturnValue> const
101107
FnMut<ClosureArguments> for ConstFnMutClosure<'a, CapturedData, Function>
102108
where
@@ -126,6 +132,7 @@ pub(crate) struct ConstFnClosure<'a, CapturedData: ?Sized, Function> {
126132
data: &'a CapturedData,
127133
func: Function,
128134
}
135+
129136
impl<'a, CapturedData: ?Sized, Function> ConstFnClosure<'a, CapturedData, Function> {
130137
/// Function for creating a new closure.
131138
///
@@ -144,6 +151,7 @@ impl<'a, CapturedData: ?Sized, Function> ConstFnClosure<'a, CapturedData, Functi
144151
Self { data, func }
145152
}
146153
}
154+
147155
impl<'a, CapturedData: ?Sized, Function, ClosureArguments, ClosureReturnValue> const
148156
FnOnce<ClosureArguments> for ConstFnClosure<'a, CapturedData, Function>
149157
where
@@ -155,6 +163,7 @@ where
155163
self.call_mut(args)
156164
}
157165
}
166+
158167
impl<'a, CapturedData: ?Sized, Function, ClosureArguments, ClosureReturnValue> const
159168
FnMut<ClosureArguments> for ConstFnClosure<'a, CapturedData, Function>
160169
where
@@ -164,6 +173,7 @@ where
164173
self.call(args)
165174
}
166175
}
176+
167177
impl<
168178
'a,
169179
CapturedData: ?Sized,

0 commit comments

Comments
 (0)