浏览代码

client: Fix clap dep (#893)

Armani Ferrante 4 年之前
父节点
当前提交
c7d165fc12
共有 3 个文件被更改,包括 5 次插入5 次删除
  1. 2 2
      cli/src/lib.rs
  2. 1 1
      client/example/Cargo.toml
  3. 2 2
      client/example/src/main.rs

+ 2 - 2
cli/src/lib.rs

@@ -433,10 +433,10 @@ fn init(cfg_override: &ConfigOverride, name: String, javascript: bool) -> Result
         // Build javascript config
         let mut package_json = File::create("package.json")?;
         package_json.write_all(template::package_json().as_bytes())?;
-    
+
         let mut mocha = File::create(&format!("tests/{}.js", name))?;
         mocha.write_all(template::mocha(&name).as_bytes())?;
-    
+
         let mut deploy = File::create("migrations/deploy.js")?;
         deploy.write_all(template::deploy_script().as_bytes())?;
     } else {

+ 1 - 1
client/example/Cargo.toml

@@ -15,5 +15,5 @@ events = { path = "../../tests/events/programs/events", features = ["no-entrypoi
 shellexpand = "2.1.0"
 anyhow = "1.0.32"
 rand = "0.7.3"
-clap = "3.0.0-beta.2"
+clap = "3.0.0-beta.5"
 solana-sdk = "1.7.11"

+ 2 - 2
client/example/src/main.rs

@@ -17,14 +17,14 @@ use basic_4::accounts as basic_4_accounts;
 use basic_4::basic_4::Counter as CounterState;
 use basic_4::instruction as basic_4_instruction;
 // The `accounts` and `instructions` modules are generated by the framework.
-use clap::Clap;
+use clap::Parser;
 use composite::accounts::{Bar, CompositeUpdate, Foo, Initialize};
 use composite::instruction as composite_instruction;
 use composite::{DummyA, DummyB};
 use rand::rngs::OsRng;
 use std::time::Duration;
 
-#[derive(Clap)]
+#[derive(Parser, Debug)]
 pub struct Opts {
     #[clap(long)]
     composite_pid: Pubkey,