-
-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The event contains the names (NB: not the package id's) of packages which were detected in the current cargo workspace. Possibly must be sent optionally in the future, because we should also support non cargo workspaces.
- Loading branch information
1 parent
5c396b5
commit 7c100e7
Showing
4 changed files
with
47 additions
and
3 deletions.
There are no files selected for viewing
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 |
---|---|---|
@@ -0,0 +1,19 @@ | ||
use crate::reporter::{Event, Message}; | ||
|
||
#[derive(Clone, Debug, Eq, PartialEq, serde::Serialize)] | ||
#[serde(rename_all = "snake_case")] | ||
pub struct CargoWorkspace { | ||
package_names: Vec<String>, | ||
} | ||
|
||
impl CargoWorkspace { | ||
pub fn new(package_names: Vec<String>) -> Self { | ||
Self { package_names } | ||
} | ||
} | ||
|
||
impl From<CargoWorkspace> for Event { | ||
fn from(it: CargoWorkspace) -> Self { | ||
Message::CargoWorkspace(it).into() | ||
} | ||
} |