Skip to content

Commit

Permalink
chore: update to 2021 edition
Browse files Browse the repository at this point in the history
  • Loading branch information
ismaelgv committed Jan 9, 2025
1 parent 9c68476 commit 3512bcd
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 39 deletions.
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ description = """
RnR is a command-line tool to rename multiple files and directories that
supports regular expressions
"""
edition = "2021"
categories = ["command-line-utilities"]
license = "MIT"
homepage = "https://github.com/ismaelgv/rnr"
repository = "https://github.com/ismaelgv/rnr"
build = "build.rs"
readme = "README.md"

[dependencies]
Expand All @@ -28,5 +28,5 @@ difference = "^2.0.0"
any_ascii = "^0.3.0"

[build-dependencies]
clap = "^4.0"
clap = { version = "^4.0", features = ["derive"] }
clap_complete = "^4.0"
36 changes: 2 additions & 34 deletions src/cli.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
use clap::{Parser, Subcommand, ValueEnum};

#[derive(Parser)]
#[command(version, about, author)]
pub struct Cli {
Expand Down Expand Up @@ -93,37 +95,3 @@ pub enum ReplaceTransform {
Lower,
ASCII,
}

/*
App::new(crate_name!())
.setting(AppSettings::SubcommandsNegateReqs)
.args(&common_args)
.args(&path_args)
.args(&replace_args)
.subcommand(
SubCommand::with_name(FROM_FILE_SUBCOMMAND)
.args(&common_args)
.arg(
Arg::with_name("DUMPFILE")
.takes_value(true)
.required(true)
.value_name("DUMPFILE")
.validator_os(is_valid_string)
.index(1),
)
.arg(
Arg::with_name("undo")
.long("undo")
.short("u")
.help("Undo the operations from the dump file"),
)
.about("Read operations from a dump file"),
)
.subcommand(
SubCommand::with_name(TO_ASCII_SUBCOMMAND)
.args(&common_args)
.args(&path_args)
.about("Replace file name UTF-8 chars with ASCII chars representation."),
)
}
*/
1 change: 1 addition & 0 deletions src/dumpfile.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
use chrono;
use serde_derive::{Deserialize, Serialize};
use crate::error::*;
use serde_json;
use crate::solver::{Operation, Operations};
Expand Down
3 changes: 0 additions & 3 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,7 @@ extern crate serde;
extern crate serde_json;
extern crate walkdir;

#[macro_use]
extern crate clap;

#[macro_use]
extern crate serde_derive;

use crate::renamer::Renamer;
Expand Down
1 change: 1 addition & 0 deletions src/solver.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
use crate::error::*;
use crate::fileutils::{is_same_file, PathList};
use path_abs::PathAbs;
use serde_derive::{Deserialize, Serialize};
use std::collections::HashMap;
use std::path::PathBuf;

Expand Down

0 comments on commit 3512bcd

Please sign in to comment.