Skip to main content

filter_formatting

Function filter_formatting 

Source
pub fn filter_formatting(
    hunks: &mut Vec<Hunk>,
    mode: LayerMode,
    indentation_matters: bool,
)
Expand description

Applies the formatting layer to hunks: finds changes that only move whitespace — re-indenting, re-spacing, re-wrapping a statement over more or fewer lines — and either turns them into context (hidden) or keeps nothing else (only).