Skip to content

Commit a0f7e7f

Browse files
xtask: rename Package::as_str to Package::name and make pub
1 parent d6edea5 commit a0f7e7f

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

xtask/src/cargo.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ pub enum Package {
1616
}
1717

1818
impl Package {
19-
fn as_str(self) -> &'static str {
19+
/// Get package name.
20+
pub fn name(self) -> &'static str {
2021
match self {
2122
Self::Uefi => "uefi",
2223
Self::UefiApp => "uefi_app",
@@ -304,7 +305,7 @@ impl Cargo {
304305
bail!("packages cannot be empty");
305306
}
306307
for package in &self.packages {
307-
cmd.args(["--package", package.as_str()]);
308+
cmd.args(["--package", package.name()]);
308309
}
309310

310311
if !self.features.is_empty() {

0 commit comments

Comments
 (0)