Skip to content

Commit 72e4bfc

Browse files
committed
minor adjustments
1 parent 7e81cc2 commit 72e4bfc

2 files changed

Lines changed: 3 additions & 9 deletions

File tree

src/commands/add/mod.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ pub(crate) struct AddArgs {
1111
/// Pallet to add to the runtime
1212
pub(crate) pallet: AddPallet,
1313
#[arg(global = true, short, long)]
14-
/// Runtime path;
14+
/// Runtime path; for example: `sub0/runtime/src/lib.rs`
1515
/// Cargo Manifest path will be inferred as `../Cargo.toml`
1616
pub(crate) runtime: Option<String>,
1717
}
@@ -37,9 +37,8 @@ impl AddArgs {
3737
let runtime_path = match self.runtime {
3838
Some(ref s) => {
3939
let path = PathBuf::from(s);
40-
// println!("Using runtime path: {}", &path.display());
4140
if !path.exists() {
42-
anyhow::bail!("Runtime path does not exist: {}", path.display());
41+
anyhow::bail!("Invalid runtime path: {}", path.display());
4342
}
4443
path
4544
}

src/engines/pallet_engine/steps.rs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,6 @@ pub(super) enum Steps {
3030
/// PalletEngine State transitions
3131
SwitchTo(State),
3232
}
33-
34-
macro_rules! steps {
35-
($cmd:expr) => {
36-
steps.push($cmd);
37-
};
38-
}
3933
/// Some rules to follow when constructing steps:
4034
/// The pallet engine state expects to go as edits would, i.e. top to bottom lexically
4135
/// So it makes sense for any given file, to first include an import, then items that refer to it
@@ -47,6 +41,7 @@ pub(super) fn step_builder(pallet: AddPallet) -> Result<Vec<Steps>> {
4741
AddPallet::Template => {
4842
// steps.push(RuntimePalletDependency(Dependency::runtime_template()));
4943
steps.push(RuntimePalletImport(quote!(
44+
// Imports by pop-cli
5045
pub use pallet_parachain_template;
5146
)));
5247
steps.push(SwitchTo(State::Config));

0 commit comments

Comments
 (0)