diff --git a/crates/manifest/src/schema/v2.rs b/crates/manifest/src/schema/v2.rs index a88910d6f2..4397dbccc3 100644 --- a/crates/manifest/src/schema/v2.rs +++ b/crates/manifest/src/schema/v2.rs @@ -197,20 +197,12 @@ pub struct Component { /// Component dependencies #[derive(Clone, Debug, Default, Serialize, Deserialize)] -#[serde(try_from = "Map")] +#[serde(transparent)] pub struct ComponentDependencies { /// `dependencies = { "foo:bar" = ">= 0.1.0" }` pub inner: Map, } -impl TryFrom> for ComponentDependencies { - type Error = anyhow::Error; - - fn try_from(value: Map) -> Result { - Ok(ComponentDependencies { inner: value }) - } -} - impl ComponentDependencies { /// This method validates the correct specification of dependencies in a /// component section of the manifest. See the documentation on the methods diff --git a/crates/manifest/tests/ui/maximal.json b/crates/manifest/tests/ui/maximal.json index 75a40f6683..39c71ac290 100644 --- a/crates/manifest/tests/ui/maximal.json +++ b/crates/manifest/tests/ui/maximal.json @@ -90,28 +90,26 @@ }, "dependencies_inherit_configuration": true, "dependencies": { - "inner": { - "a:b/c": { - "version": "^1.2.3", - "registry": "my-registry.com", - "package": "a:b", - "export": "foo" - }, - "foo:bar/baz@0.1.0": { - "path": "path/to/component.wasm", - "export": null - }, - "fib:fub/fob": { - "path": "path/to/component.wasm", - "export": "my-export" - }, - "fizz:buzz": ">=0.1.0", - "abc:xyz@0.1.0": { - "version": "=0.1.0", - "registry": null, - "package": null, - "export": null - } + "a:b/c": { + "version": "^1.2.3", + "registry": "my-registry.com", + "package": "a:b", + "export": "foo" + }, + "foo:bar/baz@0.1.0": { + "path": "path/to/component.wasm", + "export": null + }, + "fib:fub/fob": { + "path": "path/to/component.wasm", + "export": "my-export" + }, + "fizz:buzz": ">=0.1.0", + "abc:xyz@0.1.0": { + "version": "=0.1.0", + "registry": null, + "package": null, + "export": null } } }