summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKirill Chibisov <contact@kchibisov.com>2020-07-11 04:01:45 +0300
committerGitHub <noreply@github.com>2020-07-11 04:01:45 +0300
commit5f039cee49b9c817177c6feecc5e7d97fb0a57e1 (patch)
tree617341d30269b53c8997b5963dd112a187adcca6
parent521a58d691c815a739e131f0d02cd602c7d14639 (diff)
Remove alacritty.yml mentions from font crate errors
-rw-r--r--alacritty/src/config/mod.rs4
-rw-r--r--alacritty/src/renderer/mod.rs2
-rw-r--r--font/src/darwin/mod.rs11
-rw-r--r--font/src/directwrite/mod.rs7
-rw-r--r--font/src/ft/mod.rs7
-rw-r--r--font/src/lib.rs2
6 files changed, 9 insertions, 24 deletions
diff --git a/alacritty/src/config/mod.rs b/alacritty/src/config/mod.rs
index ffa7cbd3..e6437d26 100644
--- a/alacritty/src/config/mod.rs
+++ b/alacritty/src/config/mod.rs
@@ -55,9 +55,9 @@ impl std::error::Error for Error {
impl Display for Error {
fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result {
match self {
- Error::NotFound => write!(f, "Couldn't locate config file"),
+ Error::NotFound => write!(f, "Unable to locate config file"),
Error::ReadingEnvHome(err) => {
- write!(f, "Couldn't read $HOME environment variable: {}", err)
+ write!(f, "Unable to read $HOME environment variable: {}", err)
},
Error::Io(err) => write!(f, "Error reading config file: {}", err),
Error::Yaml(err) => write!(f, "Problem with config: {}", err),
diff --git a/alacritty/src/renderer/mod.rs b/alacritty/src/renderer/mod.rs
index 8fd6c087..99e4afbc 100644
--- a/alacritty/src/renderer/mod.rs
+++ b/alacritty/src/renderer/mod.rs
@@ -1452,7 +1452,7 @@ impl std::error::Error for ShaderCreationError {
impl Display for ShaderCreationError {
fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result {
match self {
- ShaderCreationError::Io(err) => write!(f, "Couldn't read shader: {}", err),
+ ShaderCreationError::Io(err) => write!(f, "Unable to read shader: {}", err),
ShaderCreationError::Compile(path, log) => {
write!(f, "Failed compiling shader at {}: {}", path.display(), log)
},
diff --git a/font/src/darwin/mod.rs b/font/src/darwin/mod.rs
index 62baa96b..0194925f 100644
--- a/font/src/darwin/mod.rs
+++ b/font/src/darwin/mod.rs
@@ -92,8 +92,8 @@ pub enum Error {
impl ::std::error::Error for Error {
fn description(&self) -> &str {
match *self {
- Error::MissingGlyph(ref _c) => "Couldn't find the requested glyph",
- Error::MissingFont(ref _desc) => "Couldn't find the requested font",
+ Error::MissingGlyph(ref _c) => "Unable to find the requested glyph",
+ Error::MissingFont(ref _desc) => "Unable to find the requested font",
Error::FontNotLoaded => "Tried to operate on font that hasn't been loaded",
}
}
@@ -103,12 +103,7 @@ impl ::std::fmt::Display for Error {
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
match *self {
Error::MissingGlyph(ref c) => write!(f, "Glyph not found for char {:?}", c),
- Error::MissingFont(ref desc) => write!(
- f,
- "Couldn't find a font with {}\n\tPlease check the font config in your \
- alacritty.yml.",
- desc
- ),
+ Error::MissingFont(ref desc) => write!(f, "Unable to find the font {}", desc),
Error::FontNotLoaded => f.write_str("Tried to use a font that hasn't been loaded"),
}
}
diff --git a/font/src/directwrite/mod.rs b/font/src/directwrite/mod.rs
index c442cae9..d139b35e 100644
--- a/font/src/directwrite/mod.rs
+++ b/font/src/directwrite/mod.rs
@@ -266,12 +266,7 @@ impl Display for Error {
fn fmt(&self, f: &mut Formatter) -> fmt::Result {
match self {
Error::MissingGlyph(c) => write!(f, "Glyph not found for char {:?}", c),
- Error::MissingFont(desc) => write!(
- f,
- "Couldn't find a font with {}\n\tPlease check the font config in your \
- alacritty.yml.",
- desc
- ),
+ Error::MissingFont(desc) => write!(f, "Unable to find the font {}", desc),
Error::FontNotLoaded => f.write_str("Tried to use a font that hasn't been loaded"),
Error::DirectWriteError(hresult) => {
write!(f, "A DirectWrite rendering error occurred: {:#X}", hresult)
diff --git a/font/src/ft/mod.rs b/font/src/ft/mod.rs
index 0798e087..07d5729b 100644
--- a/font/src/ft/mod.rs
+++ b/font/src/ft/mod.rs
@@ -769,12 +769,7 @@ impl Display for Error {
fn fmt(&self, f: &mut Formatter) -> fmt::Result {
match self {
Error::FreeType(err) => err.fmt(f),
- Error::MissingFont(err) => write!(
- f,
- "Couldn't find a font with {}\n\tPlease check the font config in your \
- alacritty.yml.",
- err
- ),
+ Error::MissingFont(err) => write!(f, "Unable to find the font {}", err),
Error::FontNotLoaded => f.write_str("Tried to use a font that hasn't been loaded"),
Error::MissingSizeMetrics => {
f.write_str("Tried to get size metrics from a face without a size")
diff --git a/font/src/lib.rs b/font/src/lib.rs
index d6e2b3da..15cd46ff 100644
--- a/font/src/lib.rs
+++ b/font/src/lib.rs
@@ -75,7 +75,7 @@ impl FontDesc {
impl fmt::Display for FontDesc {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
- write!(f, "name {} and style {}", self.name, self.style)
+ write!(f, "{} - {}", self.name, self.style)
}
}