Mike Gerwitz

Activist for User Freedom

aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoseph Frazer <joseph.frazer@ryansg.com>2020-03-06 12:44:22 -0500
committerJoseph Frazer <joseph.frazer@ryansg.com>2020-03-06 12:44:22 -0500
commit2228a6158a0982647d0015e5cddaf9641c34337a (patch)
treeab761d33f77e923006e432a927462c7563f95625
parent4810e7a099556eaa6005ec894b3cc94419cbc30e (diff)
downloadtame-2228a6158a0982647d0015e5cddaf9641c34337a.tar.gz
tame-2228a6158a0982647d0015e5cddaf9641c34337a.tar.bz2
tame-2228a6158a0982647d0015e5cddaf9641c34337a.zip
[DEV-7134] Add alias for LoadResult
It looks better and was recommended by Rust's linter.
-rw-r--r--tamer/src/ld/poc.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/tamer/src/ld/poc.rs b/tamer/src/ld/poc.rs
index 48082c6..9f20492 100644
--- a/tamer/src/ld/poc.rs
+++ b/tamer/src/ld/poc.rs
@@ -36,6 +36,9 @@ use std::io::BufReader;
type LinkerAsg<'i> = DefaultAsg<'i, global::ProgIdentSize>;
type LinkerObjectRef = ObjectRef<global::ProgIdentSize>;
+type LoadResult<'i> =
+ Result<Option<(Option<&'i Symbol<'i>>, Option<String>)>, Box<dyn Error>>;
+
pub fn main(package_path: &str, output: &str) -> Result<(), Box<dyn Error>> {
let mut pkgs_seen: FxHashSet<String> = Default::default();
let mut fragments: FxHashMap<&str, String> = Default::default();
@@ -97,7 +100,7 @@ fn load_xmlo<'a, 'i, I: Interner<'i>>(
depgraph: &mut LinkerAsg<'i>,
interner: &'i I,
roots: &mut Vec<LinkerObjectRef>,
-) -> Result<Option<(Option<&'i Symbol<'i>>, Option<String>)>, Box<dyn Error>> {
+) -> LoadResult<'i> {
let path = fs::canonicalize(path_str)?;
let path_str = path.to_str().unwrap();