Skip to content

Commit

Permalink
Updating changelog and marking enums as non_exhaustive
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelciraci committed Jan 20, 2024
1 parent 6a6c3b7 commit 5313f32
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Expand Up @@ -11,6 +11,7 @@
### Changed

- Made `parse_stream` more versatile by accepting anything that implements `Read`.
- Converted `TargetKind` and `CrateType` to an enum representation.

### Removed

Expand Down
6 changes: 4 additions & 2 deletions src/lib.rs
Expand Up @@ -594,14 +594,15 @@ impl Target {
}
}

#[derive(Clone, Serialize, Deserialize, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
/// Kind of target.
///
/// The possible values are `example`, `test`, `bench`, `custom-build` and
/// [Cargo crate types](https://doc.rust-lang.org/cargo/reference/cargo-targets.html#the-crate-type-field):
/// `bin`, `lib`, `rlib`, `dylib`, `cdylib`, `staticlib`, `proc-macro`.
///
/// Other possible values may be added in the future.
#[derive(Clone, Serialize, Deserialize, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
#[non_exhaustive]
pub enum TargetKind {
/// `cargo bench` target
#[serde(rename = "bench")]
Expand Down Expand Up @@ -660,13 +661,14 @@ impl From<&str> for TargetKind {
}
}

#[derive(Clone, Serialize, Deserialize, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
/// Similar to `kind`, but only reports the
/// [Cargo crate types](https://doc.rust-lang.org/cargo/reference/cargo-targets.html#the-crate-type-field):
/// `bin`, `lib`, `rlib`, `dylib`, `cdylib`, `staticlib`, `proc-macro`.
/// Everything that's not a proc macro or a library of some kind is reported as "bin".
///
/// Other possible values may be added in the future.
#[derive(Clone, Serialize, Deserialize, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
#[non_exhaustive]
pub enum CrateType {
/// Binary executable target
#[serde(rename = "bin")]
Expand Down

0 comments on commit 5313f32

Please sign in to comment.