summary refs log tree commit diff
path: root/src/libterm
diff options
context:
space:
mode:
authorTshepang Lekhonkhobe <tshepang@gmail.com>2015-02-28 20:07:05 +0200
committerTshepang Lekhonkhobe <tshepang@gmail.com>2015-03-01 09:35:57 +0200
commit55ce45e7b52a0a360cf88cba71f59f7d3e9b2346 (patch)
tree5c49becf849c32f717a60f05f3bf62f7a02db78c /src/libterm
parent890293655251c372ea99694c0c9f0795e2663286 (diff)
downloadrust-55ce45e7b52a0a360cf88cba71f59f7d3e9b2346.tar.gz
rust-55ce45e7b52a0a360cf88cba71f59f7d3e9b2346.zip
remove some compiler warnings
Diffstat (limited to 'src/libterm')
-rw-r--r--src/libterm/terminfo/searcher.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libterm/terminfo/searcher.rs b/src/libterm/terminfo/searcher.rs
index a0cd7842070..15f7f3884ec 100644
--- a/src/libterm/terminfo/searcher.rs
+++ b/src/libterm/terminfo/searcher.rs
@@ -96,7 +96,7 @@ pub fn open(term: &str) -> Result<File, String> {
 fn test_get_dbpath_for_term() {
     // woefully inadequate test coverage
     // note: current tests won't work with non-standard terminfo hierarchies (e.g. OS X's)
-    use std::os::{setenv, unsetenv};
+    use std::env;
     // FIXME (#9639): This needs to handle non-utf8 paths
     fn x(t: &str) -> String {
         let p = get_dbpath_for_term(t).expect("no terminfo entry found");
@@ -104,9 +104,9 @@ fn test_get_dbpath_for_term() {
     };
     assert!(x("screen") == "/usr/share/terminfo/s/screen");
     assert!(get_dbpath_for_term("") == None);
-    setenv("TERMINFO_DIRS", ":");
+    env::set_var("TERMINFO_DIRS", ":");
     assert!(x("screen") == "/usr/share/terminfo/s/screen");
-    unsetenv("TERMINFO_DIRS");
+    env::remove_var("TERMINFO_DIRS");
 }
 
 #[test]