Skip to content

Commit 6828101

Browse files
committed
chore: apply cargo fmt
1 parent 42aa9f4 commit 6828101

3 files changed

Lines changed: 11 additions & 8 deletions

File tree

src/builds/mod.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -499,7 +499,10 @@ description = ""
499499
#[test]
500500
fn extract_custom_command_recovers_command() {
501501
let script = "#!/bin/sh\nset -e\ncargo test\n";
502-
assert_eq!(extract_custom_command(script).as_deref(), Some("cargo test"));
502+
assert_eq!(
503+
extract_custom_command(script).as_deref(),
504+
Some("cargo test")
505+
);
503506
}
504507

505508
#[test]

src/hooks/mod.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -83,10 +83,7 @@ pub(crate) fn valid_hook_names() -> &'static [&'static str] {
8383

8484
/// Identifies which built-in (if any) an installed hook file corresponds to,
8585
/// by exact script comparison. Built-ins are written verbatim on install.
86-
pub(crate) fn detect_builtin(
87-
hook_file: &str,
88-
content: &str,
89-
) -> Option<&'static builtins::Builtin> {
86+
pub(crate) fn detect_builtin(hook_file: &str, content: &str) -> Option<&'static builtins::Builtin> {
9087
builtins::ALL
9188
.iter()
9289
.find(|b| b.hook == hook_file && content.trim() == b.script.trim())

src/init.rs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,10 @@ pub fn run() -> Result<()> {
3838
.with_help_message("↑↓ move enter confirm esc start fresh")
3939
.prompt_skippable()?;
4040

41-
if let Some(build_name) = choice.as_deref().and_then(|c| c.strip_prefix("Use build: ")) {
41+
if let Some(build_name) = choice
42+
.as_deref()
43+
.and_then(|c| c.strip_prefix("Use build: "))
44+
{
4245
println!();
4346
let build = builds::load_build(build_name)?;
4447
builds::apply_build(&build)?;
@@ -95,8 +98,8 @@ pub fn run() -> Result<()> {
9598

9699
for item in &hook_selections {
97100
if item == "Add custom hook..." {
98-
let Some(hook_name) = Select::new("Hook type", hooks::valid_hook_names().to_vec())
99-
.prompt_skippable()?
101+
let Some(hook_name) =
102+
Select::new("Hook type", hooks::valid_hook_names().to_vec()).prompt_skippable()?
100103
else {
101104
continue;
102105
};

0 commit comments

Comments
 (0)