-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The new `Release` struct encapsulates `Distribution` and adds a `release` field that contains JWS-signed release metadata. It currently only supports v2 metadata, but offers the same traits, constructors, and accessors as `Distribution`, plus the `release()` accessor and associated objects. Add tests for all of these bits, using both the v2 corpus with a release patch applied and custom JSON objects to test each individual struct and its accessors. Writing the tests for the `TryFrom<PathBuf>` when what was on hand was a `Path` led to a bit of research and the conclusion that one does not convert a file path into a struct, but loads it into a struct. So create the `load` function, instead, and have it accept a `AsRef<Path>` argument, which covers `Path`s, `PathBuf`s, and strings. Back-patch this change to `Distribution`, as well, and take advantage of `.try_into()` where possible.
- Loading branch information
Showing
8 changed files
with
1,430 additions
and
21 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
use super::*; | ||
use std::path::PathBuf; | ||
|
||
#[test] | ||
fn test_v1_v2_common() { | ||
|
Oops, something went wrong.