From 59af9d57b27ecf93a9d405d565dcb57d1caced05 Mon Sep 17 00:00:00 2001 From: Franklin Delehelle Date: Fri, 5 Oct 2018 09:06:51 +0200 Subject: [PATCH] Fix regression --- Cargo.toml | 2 +- README.md | 4 ++++ src/bin/asgart.rs | 11 ++++++----- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 1f4e7a0..8efc4f4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "asgart" -version = "1.3.2" +version = "1.3.3" authors = ["Franklin Delehelle "] license = "GPLv3" diff --git a/README.md b/README.md index 4a3a388..ff3f6ae 100644 --- a/README.md +++ b/README.md @@ -283,6 +283,10 @@ length of the duplication. # Update log +## v1.3.3 + +- Fix regression + ## v1.3.2 - Fix arg name runtime error diff --git a/src/bin/asgart.rs b/src/bin/asgart.rs index 1ef86f5..d5a629c 100644 --- a/src/bin/asgart.rs +++ b/src/bin/asgart.rs @@ -500,11 +500,12 @@ fn search_duplications( info!("{} Re-ordering...", style("[3/4]").blue().bold()); result = result .into_iter() - .map(|sd| if sd.left > sd.right { - SD {left: sd.right, right: sd.left, .. sd} - } else { - sd - }) + .map(|sd| if sd.left > sd.right + && (*strand1).file_name == (*strand2).file_name { + SD {left: sd.right, right: sd.left, .. sd} + } else { + sd + }) .collect::>(); result.sort_by(|a, b| if a.left != b.left {(a.left).cmp(&b.left) } else {