Skip to content

Commit 3182370

Browse files
committed
cargo fmt
1 parent adb4863 commit 3182370

File tree

2 files changed

+27
-5
lines changed

2 files changed

+27
-5
lines changed

src/main.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,10 @@ impl InputAction {
362362
// Use ctime instead of mtime as cargo may copy an already
363363
// built binary (with old mtime) here:
364364
let built_binary_ctime = built_binary_file.metadata()?.created()?;
365-
match (fs::File::open(&self.script_path), fs::File::open(manifest_path)) {
365+
match (
366+
fs::File::open(&self.script_path),
367+
fs::File::open(manifest_path),
368+
) {
366369
(Ok(script_file), Ok(manifest_file)) => {
367370
let script_mtime = script_file.metadata()?.modified()?;
368371
let manifest_mtime = manifest_file.metadata()?.modified()?;

src/manifest.rs

Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,13 @@ pub fn split_input(
4545
if contains_main_method(content) {
4646
(manifest, path.clone(), source.to_string(), None, false)
4747
} else {
48-
(manifest, source_in_package, content.to_string(), Some(consts::FILE_NO_MAIN_TEMPLATE), false)
48+
(
49+
manifest,
50+
source_in_package,
51+
content.to_string(),
52+
Some(consts::FILE_NO_MAIN_TEMPLATE),
53+
false,
54+
)
4955
}
5056
}
5157
Input::Expr(content) => (
@@ -83,12 +89,16 @@ pub fn split_input(
8389
subs.insert(consts::SCRIPT_PRELUDE_SUB, &prelude_str[..]);
8490
}
8591

86-
let source = template.map(|template| templates::expand(template, &subs)).transpose()?;
92+
let source = template
93+
.map(|template| templates::expand(template, &subs))
94+
.transpose()?;
8795
let part_mani = part_mani.into_toml()?;
8896
info!("part_mani: {:?}", part_mani);
8997
info!("source: {:?}", source);
9098

91-
let source_path_str = source_path.to_str().ok_or_else(|| format!("Unable to stringify {source_path:?}"))?;
99+
let source_path_str = source_path
100+
.to_str()
101+
.ok_or_else(|| format!("Unable to stringify {source_path:?}"))?;
92102

93103
// It's-a mergin' time!
94104
let def_mani = default_manifest(input, bin_name, source_path_str, toolchain);
@@ -120,7 +130,16 @@ fn test_split_input() {
120130
let toolchain = None;
121131
macro_rules! si {
122132
($i:expr) => {
123-
split_input(&$i, &[], &[], "", &bin_name, &script_name, toolchain.clone()).ok()
133+
split_input(
134+
&$i,
135+
&[],
136+
&[],
137+
"",
138+
&bin_name,
139+
&script_name,
140+
toolchain.clone(),
141+
)
142+
.ok()
124143
};
125144
}
126145

0 commit comments

Comments
 (0)