Mike Gerwitz

Activist for User Freedom

aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Gerwitz <mike.gerwitz@ryansg.com>2020-07-01 13:38:01 -0400
committerMike Gerwitz <mike.gerwitz@ryansg.com>2020-07-01 13:42:14 -0400
commit0d4bbe5e4e17d9415dec3ddb1be120f76433b304 (patch)
tree8e906303fa2369ad91876097641a416831dcd7e6 /tamer/src/ld/poc.rs
parentf832feb3fa6651ec769453bd8f0b154c42388460 (diff)
downloadtame-0d4bbe5e4e17d9415dec3ddb1be120f76433b304.tar.gz
tame-0d4bbe5e4e17d9415dec3ddb1be120f76433b304.tar.bz2
tame-0d4bbe5e4e17d9415dec3ddb1be120f76433b304.zip
[DEV-8000] ir::asg: Introduce SortableAsgError
This will be used for the next commit, but this change has been isolated both because it distracts from the implementation change in the next commit, and because it cleans up the code by removing the need for a type parameter on `AsgError`. Note that the sort test cases now use `unwrap` instead of having `{,Sortable}AsgError` support one or the other---this is because that does not currently happen in practice, and there is not supposed to be a hierarchy; they are siblings (though perhaps their name may imply otherwise).
Diffstat (limited to 'tamer/src/ld/poc.rs')
-rw-r--r--tamer/src/ld/poc.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/tamer/src/ld/poc.rs b/tamer/src/ld/poc.rs
index 1a94558..e5a22a0 100644
--- a/tamer/src/ld/poc.rs
+++ b/tamer/src/ld/poc.rs
@@ -25,8 +25,8 @@ use crate::fs::{
};
use crate::global;
use crate::ir::asg::{
- Asg, AsgError, DefaultAsg, IdentObject, IdentObjectData, Sections,
- SortableAsg,
+ Asg, DefaultAsg, IdentObject, IdentObjectData, Sections, SortableAsg,
+ SortableAsgError,
};
use crate::obj::xmle::writer::XmleWriter;
use crate::obj::xmlo::{AsgBuilder, AsgBuilderState, XmloReader};
@@ -72,7 +72,7 @@ pub fn xmle(package_path: &str, output: &str) -> Result<(), Box<dyn Error>> {
let mut sorted = match depgraph.sort(&roots) {
Ok(sections) => sections,
- Err(AsgError::Cycles(cycles)) => {
+ Err(SortableAsgError::Cycles(cycles)) => {
let msg: Vec<String> = cycles
.into_iter()
.map(|cycle| {