Skip to content

Commit 2943ea0

Browse files
committed
fix conditional imports
1 parent 361a9f0 commit 2943ea0

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

sdk/cosmosdb/azure_data_cosmos/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ categories = ["api-bindings"]
1818
[dependencies]
1919
async-trait.workspace = true
2020
azure_core.workspace = true
21-
typespec_client_core.workspace = true
21+
typespec_client_core = { workspace = true, features = ["derive"] }
2222
time.workspace = true
2323
tracing.workspace = true
2424
url.workspace = true

sdk/cosmosdb/azure_data_cosmos/src/authorization_policy.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -266,8 +266,8 @@ fn string_to_sign(signature_target: SignatureTarget) -> String {
266266

267267
#[cfg(test)]
268268
mod tests {
269+
#[cfg(feature = "key-auth")]
269270
use azure_core::auth::AccessToken;
270-
use time::Duration;
271271

272272
use super::*;
273273

@@ -283,7 +283,7 @@ mod tests {
283283
let token = format!("{}+{}", self.0, scopes.join(","));
284284
Ok(AccessToken::new(
285285
token,
286-
OffsetDateTime::now_utc().saturating_add(Duration::minutes(5)),
286+
OffsetDateTime::now_utc().saturating_add(time::Duration::minutes(5)),
287287
))
288288
}
289289

0 commit comments

Comments
 (0)