1
+ // Copyright 2021-Present Datadog, Inc.
2
+ //
3
+ // Licensed under the Apache License, Version 2.0 (the "License");
4
+ // you may not use this file except in compliance with the License.
5
+ // You may obtain a copy of the License at
6
+ //
7
+ // http://www.apache.org/licenses/LICENSE-2.0
8
+ //
9
+ // Unless required by applicable law or agreed to in writing, software
10
+ // distributed under the License is distributed on an "AS IS" BASIS,
11
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ // See the License for the specific language governing permissions and
13
+ // limitations under the License.
14
+
1
15
use std:: borrow:: Cow ;
2
16
use std:: io;
3
17
use std:: marker:: PhantomData ;
@@ -10,6 +24,7 @@ use tokio::io::{AsyncBufRead, AsyncWrite};
10
24
11
25
use crate :: STORAGE_METRICS ;
12
26
27
+ #[ allow( dead_code) ]
13
28
pub enum Status {
14
29
Pending ,
15
30
Done ,
@@ -167,8 +182,10 @@ where E: aws_sdk_s3::error::ProvideErrorMetadata
167
182
}
168
183
}
169
184
185
+ #[ cfg( feature = "azure" ) ]
170
186
pub struct AzureMarker ;
171
187
188
+ #[ cfg( feature = "azure" ) ]
172
189
impl < R > AsStatus < AzureMarker > for Result < R , azure_storage:: Error > {
173
190
fn as_status ( & self ) -> Status {
174
191
let Err ( err) = self else {
@@ -187,6 +204,7 @@ impl<R> AsStatus<AzureMarker> for Result<R, azure_storage::Error> {
187
204
188
205
// The Azure SDK get_blob request returns Option<Result> because it chunks
189
206
// the download into a stream of get requests.
207
+ #[ cfg( feature = "azure" ) ]
190
208
impl < R > AsStatus < AzureMarker > for Option < Result < R , azure_storage:: Error > > {
191
209
fn as_status ( & self ) -> Status {
192
210
match self {
0 commit comments