Skip to content

Incorrect inline snapshot indentation with hard_tabs = true #679

@nitsky

Description

@nitsky

What happened?

I am using rustfmt configured with hard_tabs = true. When insta writes inline snapshots, it writes one space character for each tab.

Reproduction steps

#[test]
fn test() {
	insta::assert_debug_snapshot!(vec![1, 2, 3], @r"
 [
     1,
     2,
     3,
 ]
 ");
}

Insta Version

1.41

rustc Version

1.82.0

What did you expect?

I expected the indentation to use the tab character, not the space character.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions