diff options
| author | bors <bors@rust-lang.org> | 2015-03-04 12:16:51 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2015-03-04 12:16:51 +0000 |
| commit | bdf6e4fcf5ed8b8fe3c281040414e4f6a6afb8d6 (patch) | |
| tree | 609f5fc3b538d928ad4f36691110c2928779c358 /src/libterm | |
| parent | 6e055c3f0041067000dfae7bbc2b0383a8fed19e (diff) | |
| parent | 55ce45e7b52a0a360cf88cba71f59f7d3e9b2346 (diff) | |
| download | rust-bdf6e4fcf5ed8b8fe3c281040414e4f6a6afb8d6.tar.gz rust-bdf6e4fcf5ed8b8fe3c281040414e4f6a6afb8d6.zip | |
Auto merge of #22920 - tshepang:remove-some-warnings, r=huonw
Diffstat (limited to 'src/libterm')
| -rw-r--r-- | src/libterm/terminfo/searcher.rs | 6 |
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] |
