Wilfred / difftastic

a structural diff that understands syntax 🟥🟩
https://difftastic.wilfred.me.uk/
MIT License
21.18k stars 347 forks source link

Comparing two completely different files is going to panic #739

Closed eatradish closed 4 months ago

eatradish commented 4 months ago

File1:

--2024-04-04 21:40:06--  https://wps-linux-personal.wpscdn.cn/wps/download/ep/Linux2019/11719/wps-office_11.1.0.11719_amd64.deb?t=1712237894
正在解析主机 wps-linux-personal.wpscdn.cn (wps-linux-personal.wpscdn.cn)... 123.6.109.2
正在连接 wps-linux-personal.wpscdn.cn (wps-linux-personal.wpscdn.cn)|123.6.109.2|:443... 已连接。
已发出 HTTP 请求,正在等待回应... 403 Forbidden
2024-04-04 21:40:06 错误 403:Forbidden。

File2: https://pastebin.aosc.io/paste/Y4sF8AVTmS-YxaPoMNIn-g/raw

Will get:

saki@Daylily [ ~ ] $ difft yarn.lock wget-log 
wget-log --- Text
  1 # THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.                           1 --2024-04-04 21:40:06--  https://wps-linux-personal.wpscdn.cn/wps/download/ep/Linux2019/11
  .                                                                                            . 719/wps-office_11.1.0.11719_amd64.deb?t=1712237894
  .                                                                                            2 正在解析主机 wps-linux-personal.wpscdn.cn (wps-linux-personal.wpscdn.cn)... 123.6.109.2
  .                                                                                            3 正在连接 wps-linux-personal.wpscdn.cn (wps-linux-personal.wpscdn.cn)|123.6.109.2|:443... 
  .                                                                                            . 已连接。
  .                                                                                            4 已发出 HTTP 请求,正在等待回应... 403 Forbidden
  2 # yarn lockfile v1                                                                         5 2024-04-04 21:40:06 错误 403:Forbidden。
  3                                                                                            6 
thread 'main' panicked at src/display/side_by_side.rs:538:34:
index out of bounds: the len is 6 but the index is 6
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

difft --version :

saki@Daylily [ ~ ] ! difft --version
Difftastic 0.59.0 (built with rustc 1.79.0)