Various minor/cosmetic improvements to code

This commit is contained in:
Alexander Regueiro
2018-11-27 02:59:49 +00:00
parent 4a45578bc5
commit ee89c088b0
457 changed files with 2384 additions and 2360 deletions

View File

@@ -198,7 +198,7 @@ pub trait Terminal: Write {
/// *Note: This does not flush.*
///
/// That means the reset command may get buffered so, if you aren't planning on doing anything
/// else that might flush stdout's buffer (e.g. writing a line of text), you should flush after
/// else that might flush stdout's buffer (e.g., writing a line of text), you should flush after
/// calling reset.
fn reset(&mut self) -> io::Result<bool>;

View File

@@ -64,7 +64,7 @@ pub fn get_dbpath_for_term(term: &str) -> Option<PathBuf> {
p.pop();
// on some installations the dir is named after the hex of the char
// (e.g. macOS)
// (e.g., macOS)
p.push(&format!("{:x}", first_char as usize));
p.push(term);
if fs::metadata(&p).is_ok() {
@@ -79,7 +79,7 @@ pub fn get_dbpath_for_term(term: &str) -> Option<PathBuf> {
#[ignore(reason = "buildbots don't have ncurses installed and I can't mock everything I need")]
fn test_get_dbpath_for_term() {
// woefully inadequate test coverage
// note: current tests won't work with non-standard terminfo hierarchies (e.g. macOS's)
// note: current tests won't work with non-standard terminfo hierarchies (e.g., macOS's)
use std::env;
// FIXME (#9639): This needs to handle non-utf8 paths
fn x(t: &str) -> String {