From 5d0762b1e72d70cc3a8f1c08a33dadf159a12e8d Mon Sep 17 00:00:00 2001 From: "Kevin K." Date: Mon, 8 Jul 2024 16:36:37 -0400 Subject: [PATCH] docs: fix typos --- .github/workflows/ci-pr.yml | 2 + .typos.toml | 3 + Cargo.lock | 150 ++++++++++++++++++------------------ README.md | 10 +-- src/main.rs | 80 ++++++++++--------- 5 files changed, 129 insertions(+), 116 deletions(-) create mode 100644 .typos.toml diff --git a/.github/workflows/ci-pr.yml b/.github/workflows/ci-pr.yml index cc2026b..8888e8e 100755 --- a/.github/workflows/ci-pr.yml +++ b/.github/workflows/ci-pr.yml @@ -69,6 +69,8 @@ jobs: - name: Check spelling uses: crate-ci/typos@master + with: + config: ./.typos.toml - name: Install Rust uses: dtolnay/rust-toolchain@stable diff --git a/.typos.toml b/.typos.toml new file mode 100644 index 0000000..7b07c87 --- /dev/null +++ b/.typos.toml @@ -0,0 +1,3 @@ +[type.md.extend-words] +ba = "ba" +afe = "afe" diff --git a/Cargo.lock b/Cargo.lock index 268bd04..cbee06c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1,235 +1,237 @@ -[root] -name = "clog-cli" -version = "0.9.3" -dependencies = [ - "ansi_term 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", - "clap 2.21.1 (registry+https://github.com/rust-lang/crates.io-index)", - "clog 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)", - "semver 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", - "time 0.1.36 (registry+https://github.com/rust-lang/crates.io-index)", -] +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 3 [[package]] name = "aho-corasick" version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca972c2ea5f742bfce5687b9aef75506a764f61d37f8f649047846a9686ddb66" dependencies = [ - "memchr 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", + "memchr", ] [[package]] name = "ansi_term" version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23ac7c30002a5accbf7e8987d0632fa6de155b7c3d39d0067317a391e00a2ef6" [[package]] name = "atty" version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d912da0db7fa85514874458ca3651fe2cddace8d0b0505571dbdcd41ab490159" dependencies = [ - "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", + "kernel32-sys", + "libc", + "winapi", ] [[package]] name = "bitflags" version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "826e1ab483fc81a8143faa7203c4a3c02888ebd1a782e37e41fa34753ba9a162" [[package]] name = "clap" version = "2.21.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "74a80f603221c9cd9aa27a28f52af452850051598537bb6b359c38a7d61e5cda" dependencies = [ - "ansi_term 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", - "atty 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "bitflags 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", - "strsim 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", - "term_size 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "unicode-segmentation 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "unicode-width 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", - "vec_map 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "ansi_term", + "atty", + "bitflags", + "strsim", + "term_size", + "unicode-segmentation", + "unicode-width", + "vec_map", ] [[package]] name = "clog" version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91609eb168015f6d1f25c9572485101e5b3019cef422cdc5381ff60acf755f12" dependencies = [ - "regex 0.1.80 (registry+https://github.com/rust-lang/crates.io-index)", - "time 0.1.36 (registry+https://github.com/rust-lang/crates.io-index)", - "toml 0.1.30 (registry+https://github.com/rust-lang/crates.io-index)", + "regex", + "time", + "toml", +] + +[[package]] +name = "clog-cli" +version = "0.9.3" +dependencies = [ + "ansi_term", + "clap", + "clog", + "semver", + "time", ] [[package]] name = "kernel32-sys" version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d" dependencies = [ - "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi", + "winapi-build", ] [[package]] name = "libc" version = "0.2.21" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "88ee81885f9f04bff991e306fea7c1c60a5f0f9e409e99f6b40e3311a3363135" [[package]] name = "memchr" version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d8b629fb514376c675b98c1421e80b151d3817ac42d7c667717d282761418d20" dependencies = [ - "libc 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)", + "libc", ] [[package]] name = "redox_syscall" version = "0.1.16" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8dd35cc9a8bdec562c757e3d43c1526b5c6d2653e23e2315065bc25556550753" [[package]] name = "regex" version = "0.1.80" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4fd4ace6a8cf7860714a2c2280d6c1f7e6a413486c13298bbc86fd3da019402f" dependencies = [ - "aho-corasick 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)", - "memchr 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", - "regex-syntax 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", - "thread_local 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)", - "utf8-ranges 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "aho-corasick", + "memchr", + "regex-syntax", + "thread_local", + "utf8-ranges", ] [[package]] name = "regex-syntax" version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f9ec002c35e86791825ed294b50008eea9ddfc8def4420124fbc6b08db834957" [[package]] name = "rustc-serialize" version = "0.3.22" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "237546c689f20bb44980270c73c3b9edd0891c1be49cc1274406134a66d3957b" [[package]] name = "semver" version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a3186ec9e65071a2095434b1f5bb24838d4e8e130f584c790f6033c79943537" dependencies = [ - "semver-parser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "semver-parser", ] [[package]] name = "semver-parser" version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" [[package]] name = "strsim" version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b4d15c810519a91cf877e7e36e63fe068815c678181439f2f29e2562147c3694" [[package]] name = "term_size" version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "07b6c1ac5b3fffd75073276bca1ceed01f67a28537097a2a9539e116e50fb21a" dependencies = [ - "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", + "kernel32-sys", + "libc", + "winapi", ] [[package]] name = "thread-id" version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a9539db560102d1cef46b8b78ce737ff0bb64e7e18d35b2a5688f7d097d0ff03" dependencies = [ - "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)", + "kernel32-sys", + "libc", ] [[package]] name = "thread_local" version = "0.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8576dbbfcaef9641452d5cf0df9b0e7eeab7694956dd33bb61515fb8f18cfdd5" dependencies = [ - "thread-id 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "thread-id", ] [[package]] name = "time" version = "0.1.36" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "211b63c112206356ef1ff9b19355f43740fc3f85960c598a93d3a3d3ba7beade" dependencies = [ - "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)", - "redox_syscall 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", + "kernel32-sys", + "libc", + "redox_syscall", + "winapi", ] [[package]] name = "toml" version = "0.1.30" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0590d72182e50e879c4da3b11c6488dae18fccb1ae0c7a3eda18e16795844796" dependencies = [ - "rustc-serialize 0.3.22 (registry+https://github.com/rust-lang/crates.io-index)", + "rustc-serialize", ] [[package]] name = "unicode-segmentation" version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "18127285758f0e2c6cf325bb3f3d138a12fee27de4f23e146cd6a179f26c2cf3" [[package]] name = "unicode-width" version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf3a113775714a22dcb774d8ea3655c53a32debae63a063acc00a91cc586245f" [[package]] name = "utf8-ranges" version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1ca13c08c41c9c3e04224ed9ff80461d97e121589ff27c753a16cb10830ae0f" [[package]] name = "vec_map" version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8cdc8b93bd0198ed872357fb2e667f7125646b1762f16d60b2c96350d361897" [[package]] name = "winapi" version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a" [[package]] name = "winapi-build" version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" - -[metadata] -"checksum aho-corasick 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)" = "ca972c2ea5f742bfce5687b9aef75506a764f61d37f8f649047846a9686ddb66" -"checksum ansi_term 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "23ac7c30002a5accbf7e8987d0632fa6de155b7c3d39d0067317a391e00a2ef6" -"checksum atty 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "d912da0db7fa85514874458ca3651fe2cddace8d0b0505571dbdcd41ab490159" -"checksum bitflags 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "826e1ab483fc81a8143faa7203c4a3c02888ebd1a782e37e41fa34753ba9a162" -"checksum clap 2.21.1 (registry+https://github.com/rust-lang/crates.io-index)" = "74a80f603221c9cd9aa27a28f52af452850051598537bb6b359c38a7d61e5cda" -"checksum clog 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)" = "91609eb168015f6d1f25c9572485101e5b3019cef422cdc5381ff60acf755f12" -"checksum kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d" -"checksum libc 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)" = "88ee81885f9f04bff991e306fea7c1c60a5f0f9e409e99f6b40e3311a3363135" -"checksum memchr 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)" = "d8b629fb514376c675b98c1421e80b151d3817ac42d7c667717d282761418d20" -"checksum redox_syscall 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)" = "8dd35cc9a8bdec562c757e3d43c1526b5c6d2653e23e2315065bc25556550753" -"checksum regex 0.1.80 (registry+https://github.com/rust-lang/crates.io-index)" = "4fd4ace6a8cf7860714a2c2280d6c1f7e6a413486c13298bbc86fd3da019402f" -"checksum regex-syntax 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)" = "f9ec002c35e86791825ed294b50008eea9ddfc8def4420124fbc6b08db834957" -"checksum rustc-serialize 0.3.22 (registry+https://github.com/rust-lang/crates.io-index)" = "237546c689f20bb44980270c73c3b9edd0891c1be49cc1274406134a66d3957b" -"checksum semver 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7a3186ec9e65071a2095434b1f5bb24838d4e8e130f584c790f6033c79943537" -"checksum semver-parser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" -"checksum strsim 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b4d15c810519a91cf877e7e36e63fe068815c678181439f2f29e2562147c3694" -"checksum term_size 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "07b6c1ac5b3fffd75073276bca1ceed01f67a28537097a2a9539e116e50fb21a" -"checksum thread-id 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a9539db560102d1cef46b8b78ce737ff0bb64e7e18d35b2a5688f7d097d0ff03" -"checksum thread_local 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)" = "8576dbbfcaef9641452d5cf0df9b0e7eeab7694956dd33bb61515fb8f18cfdd5" -"checksum time 0.1.36 (registry+https://github.com/rust-lang/crates.io-index)" = "211b63c112206356ef1ff9b19355f43740fc3f85960c598a93d3a3d3ba7beade" -"checksum toml 0.1.30 (registry+https://github.com/rust-lang/crates.io-index)" = "0590d72182e50e879c4da3b11c6488dae18fccb1ae0c7a3eda18e16795844796" -"checksum unicode-segmentation 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "18127285758f0e2c6cf325bb3f3d138a12fee27de4f23e146cd6a179f26c2cf3" -"checksum unicode-width 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "bf3a113775714a22dcb774d8ea3655c53a32debae63a063acc00a91cc586245f" -"checksum utf8-ranges 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "a1ca13c08c41c9c3e04224ed9ff80461d97e121589ff27c753a16cb10830ae0f" -"checksum vec_map 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f8cdc8b93bd0198ed872357fb2e667f7125646b1762f16d60b2c96350d361897" -"checksum winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a" -"checksum winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc" +checksum = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc" diff --git a/README.md b/README.md index 4ef9656..12334c2 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,7 @@ There are two ways to use `clog`, as a binary via the command line or as a libra ### Binary (Command Line) -In order to use `clog` via the command line you must first obtain a binary by either compiling it yourself, or downlading and installing one of the precompiled binaries. +In order to use `clog` via the command line you must first obtain a binary by either compiling it yourself, or downloading and installing one of the precompiled binaries. #### `cargo install` @@ -87,7 +87,7 @@ Otherwise, ensure you have the `clog` binary in the directory which you operatin #### Using clog from the Command Line -`clog` works by reading your `git` metadata and specially crafted commit messages and subjects to create a changelog. `clog` has the following options availble. +`clog` works by reading your `git` metadata and specially crafted commit messages and subjects to create a changelog. `clog` has the following options available. ```sh USAGE: @@ -104,7 +104,7 @@ FLAGS: OPTIONS: -C, --changelog A previous changelog to prepend new changes to (this is like using the same file for both --infile and --outfile and - should not be used in conjuction with either) + should not be used in conjunction with either) -c, --config The Clog Configuration TOML file to use (Defaults to '.clog.toml')** -T, --format The output format, defaults to markdown @@ -175,7 +175,7 @@ subtitle = "my awesome title" link-style = "github" # The preferred way to set a constant changelog. This file will be read for old changelog -# data, then prepended to for new changelog data. It's the equivilant to setting +# data, then prepended to for new changelog data. It's the equivalent to setting # both infile and outfile to the same file. # # Do not use with outfile or infile fields! @@ -223,7 +223,7 @@ MySection = ["mysec", "ms"] Now if you make a commit message such as `mysec(Component): some message` or `ms(Component): some message` there will be a new "MySection" section along side the "Features" and "Bug Fixes" areas. -*NOTE:* Sections with spaces are suppported, such as `"My Special Section" = ["ms", "mysec"]` +*NOTE:* Sections with spaces are supported, such as `"My Special Section" = ["ms", "mysec"]` ## Companion Projects diff --git a/src/main.rs b/src/main.rs index 67070ba..d8309e3 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,15 +1,15 @@ #[macro_use] extern crate clap; -extern crate time; -extern crate clog; -extern crate semver; #[cfg(feature = "color")] extern crate ansi_term; +extern crate clog; +extern crate semver; +extern crate time; use clap::{App, Arg, ArgGroup, ArgMatches}; -use clog::{LinkStyle, Clog}; use clog::fmt::ChangelogFormat; +use clog::{Clog, LinkStyle}; #[macro_use] mod macros; @@ -46,7 +46,7 @@ fn main() { -i, --infile [FILE] 'A changelog to append to, but *NOT* write to (Useful in \ conjunction with --outfile)' --setversion [VER] 'e.g. 1.0.1'") - // Because --from-latest-tag can't be used with --from, we add it seperately so we can + // Because --from-latest-tag can't be used with --from, we add it separately so we can // specify a .conflicts_with() .arg(Arg::from_usage("-F, --from-latest-tag 'use latest tag as start (instead of --from)'") .conflicts_with("from")) @@ -58,7 +58,7 @@ fn main() { // to conflicting lists .arg(Arg::from_usage("-C, --changelog [FILE] 'A previous changelog to prepend new changes to (this is like \ using the same file for both --infile and --outfile and \ - should not be used in conjuction with either)'") + should not be used in conjunction with either)'") .conflicts_with("infile") .conflicts_with("outfile")) // Since --setversion shouldn't be used with any of the --major, --minor, or --match, we @@ -109,24 +109,28 @@ pub fn from_matches(matches: &ArgMatches) -> CliResult { let mut clog = if let Some(cfg) = matches.value_of("config") { debugln!("User passed in config file: {:?}", cfg); if matches.is_present("work-dir") && matches.is_present("gitdir") { - debugln!("User passed in both\n\tworking dir: {:?}\n\tgit dir: {:?}", - matches.value_of("work-dir"), - matches.value_of("git-dir")); - // use --config --work-tree --git-dir - try!(Clog::with_all(matches.value_of("git-dir").unwrap(), - matches.value_of("work-dir").unwrap(), - cfg)) + debugln!( + "User passed in both\n\tworking dir: {:?}\n\tgit dir: {:?}", + matches.value_of("work-dir"), + matches.value_of("git-dir") + ); + // use --config --work-tree --git-dir + try!(Clog::with_all( + matches.value_of("git-dir").unwrap(), + matches.value_of("work-dir").unwrap(), + cfg + )) } else if let Some(dir) = matches.value_of("work-dir") { debugln!("User passed in working dir: {:?}", dir); - // use --config --work-tree + // use --config --work-tree try!(Clog::with_dir_and_file(dir, cfg)) } else if let Some(dir) = matches.value_of("git-dir") { debugln!("User passed in git dir: {:?}", dir); - // use --config --git-dir + // use --config --git-dir try!(Clog::with_dir_and_file(dir, cfg)) } else { debugln!("User only passed config"); - // use --config only + // use --config only try!(Clog::from_file(cfg)) } } else { @@ -134,9 +138,11 @@ pub fn from_matches(matches: &ArgMatches) -> CliResult { if matches.is_present("git-dir") && matches.is_present("work-dir") { let wdir = matches.value_of("work-dir").unwrap(); let gdir = matches.value_of("git-dir").unwrap(); - debugln!("User passed in both\n\tworking dir: {:?}\n\tgit dir: {:?}", - wdir, - gdir); + debugln!( + "User passed in both\n\tworking dir: {:?}\n\tgit dir: {:?}", + wdir, + gdir + ); try!(Clog::with_dirs(gdir, wdir)) } else if let Some(dir) = matches.value_of("git-dir") { debugln!("User passed in git dir: {:?}", dir); @@ -153,9 +159,11 @@ pub fn from_matches(matches: &ArgMatches) -> CliResult { // compute version early, so we can exit on error clog.version = { // less typing later... - let (major, minor, patch) = (matches.is_present("major"), - matches.is_present("minor"), - matches.is_present("patch")); + let (major, minor, patch) = ( + matches.is_present("major"), + matches.is_present("minor"), + matches.is_present("patch"), + ); if matches.is_present("setversion") { matches.value_of("setversion").unwrap().to_owned() } else if major || minor || patch { @@ -172,34 +180,32 @@ pub fn from_matches(matches: &ArgMatches) -> CliResult { Ok(ref mut v) => { // if-else may be quicker, but it's longer mentally, and this isn't slow match (major, minor, patch) { - (true,_,_) => { + (true, _, _) => { v.major += 1; v.minor = 0; v.patch = 0; } - (_,true,_) => { + (_, true, _) => { v.minor += 1; v.patch = 0; } - (_,_,true) => { + (_, _, true) => { v.patch += 1; clog.patch_ver = true; } _ => unreachable!(), } - format!("{}{}", - if had_v { - "v" - } else { - "" - }, - v) + format!("{}{}", if had_v { "v" } else { "" }, v) } Err(e) => { - return Err(CliError::Semver(Box::new(e), - String::from("Failed to parse version into \ + return Err(CliError::Semver( + Box::new(e), + String::from( + "Failed to parse version into \ valid SemVer. Ensure the version \ - is in the X.Y.Z format."))); + is in the X.Y.Z format.", + ), + )); } } } else { @@ -222,8 +228,8 @@ pub fn from_matches(matches: &ArgMatches) -> CliResult { } if matches.is_present("link-style") { - clog.link_style = value_t!(matches.value_of("link-style"), LinkStyle) - .unwrap_or(LinkStyle::Github); + clog.link_style = + value_t!(matches.value_of("link-style"), LinkStyle).unwrap_or(LinkStyle::Github); } if let Some(subtitle) = matches.value_of("subtitle") {