Commit 5ce50ae 1 parent 37efb88 commit 5ce50ae Copy full SHA for 5ce50ae
File tree 3 files changed +9
-23
lines changed
opentelemetry-sdk/src/logs
3 files changed +9
-23
lines changed Original file line number Diff line number Diff line change @@ -88,12 +88,8 @@ pub(crate) mod tests {
88
88
}
89
89
90
90
impl LogExporter for MockLogExporter {
91
- #[ allow( clippy:: manual_async_fn) ]
92
- fn export (
93
- & self ,
94
- _batch : LogBatch < ' _ > ,
95
- ) -> impl std:: future:: Future < Output = OTelSdkResult > + Send {
96
- async { Ok ( ( ) ) }
91
+ async fn export ( & self , _batch : LogBatch < ' _ > ) -> OTelSdkResult {
92
+ Ok ( ( ) )
97
93
}
98
94
99
95
fn shutdown ( & mut self ) -> OTelSdkResult {
Original file line number Diff line number Diff line change @@ -317,12 +317,8 @@ mod tests {
317
317
}
318
318
319
319
impl LogExporter for MockLogExporter {
320
- #[ allow( clippy:: manual_async_fn) ]
321
- fn export (
322
- & self ,
323
- _batch : LogBatch < ' _ > ,
324
- ) -> impl std:: future:: Future < Output = OTelSdkResult > + Send {
325
- async { Ok ( ( ) ) }
320
+ async fn export ( & self , _batch : LogBatch < ' _ > ) -> OTelSdkResult {
321
+ Ok ( ( ) )
326
322
}
327
323
328
324
fn shutdown ( & mut self ) -> OTelSdkResult {
Original file line number Diff line number Diff line change @@ -168,20 +168,14 @@ mod tests {
168
168
}
169
169
170
170
impl LogExporter for LogExporterThatRequiresTokio {
171
- #[ allow( clippy:: manual_async_fn) ]
172
- fn export (
173
- & self ,
174
- batch : LogBatch < ' _ > ,
175
- ) -> impl std:: future:: Future < Output = OTelSdkResult > + Send {
171
+ async fn export ( & self , batch : LogBatch < ' _ > ) -> OTelSdkResult {
176
172
// Simulate minimal dependency on tokio by sleeping asynchronously for a short duration
177
- async move {
178
- tokio:: time:: sleep ( Duration :: from_millis ( 50 ) ) . await ;
173
+ tokio:: time:: sleep ( Duration :: from_millis ( 50 ) ) . await ;
179
174
180
- for _ in batch. iter ( ) {
181
- self . export_count . fetch_add ( 1 , Ordering :: Acquire ) ;
182
- }
183
- Ok ( ( ) )
175
+ for _ in batch. iter ( ) {
176
+ self . export_count . fetch_add ( 1 , Ordering :: Acquire ) ;
184
177
}
178
+ Ok ( ( ) )
185
179
}
186
180
}
187
181
You can’t perform that action at this time.
0 commit comments