summaryrefslogtreecommitdiffstats
path: root/copypasta
diff options
context:
space:
mode:
authorNathan Lilienthal <nathan@nixpulvis.com>2019-01-06 19:06:57 -0500
committerChristian Duerr <chrisduerr@users.noreply.github.com>2019-01-07 00:06:57 +0000
commit04707cbba630e3e4ad6b4200bef8ae7888c49e3b (patch)
treebd04f4964d4c4ad67cd565b38172b488172acfcc /copypasta
parentdfc30eeef5eb6df9f658e62875e5cde93173e37b (diff)
Normalize Log Message Strings
The general style for errors, warnings and info messages is to start with a capitalized letter and end without a period. The main exception is when dealing with nouns that are clearer with special case handling, e.g. "macOS failed to work" or "ioctl is borked".
Diffstat (limited to 'copypasta')
-rw-r--r--copypasta/src/windows.rs2
-rw-r--r--copypasta/src/x11.rs12
2 files changed, 7 insertions, 7 deletions
diff --git a/copypasta/src/windows.rs b/copypasta/src/windows.rs
index 8ec783b2..95e3db55 100644
--- a/copypasta/src/windows.rs
+++ b/copypasta/src/windows.rs
@@ -13,7 +13,7 @@ pub enum Error {
impl ::std::error::Error for Error {
fn description(&self) -> &str {
match *self {
- Error::Clipboard(..) => "error opening clipboard",
+ Error::Clipboard(..) => "Error opening clipboard",
}
}
}
diff --git a/copypasta/src/x11.rs b/copypasta/src/x11.rs
index 4c58c0a4..c7d9c696 100644
--- a/copypasta/src/x11.rs
+++ b/copypasta/src/x11.rs
@@ -35,9 +35,9 @@ impl ::std::error::Error for Error {
fn description(&self) -> &str {
match *self {
- Error::Io(..) => "error calling xclip",
- Error::Xclip(..) => "error reported by xclip",
- Error::Utf8(..) => "clipboard contents not utf8",
+ Error::Io(..) => "Error calling xclip",
+ Error::Xclip(..) => "Error reported by xclip",
+ Error::Utf8(..) => "Clipboard contents not utf8",
}
}
}
@@ -50,11 +50,11 @@ impl ::std::fmt::Display for Error {
io::ErrorKind::NotFound => {
write!(f, "Please install `xclip` to enable clipboard support")
},
- _ => write!(f, "error calling xclip: {}", err),
+ _ => write!(f, "Error calling xclip: {}", err),
}
},
- Error::Xclip(ref s) => write!(f, "error from xclip: {}", s),
- Error::Utf8(ref err) => write!(f, "error parsing xclip output: {}", err),
+ Error::Xclip(ref s) => write!(f, "Error from xclip: {}", s),
+ Error::Utf8(ref err) => write!(f, "Error parsing xclip output: {}", err),
}
}
}