about summary refs log tree commit diff
path: root/src/libgetopts
diff options
context:
space:
mode:
authorCorey Farwell <coreyf@rwell.org>2014-11-28 11:57:41 -0500
committerCorey Farwell <coreyf@rwell.org>2014-12-05 18:13:04 -0500
commit4ef16741e355754abd446acbd80e5afb784864c7 (patch)
treebfe4f64de5b3bcf88672424d0f66b5ad12fe7054 /src/libgetopts
parent6f4c11be3b9706d1ba0e1b74b89de1478410a56f (diff)
downloadrust-4ef16741e355754abd446acbd80e5afb784864c7.tar.gz
rust-4ef16741e355754abd446acbd80e5afb784864c7.zip
Utilize fewer reexports
In regards to:

https://github.com/rust-lang/rust/issues/19253#issuecomment-64836729

This commit:

* Changes the #deriving code so that it generates code that utilizes fewer
  reexports (in particur Option::* and Result::*), which is necessary to
  remove those reexports in the future
* Changes other areas of the codebase so that fewer reexports are utilized
Diffstat (limited to 'src/libgetopts')
-rw-r--r--src/libgetopts/lib.rs20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/libgetopts/lib.rs b/src/libgetopts/lib.rs
index 1204ac18f99..e146e3c76eb 100644
--- a/src/libgetopts/lib.rs
+++ b/src/libgetopts/lib.rs
@@ -99,7 +99,7 @@ use self::Fail::*;
 use self::Optval::*;
 
 use std::fmt;
-use std::result::{Err, Ok};
+use std::result::Result::{Err, Ok};
 use std::result;
 use std::string::String;
 
@@ -951,7 +951,7 @@ mod tests {
     use super::*;
     use super::Fail::*;
 
-    use std::result::{Err, Ok};
+    use std::result::Result::{Err, Ok};
     use std::result;
 
     // Tests for reqopt
@@ -1392,8 +1392,8 @@ mod tests {
         let args_single = vec!("-e".to_string(), "foo".to_string());
         let matches_single = &match getopts(args_single.as_slice(),
                                             opts.as_slice()) {
-          result::Ok(m) => m,
-          result::Err(_) => panic!()
+          result::Result::Ok(m) => m,
+          result::Result::Err(_) => panic!()
         };
         assert!(matches_single.opts_present(&["e".to_string()]));
         assert!(matches_single.opts_present(&["encrypt".to_string(), "e".to_string()]));
@@ -1412,8 +1412,8 @@ mod tests {
                              "foo".to_string());
         let matches_both = &match getopts(args_both.as_slice(),
                                           opts.as_slice()) {
-          result::Ok(m) => m,
-          result::Err(_) => panic!()
+          result::Result::Ok(m) => m,
+          result::Result::Err(_) => panic!()
         };
         assert!(matches_both.opts_present(&["e".to_string()]));
         assert!(matches_both.opts_present(&["encrypt".to_string()]));
@@ -1437,8 +1437,8 @@ mod tests {
         let opts = vec!(optmulti("L", "", "library directory", "LIB"),
                      optmulti("M", "", "something", "MMMM"));
         let matches = &match getopts(args.as_slice(), opts.as_slice()) {
-          result::Ok(m) => m,
-          result::Err(_) => panic!()
+          result::Result::Ok(m) => m,
+          result::Result::Err(_) => panic!()
         };
         assert!(matches.opts_present(&["L".to_string()]));
         assert_eq!(matches.opts_str(&["L".to_string()]).unwrap(), "foo".to_string());
@@ -1453,8 +1453,8 @@ mod tests {
         let opts = vec!(optmulti("L", "", "library directory", "LIB"),
                      optflagmulti("v", "verbose", "Verbose"));
         let matches = &match getopts(args.as_slice(), opts.as_slice()) {
-          result::Ok(m) => m,
-          result::Err(e) => panic!( "{}", e )
+          result::Result::Ok(m) => m,
+          result::Result::Err(e) => panic!( "{}", e )
         };
         assert!(matches.opts_present(&["L".to_string()]));
         assert_eq!(matches.opts_str(&["L".to_string()]).unwrap(), "verbose".to_string());