Skip to content

Commit 1a3079b

Browse files
Copilotjosecelano
andcommitted
style: apply cargo fmt formatting
Co-authored-by: josecelano <58816+josecelano@users.noreply.github.com>
1 parent 287f106 commit 1a3079b

File tree

1 file changed

+13
-20
lines changed

1 file changed

+13
-20
lines changed

src/presentation/user_output.rs

Lines changed: 13 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -3262,10 +3262,8 @@ mod tests {
32623262

32633263
#[test]
32643264
fn it_should_create_simple_steps_directly() {
3265-
let message = StepsMessage::new(
3266-
"Title",
3267-
vec!["Step 1".to_string(), "Step 2".to_string()],
3268-
);
3265+
let message =
3266+
StepsMessage::new("Title", vec!["Step 1".to_string(), "Step 2".to_string()]);
32693267

32703268
assert_eq!(message.title, "Title");
32713269
assert_eq!(message.items, vec!["Step 1", "Step 2"]);
@@ -3300,10 +3298,8 @@ mod tests {
33003298

33013299
#[test]
33023300
fn it_should_accept_string_types_in_constructor() {
3303-
let message = StepsMessage::new(
3304-
"Title",
3305-
vec!["Step 1".to_string(), String::from("Step 2")],
3306-
);
3301+
let message =
3302+
StepsMessage::new("Title", vec!["Step 1".to_string(), String::from("Step 2")]);
33073303

33083304
assert_eq!(message.items.len(), 2);
33093305
}
@@ -3396,10 +3392,8 @@ mod tests {
33963392

33973393
#[test]
33983394
fn it_should_accept_string_types_in_info_block_constructor() {
3399-
let message = InfoBlockMessage::new(
3400-
"Title",
3401-
vec!["Line 1".to_string(), String::from("Line 2")],
3402-
);
3395+
let message =
3396+
InfoBlockMessage::new("Title", vec!["Line 1".to_string(), String::from("Line 2")]);
34033397

34043398
assert_eq!(message.lines.len(), 2);
34053399
}
@@ -3448,9 +3442,7 @@ mod tests {
34483442
fn it_should_respect_verbosity_for_info_block_messages() {
34493443
let mut test_output = TestUserOutput::new(VerbosityLevel::Quiet);
34503444

3451-
let message = InfoBlockMessage::builder("Info")
3452-
.add_line("Line 1")
3453-
.build();
3445+
let message = InfoBlockMessage::builder("Info").add_line("Line 1").build();
34543446

34553447
test_output.output.write(&message);
34563448

@@ -3462,9 +3454,7 @@ mod tests {
34623454
fn it_should_show_info_block_at_normal_level() {
34633455
let mut test_output = TestUserOutput::new(VerbosityLevel::Normal);
34643456

3465-
let message = InfoBlockMessage::builder("Info")
3466-
.add_line("Line 1")
3467-
.build();
3457+
let message = InfoBlockMessage::builder("Info").add_line("Line 1").build();
34683458

34693459
test_output.output.write(&message);
34703460

@@ -3497,12 +3487,15 @@ mod tests {
34973487
fn it_should_maintain_backward_compatibility_for_info_blocks() {
34983488
// Old way: UserOutput::info_block helper
34993489
let mut test_output = TestUserOutput::new(VerbosityLevel::Normal);
3500-
test_output.output.info_block("Title", &["Line 1", "Line 2"]);
3490+
test_output
3491+
.output
3492+
.info_block("Title", &["Line 1", "Line 2"]);
35013493
let old_output = test_output.stderr();
35023494

35033495
// New way: Direct message construction
35043496
let mut test_output = TestUserOutput::new(VerbosityLevel::Normal);
3505-
let message = InfoBlockMessage::new("Title", vec!["Line 1".to_string(), "Line 2".to_string()]);
3497+
let message =
3498+
InfoBlockMessage::new("Title", vec!["Line 1".to_string(), "Line 2".to_string()]);
35063499
test_output.output.write(&message);
35073500
let new_output = test_output.stderr();
35083501

0 commit comments

Comments
 (0)