Skip to content

Commit 08a1e55

Browse files
authored
Remove parsing module (#2389)
The parsing module only contained the `FromStringOptional` trait implemented for a few primitives and implemented by our `create_enum` macros. But it's not used, and I could find no use of it even in the `legacy` branch. Maybe it once was, but it really is just `FromStr` now with `FromStr::Err` set to `typespec::error::Error`. No need to keep it, and it just creates problems for re-exporting macros into `azure_core` without necessitating a dependency on `typespec_client_core`.
1 parent 2eee923 commit 08a1e55

File tree

6 files changed

+3
-51
lines changed

6 files changed

+3
-51
lines changed

sdk/core/azure_core/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@
4545
- Removed `EMPTY_BODY` constant from root.
4646
- Removed `future!()` macro.
4747
- Removed `Header` re-export from `http` module. It is still defined in the `http::headers` module.
48+
- Removed `parsing` module.
4849
- Removed `query_param` module.
4950
- Removed `RequestId` type alias from root.
5051
- Removed `SessionToken` type alias from root.

sdk/core/azure_core/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ pub use constants::*;
2424
pub use typespec_client_core::{
2525
base64, create_enum, create_extensible_enum, date,
2626
error::{self, Error, Result},
27-
fmt, json, parsing, sleep, stream, Bytes, Uuid,
27+
fmt, json, sleep, stream, Bytes, Uuid,
2828
};
2929

3030
#[cfg(feature = "xml")]

sdk/typespec/typespec_client_core/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
- Consolidated all the `tokio` features into a single feature named `tokio`. Traits remain separate but `tokio` support is enabled with a single feature.
1010
- Removed `Header` re-export from `http` module. It is still defined in the `http::headers` module.
1111
- Removed `Pager`.
12+
- Removed `parsing` module.
1213

1314
### Bugs Fixed
1415

sdk/typespec/typespec_client_core/src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ pub mod fs;
1515
pub mod http;
1616
#[cfg(feature = "json")]
1717
pub mod json;
18-
pub mod parsing;
1918
pub mod sleep;
2019
pub mod stream;
2120
#[cfg(feature = "xml")]

sdk/typespec/typespec_client_core/src/macros.rs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -101,12 +101,6 @@ macro_rules! create_enum {
101101
return s.serialize_str(&self.to_string())
102102
}
103103
}
104-
105-
impl $crate::parsing::FromStringOptional<$name> for $name {
106-
fn from_str_optional(s : &str) -> $crate::error::Result<$name> {
107-
s.parse::<$name>().map_err(::core::convert::Into::into)
108-
}
109-
}
110104
);
111105
}
112106

sdk/typespec/typespec_client_core/src/parsing.rs

Lines changed: 0 additions & 43 deletions
This file was deleted.

0 commit comments

Comments
 (0)