difftastic
                                
                                
                                
                                    difftastic copied to clipboard
                            
                            
                            
                        Bad sliders when adding nested expression in Rust
See 97b9a13d15f413398d0aa75ae0241658d4d9d1f5, options.rs 2/5. This might be another issue with skip unchanged logic shrinking too much.

Minimal repro (requires DFT_DBG_KEEP_UNCHANGED=t)
fn app() {
    x
        .arg(
            color
        )
}
After:
fn app() {
    x
        .arg(
            display
        )
        .arg(
            color
        )
}
                                    
                                    
                                    
                                
After skipping unchanged, we're just comparing x with x.arg(display), which does the right thing.
Smaller repro:
Before:
x.arg(color)
After
x.arg().arg(color)
                                    
                                    
                                    
                                
Clojure equivalent
; old
((.arg x) color)
; new
((.arg ((.arg x)) color)
                                    
                                    
                                    
                                
Interestingly, penalising code for preferring contiguous items seems to improve results both in this file, and in typing_before.rs and load_before.rs.
typing_before.ml is improved, but load_before.js is worse. It's now preferring , over the string literals, which isn't ideal. Score should probably reflect atom length.