Skip to content

Commit

Permalink
Remove duplicate re-export of Model macro (#1864)
Browse files Browse the repository at this point in the history
Also re-exports `Model` from `azure_core` along with some other types that were exported from the crate root in track 1.
  • Loading branch information
heaths authored Oct 22, 2024
1 parent 8a12d75 commit 1038a6f
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 10 deletions.
8 changes: 5 additions & 3 deletions sdk/core/azure_core/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ pub use models::*;
pub use options::*;
pub use pipeline::*;
pub use policies::*;
pub use typespec_client_core::http::response::{Model, PinnedStream, Response, ResponseBody};

// Re-export typespec types that are not specific to Azure.
pub use typespec::{Error, Result};
Expand All @@ -51,8 +50,11 @@ pub use typespec_client_core::xml;
pub use typespec_client_core::{
base64, date,
http::{
headers::Header, new_http_client, AppendToUrlQuery, Body, Context, HttpClient, Method,
Pager, Request, RequestContent, StatusCode, Url,
headers::Header,
new_http_client,
response::{Model, PinnedStream, Response, ResponseBody},
AppendToUrlQuery, Body, Context, HttpClient, Method, Pager, Request, RequestContent,
StatusCode, Url,
},
json, parsing,
sleep::{self, sleep},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,9 @@

#![allow(dead_code)]

use azure_core::credentials::Secret;
use azure_core::{credentials::Secret, Model};
use serde::{Deserialize, Deserializer};
use time::OffsetDateTime;
use typespec_client_core::Model;

#[derive(Debug, Clone, Deserialize)]
struct RawLoginResponse {
Expand Down
3 changes: 1 addition & 2 deletions sdk/identity/azure_identity/src/refresh_token.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,11 @@ use azure_core::{
error::{http_response_from_body, Error, ErrorKind, ResultExt},
headers,
json::from_json,
HttpClient, Method, Request, Url,
HttpClient, Method, Model, Request, Url,
};
use serde::Deserialize;
use std::fmt;
use std::sync::Arc;
use typespec_client_core::Model;
use url::form_urlencoded;

/// Exchange a refresh token for a new access token and refresh token.
Expand Down
3 changes: 0 additions & 3 deletions sdk/typespec/typespec_client_core/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,3 @@ pub mod xml;
pub use crate::error::{Error, Result};
pub use bytes::Bytes;
pub use uuid::Uuid;

#[cfg(feature = "derive")]
pub use typespec_derive::Model;

0 comments on commit 1038a6f

Please sign in to comment.