3

I am trying to upgrade rust code from clap v3.22.2 to v4.0.8 and faced the problem how to change Arg::multiple. This is piece of code:

Arg::new("relfs")
    required(true)
    multiple(true)

So I get an error

error[E0599]: no method named `multiple` found for struct `Arg` in the current scope
   --> src/bin/reo.rs:178:26
    |
178 |                         .multiple(true)
    |                          ^^^^^^^^ method not found in `Arg`

I already tried to Arg::action as written in https://github.com/clap-rs/clap/issues/3772 but couldn't. How can replace deprecated multiple?

tardis3
  • 37
  • 6
  • See [ArgGroup::multiple](https://docs.rs/clap/latest/clap/builder/struct.ArgGroup.html#method.multiple). Seems you have to use an "argument group" instead of an argument now? – Filipe Rodrigues Oct 03 '22 at 08:21

1 Answers1

1

Eventually changelog helped me. There is the information what has been changed and how to update. In my case it was deprecated multiple.

tardis3
  • 37
  • 6