Skip to content

Commit c7411e1

Browse files
committed
Apply cargo fmt suggestions
1 parent 137a76a commit c7411e1

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

src/cmd_line.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
/// This module defines the command-line arguments and behavior of `newdoc`.
22
/// It relies on the `clap` crate.
3-
43
use clap::{
54
crate_authors, crate_description, crate_name, crate_version, App, AppSettings, Arg, ArgGroup,
65
ArgMatches,
@@ -75,9 +74,9 @@ pub fn get_args() -> ArgMatches<'static> {
7574
)
7675
.arg(
7776
Arg::with_name("detect-directory")
78-
.short("D")
79-
.long("detect-directory")
80-
.help("Detect the include path, rather than using the <path> placeholder")
77+
.short("D")
78+
.long("detect-directory")
79+
.help("Detect the include path, rather than using the <path> placeholder"),
8180
)
8281
.arg(
8382
Arg::with_name("no-prefixes")

src/module.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
/// This module defines the `Module` struct, its builder struct, and methods on both structs.
2-
32
use std::path::{Path, PathBuf};
43

54
use crate::Options;
@@ -166,7 +165,11 @@ impl Input {
166165
path_placeholder
167166
};
168167

169-
format!("include::{}/{}[leveloffset=+1]", include_path.display(), &self.file_name())
168+
format!(
169+
"include::{}/{}[leveloffset=+1]",
170+
include_path.display(),
171+
&self.file_name()
172+
)
170173
}
171174

172175
/// Determine the start of the include statement from the target path.
@@ -208,7 +211,6 @@ impl Input {
208211
}
209212
}
210213

211-
212214
/// Perform string replacements in the modular template that matches the `ModuleType`.
213215
/// Return the template text with all replacements.
214216
pub fn text(&self) -> String {

0 commit comments

Comments
 (0)