Skip to content

Commit

Permalink
fixed compilation errors connected to the previous change of --doc ->…
Browse files Browse the repository at this point in the history
… --no-doc
  • Loading branch information
frol committed Feb 3, 2024
1 parent 9be9ef4 commit 6c2c65e
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion cargo-near/src/commands/abi_command/abi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ pub fn run(args: super::AbiCommand) -> near_cli_rs::CliResult {
} else {
AbiFormat::Json
};
let contract_abi = generate_abi(&crate_metadata, args.doc, false, color)?;
let contract_abi = generate_abi(&crate_metadata, !args.no_doc, false, color)?;
let AbiResult { path } =
write_to_file(&contract_abi, &crate_metadata, format, AbiCompression::NoOp)?;

Expand Down
4 changes: 2 additions & 2 deletions cargo-near/src/commands/abi_command/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ pub mod abi;
pub struct AbiCommand {
/// Include rustdocs in the ABI file
#[interactive_clap(long)]
pub doc: bool,
pub no_doc: bool,
/// Generate compact (minified) JSON
#[interactive_clap(long)]
pub compact_abi: bool,
Expand Down Expand Up @@ -34,7 +34,7 @@ impl AbiCommandlContext {
scope: &<AbiCommand as interactive_clap::ToInteractiveClapContextScope>::InteractiveClapContextScope,
) -> color_eyre::eyre::Result<Self> {
let args = AbiCommand {
doc: scope.doc,
no_doc: scope.no_doc,
compact_abi: scope.compact_abi,
out_dir: scope.out_dir.clone(),
manifest_path: scope.manifest_path.clone(),
Expand Down
3 changes: 2 additions & 1 deletion cargo-near/src/commands/build_command/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@ pub fn run(args: super::BuildCommand) -> color_eyre::eyre::Result<util::Compilat
let mut abi = None;
let mut min_abi_path = None;
if !args.no_abi {
let mut contract_abi = abi::generate_abi(&crate_metadata, !args.no_doc, true, color.clone())?;
let mut contract_abi =
abi::generate_abi(&crate_metadata, !args.no_doc, true, color.clone())?;
contract_abi.metadata.build = Some(BuildInfo {
compiler: format!("rustc {}", rustc_version::version()?),
builder: format!("cargo-near {}", env!("CARGO_PKG_VERSION")),
Expand Down
8 changes: 4 additions & 4 deletions integration-tests/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ macro_rules! invoke_cargo_near {
match cli_args.cmd {
Some(cargo_near::commands::CliNearCommand::Abi(cmd)) => {
let args = cargo_near::commands::abi_command::AbiCommand {
doc: cmd.doc,
no_doc: cmd.no_doc,
compact_abi: cmd.compact_abi,
out_dir: cmd.out_dir,
manifest_path: Some(cargo_path.into()),
Expand All @@ -73,10 +73,10 @@ macro_rules! invoke_cargo_near {
},
Some(cargo_near::commands::CliNearCommand::Build(cmd)) => {
let args = cargo_near::commands::build_command::BuildCommand {
release: cmd.release,
embed_abi: cmd.embed_abi,
doc: cmd.doc,
no_release: cmd.no_release,
no_abi: cmd.no_abi,
no_embed_abi: cmd.no_embed_abi,
no_doc: cmd.no_doc,
out_dir: cmd.out_dir,
manifest_path: Some(cargo_path.into()),
color: cmd.color,
Expand Down

0 comments on commit 6c2c65e

Please sign in to comment.