Closed maxdeviant closed 6 years ago
@yoshuawuyts I changed the two problematic collections to own their data instead of holding references and then used clone
in the builder to avoid changing the public API.
If you'd rather we change that instead to avoid a clone
, let me know.
Ohhh, this is perfect! Hadn't even thought of using clone
here! Thanks so much!
Pushed this version!
Hmm, something that's not clear to me still is how we could implement a Manifest::from_str()
method. I reckon most people that want to deserialize are probably reading a file from disk.
For example this doesn't work:
/// Create an instance from a string.
pub fn from_str(input: &'s str) -> Result<Self, Error> {
let manifest: Self = serde_json::from_str(input)?;
Ok(manifest)
}
@maxdeviant any thoughts?
Choose one: this is a 🙋 feature
This PR derives
Deserialize
forManifest
.Had to change the
icons
andrelated_applications
collections to own their data, but the change should be transparent to consumers.Checklist
Context
Closes #1.
Semver Changes
Minor