From ad8be1fdd5920dd0c72462581a8141dc90e29d7e Mon Sep 17 00:00:00 2001 From: "Adam H. Leventhal" Date: Sat, 10 Sep 2022 09:41:07 -0700 Subject: [PATCH] update to typify 0.0.10 --- Cargo.lock | 15 +++-- progenitor-impl/Cargo.toml | 4 +- .../tests/output/nexus-builder-tagged.out | 56 +++++++++++++++++++ .../tests/output/nexus-builder.out | 56 +++++++++++++++++++ .../tests/output/nexus-positional.out | 56 +++++++++++++++++++ 5 files changed, 179 insertions(+), 8 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index d47ec4a..0faf805 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1817,8 +1817,9 @@ checksum = "dcf81ac59edc17cc8697ff311e8f5ef2d99fcbd9817b34cec66f90b6c3dfd987" [[package]] name = "typify" -version = "0.0.10-dev" -source = "git+https://github.com/oxidecomputer/typify#4142db962b4c15270fe776c571bf0542f1270a47" +version = "0.0.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2e8486352f3c946e69f983558cfc09b295250b01e01b381ec67a05a812d01d63" dependencies = [ "typify-impl", "typify-macro", @@ -1826,8 +1827,9 @@ dependencies = [ [[package]] name = "typify-impl" -version = "0.0.10-dev" -source = "git+https://github.com/oxidecomputer/typify#4142db962b4c15270fe776c571bf0542f1270a47" +version = "0.0.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7624d0b911df6e2bbf34a236f76281f93b294cdde1d4df1dbdb748e5a7fefa5" dependencies = [ "heck", "log", @@ -1844,8 +1846,9 @@ dependencies = [ [[package]] name = "typify-macro" -version = "0.0.10-dev" -source = "git+https://github.com/oxidecomputer/typify#4142db962b4c15270fe776c571bf0542f1270a47" +version = "0.0.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c42802aa033cee7650a4e1509ba7d5848a56f84be7c4b31e4385ee12445e942" dependencies = [ "proc-macro2", "quote", diff --git a/progenitor-impl/Cargo.toml b/progenitor-impl/Cargo.toml index 33a1368..4a99219 100644 --- a/progenitor-impl/Cargo.toml +++ b/progenitor-impl/Cargo.toml @@ -21,8 +21,8 @@ serde_json = "1.0" syn = { version = "1.0", features = ["parsing"] } thiserror = "1.0" # To publish, use a numbered version -#typify = "0.0.9" -typify = { git = "https://github.com/oxidecomputer/typify" } +typify = "0.0.10" +#typify = { git = "https://github.com/oxidecomputer/typify" } unicode-ident = "1.0.3" [dev-dependencies] diff --git a/progenitor-impl/tests/output/nexus-builder-tagged.out b/progenitor-impl/tests/output/nexus-builder-tagged.out index 4c1f9f1..5c4bfe1 100644 --- a/progenitor-impl/tests/output/nexus-builder-tagged.out +++ b/progenitor-impl/tests/output/nexus-builder-tagged.out @@ -1325,6 +1325,13 @@ pub mod types { } } + impl std::convert::TryFrom<&String> for IpNet { + type Error = &'static str; + fn try_from(value: &String) -> Result { + Self::try_from(value.as_str()) + } + } + impl std::convert::TryFrom for IpNet { type Error = &'static str; fn try_from(value: String) -> Result { @@ -1460,6 +1467,13 @@ pub mod types { } } + impl std::convert::TryFrom<&String> for Ipv4Net { + type Error = &'static str; + fn try_from(value: &String) -> Result { + Self::try_from(value.as_str()) + } + } + impl std::convert::TryFrom for Ipv4Net { type Error = &'static str; fn try_from(value: String) -> Result { @@ -1510,6 +1524,13 @@ pub mod types { } } + impl std::convert::TryFrom<&String> for Ipv6Net { + type Error = &'static str; + fn try_from(value: &String) -> Result { + Self::try_from(value.as_str()) + } + } + impl std::convert::TryFrom for Ipv6Net { type Error = &'static str; fn try_from(value: String) -> Result { @@ -1573,6 +1594,13 @@ pub mod types { } } + impl std::convert::TryFrom<&String> for L4PortRange { + type Error = &'static str; + fn try_from(value: &String) -> Result { + Self::try_from(value.as_str()) + } + } + impl std::convert::TryFrom for L4PortRange { type Error = &'static str; fn try_from(value: String) -> Result { @@ -1620,6 +1648,13 @@ pub mod types { } } + impl std::convert::TryFrom<&String> for MacAddr { + type Error = &'static str; + fn try_from(value: &String) -> Result { + Self::try_from(value.as_str()) + } + } + impl std::convert::TryFrom for MacAddr { type Error = &'static str; fn try_from(value: String) -> Result { @@ -1689,6 +1724,13 @@ pub mod types { } } + impl std::convert::TryFrom<&String> for Name { + type Error = &'static str; + fn try_from(value: &String) -> Result { + Self::try_from(value.as_str()) + } + } + impl std::convert::TryFrom for Name { type Error = &'static str; fn try_from(value: String) -> Result { @@ -2216,6 +2258,13 @@ pub mod types { } } + impl std::convert::TryFrom<&String> for RoleName { + type Error = &'static str; + fn try_from(value: &String) -> Result { + Self::try_from(value.as_str()) + } + } + impl std::convert::TryFrom for RoleName { type Error = &'static str; fn try_from(value: String) -> Result { @@ -2844,6 +2893,13 @@ pub mod types { } } + impl std::convert::TryFrom<&String> for TimeseriesName { + type Error = &'static str; + fn try_from(value: &String) -> Result { + Self::try_from(value.as_str()) + } + } + impl std::convert::TryFrom for TimeseriesName { type Error = &'static str; fn try_from(value: String) -> Result { diff --git a/progenitor-impl/tests/output/nexus-builder.out b/progenitor-impl/tests/output/nexus-builder.out index 46857e8..e1cb1e2 100644 --- a/progenitor-impl/tests/output/nexus-builder.out +++ b/progenitor-impl/tests/output/nexus-builder.out @@ -1345,6 +1345,13 @@ pub mod types { } } + impl std::convert::TryFrom<&String> for IpNet { + type Error = &'static str; + fn try_from(value: &String) -> Result { + Self::try_from(value.as_str()) + } + } + impl std::convert::TryFrom for IpNet { type Error = &'static str; fn try_from(value: String) -> Result { @@ -1480,6 +1487,13 @@ pub mod types { } } + impl std::convert::TryFrom<&String> for Ipv4Net { + type Error = &'static str; + fn try_from(value: &String) -> Result { + Self::try_from(value.as_str()) + } + } + impl std::convert::TryFrom for Ipv4Net { type Error = &'static str; fn try_from(value: String) -> Result { @@ -1530,6 +1544,13 @@ pub mod types { } } + impl std::convert::TryFrom<&String> for Ipv6Net { + type Error = &'static str; + fn try_from(value: &String) -> Result { + Self::try_from(value.as_str()) + } + } + impl std::convert::TryFrom for Ipv6Net { type Error = &'static str; fn try_from(value: String) -> Result { @@ -1593,6 +1614,13 @@ pub mod types { } } + impl std::convert::TryFrom<&String> for L4PortRange { + type Error = &'static str; + fn try_from(value: &String) -> Result { + Self::try_from(value.as_str()) + } + } + impl std::convert::TryFrom for L4PortRange { type Error = &'static str; fn try_from(value: String) -> Result { @@ -1640,6 +1668,13 @@ pub mod types { } } + impl std::convert::TryFrom<&String> for MacAddr { + type Error = &'static str; + fn try_from(value: &String) -> Result { + Self::try_from(value.as_str()) + } + } + impl std::convert::TryFrom for MacAddr { type Error = &'static str; fn try_from(value: String) -> Result { @@ -1709,6 +1744,13 @@ pub mod types { } } + impl std::convert::TryFrom<&String> for Name { + type Error = &'static str; + fn try_from(value: &String) -> Result { + Self::try_from(value.as_str()) + } + } + impl std::convert::TryFrom for Name { type Error = &'static str; fn try_from(value: String) -> Result { @@ -2244,6 +2286,13 @@ pub mod types { } } + impl std::convert::TryFrom<&String> for RoleName { + type Error = &'static str; + fn try_from(value: &String) -> Result { + Self::try_from(value.as_str()) + } + } + impl std::convert::TryFrom for RoleName { type Error = &'static str; fn try_from(value: String) -> Result { @@ -2876,6 +2925,13 @@ pub mod types { } } + impl std::convert::TryFrom<&String> for TimeseriesName { + type Error = &'static str; + fn try_from(value: &String) -> Result { + Self::try_from(value.as_str()) + } + } + impl std::convert::TryFrom for TimeseriesName { type Error = &'static str; fn try_from(value: String) -> Result { diff --git a/progenitor-impl/tests/output/nexus-positional.out b/progenitor-impl/tests/output/nexus-positional.out index 916cfb7..fe20604 100644 --- a/progenitor-impl/tests/output/nexus-positional.out +++ b/progenitor-impl/tests/output/nexus-positional.out @@ -1121,6 +1121,13 @@ pub mod types { } } + impl std::convert::TryFrom<&String> for IpNet { + type Error = &'static str; + fn try_from(value: &String) -> Result { + Self::try_from(value.as_str()) + } + } + impl std::convert::TryFrom for IpNet { type Error = &'static str; fn try_from(value: String) -> Result { @@ -1220,6 +1227,13 @@ pub mod types { } } + impl std::convert::TryFrom<&String> for Ipv4Net { + type Error = &'static str; + fn try_from(value: &String) -> Result { + Self::try_from(value.as_str()) + } + } + impl std::convert::TryFrom for Ipv4Net { type Error = &'static str; fn try_from(value: String) -> Result { @@ -1264,6 +1278,13 @@ pub mod types { } } + impl std::convert::TryFrom<&String> for Ipv6Net { + type Error = &'static str; + fn try_from(value: &String) -> Result { + Self::try_from(value.as_str()) + } + } + impl std::convert::TryFrom for Ipv6Net { type Error = &'static str; fn try_from(value: String) -> Result { @@ -1321,6 +1342,13 @@ pub mod types { } } + impl std::convert::TryFrom<&String> for L4PortRange { + type Error = &'static str; + fn try_from(value: &String) -> Result { + Self::try_from(value.as_str()) + } + } + impl std::convert::TryFrom for L4PortRange { type Error = &'static str; fn try_from(value: String) -> Result { @@ -1368,6 +1396,13 @@ pub mod types { } } + impl std::convert::TryFrom<&String> for MacAddr { + type Error = &'static str; + fn try_from(value: &String) -> Result { + Self::try_from(value.as_str()) + } + } + impl std::convert::TryFrom for MacAddr { type Error = &'static str; fn try_from(value: String) -> Result { @@ -1425,6 +1460,13 @@ pub mod types { } } + impl std::convert::TryFrom<&String> for Name { + type Error = &'static str; + fn try_from(value: &String) -> Result { + Self::try_from(value.as_str()) + } + } + impl std::convert::TryFrom for Name { type Error = &'static str; fn try_from(value: String) -> Result { @@ -1838,6 +1880,13 @@ pub mod types { } } + impl std::convert::TryFrom<&String> for RoleName { + type Error = &'static str; + fn try_from(value: &String) -> Result { + Self::try_from(value.as_str()) + } + } + impl std::convert::TryFrom for RoleName { type Error = &'static str; fn try_from(value: String) -> Result { @@ -2328,6 +2377,13 @@ pub mod types { } } + impl std::convert::TryFrom<&String> for TimeseriesName { + type Error = &'static str; + fn try_from(value: &String) -> Result { + Self::try_from(value.as_str()) + } + } + impl std::convert::TryFrom for TimeseriesName { type Error = &'static str; fn try_from(value: String) -> Result {