Package: rust-debcargo

I've attached a patch which makes debcargo build with clap 4, debcargo
builds and it's cargo tests run succesfully, but I haven't actually done any
testing of the command line interface with this patch.

Fabian and I have agreed on irc that it probablly doesn't make sense to
switch debcargo to clap 4 in bookworm. I'm posting this patch here to
preserve it for trixie.
--- debcargo.orig/Cargo.toml
+++ debcargo/Cargo.toml
@@ -39,3 +39,3 @@
 [dependencies.clap]
-version = "3"
+version = "4"
 features = [
--- debcargo.orig/src/bin/debcargo.rs
+++ debcargo/src/bin/debcargo.rs
@@ -1,3 +1,3 @@
 use ansi_term::Colour::Red;
-use clap::{crate_version, AppSettings, Parser};
+use clap::{crate_version, CommandFactory, FromArgMatches, Parser};
 
@@ -50,3 +50,3 @@
 
-#[test]
+/*#[test]
 fn verify_app() {
@@ -54,11 +54,10 @@
     Opt::into_app().debug_assert()
-}
+}*/
 
 fn real_main() -> Result<()> {
-    let m = Opt::clap()
+    let m = Opt::command()
         .version(crate_version!())
-        .global_setting(AppSettings::ColoredHelp)
         .get_matches();
     use Opt::*;
-    match Opt::from_clap(&m) {
+    match Opt::from_arg_matches(&m).unwrap() {
         Update => invalidate_crates_io_cache(),

Reply via email to