parent
94a6e9d667
commit
98111ba22f
@ -0,0 +1,60 @@
|
|||||||
|
From 84cfdb51775b327fedf21784749d862fdffa10b4 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Steven Allen <steven@stebalien.com>
|
||||||
|
Date: Fri, 27 Jul 2018 16:30:29 -0700
|
||||||
|
Subject: [PATCH] fix warning due to use of env::home_dir
|
||||||
|
|
||||||
|
---
|
||||||
|
src/lib.rs | 10 +++++++---
|
||||||
|
src/terminfo/searcher.rs | 4 +++-
|
||||||
|
2 files changed, 10 insertions(+), 4 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/src/lib.rs b/src/lib.rs
|
||||||
|
index d8c1e7a64210..f28699d77d52 100644
|
||||||
|
--- a/src/lib.rs
|
||||||
|
+++ b/src/lib.rs
|
||||||
|
@@ -56,13 +56,17 @@
|
||||||
|
//! [win]: http://msdn.microsoft.com/en-us/library/windows/desktop/ms682010%28v=vs.85%29.aspx
|
||||||
|
//! [ti]: https://en.wikipedia.org/wiki/Terminfo
|
||||||
|
|
||||||
|
-#![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
|
||||||
|
- html_favicon_url = "https://doc.rust-lang.org/favicon.ico",
|
||||||
|
- html_root_url = "https://stebalien.github.io/doc/term/term/", test(attr(deny(warnings))))]
|
||||||
|
+#![doc(
|
||||||
|
+ html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
|
||||||
|
+ html_favicon_url = "https://doc.rust-lang.org/favicon.ico",
|
||||||
|
+ html_root_url = "https://stebalien.github.io/doc/term/term/",
|
||||||
|
+ test(attr(deny(warnings)))
|
||||||
|
+)]
|
||||||
|
#![deny(missing_docs)]
|
||||||
|
#![cfg_attr(test, deny(warnings))]
|
||||||
|
|
||||||
|
extern crate byteorder;
|
||||||
|
+extern crate dirs;
|
||||||
|
|
||||||
|
use std::io::prelude::*;
|
||||||
|
|
||||||
|
diff --git a/src/terminfo/searcher.rs b/src/terminfo/searcher.rs
|
||||||
|
index 76865748db6d..27eabaa38648 100644
|
||||||
|
--- a/src/terminfo/searcher.rs
|
||||||
|
+++ b/src/terminfo/searcher.rs
|
||||||
|
@@ -16,6 +16,8 @@ use std::env;
|
||||||
|
use std::fs;
|
||||||
|
use std::path::PathBuf;
|
||||||
|
|
||||||
|
+use dirs;
|
||||||
|
+
|
||||||
|
/// Return path to database entry for `term`
|
||||||
|
pub fn get_dbpath_for_term(term: &str) -> Option<PathBuf> {
|
||||||
|
let mut dirs_to_search = Vec::new();
|
||||||
|
@@ -56,7 +58,7 @@ pub fn get_dbpath_for_term(term: &str) -> Option<PathBuf> {
|
||||||
|
// ~/.terminfo, ncurses will search /etc/terminfo, then
|
||||||
|
// /lib/terminfo, and eventually /usr/share/terminfo.
|
||||||
|
// On Haiku the database can be found at /boot/system/data/terminfo
|
||||||
|
- if let Some(mut homedir) = env::home_dir() {
|
||||||
|
+ if let Some(mut homedir) = dirs::home_dir() {
|
||||||
|
homedir.push(".terminfo");
|
||||||
|
dirs_to_search.push(homedir)
|
||||||
|
}
|
||||||
|
--
|
||||||
|
2.17.1
|
||||||
|
|
@ -1,12 +0,0 @@
|
|||||||
--- term-0.5.1/Cargo.toml 1970-01-01T01:00:00+01:00
|
|
||||||
+++ term-0.5.1/Cargo.toml 2018-05-10T11:28:36.959813+02:00
|
|
||||||
@@ -26,9 +26,6 @@
|
|
||||||
|
|
||||||
[features]
|
|
||||||
default = []
|
|
||||||
-[target."cfg(windows)".dependencies.winapi]
|
|
||||||
-version = "0.3"
|
|
||||||
-features = ["wincon", "handleapi", "fileapi"]
|
|
||||||
[badges.appveyor]
|
|
||||||
repository = "Stebalien/term"
|
|
||||||
|
|
@ -0,0 +1,17 @@
|
|||||||
|
--- term-0.5.1/Cargo.toml 1969-12-31T16:00:00-08:00
|
||||||
|
+++ term-0.5.1/Cargo.toml 2018-09-17T12:37:33.128195-07:00
|
||||||
|
@@ -24,11 +24,11 @@
|
||||||
|
[dependencies.byteorder]
|
||||||
|
version = "1.2.1"
|
||||||
|
|
||||||
|
+[dependencies.dirs]
|
||||||
|
+version = "1.0.2"
|
||||||
|
+
|
||||||
|
[features]
|
||||||
|
default = []
|
||||||
|
-[target."cfg(windows)".dependencies.winapi]
|
||||||
|
-version = "0.3"
|
||||||
|
-features = ["wincon", "handleapi", "fileapi"]
|
||||||
|
[badges.appveyor]
|
||||||
|
repository = "Stebalien/term"
|
||||||
|
|
Loading…
Reference in new issue