summaryrefslogtreecommitdiff
path: root/library/src/text
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2023-06-12 16:43:49 +0200
committerLaurenz <laurmaedje@gmail.com>2023-06-12 16:47:46 +0200
commitd3b4d7da9a801dac3af6a3cf52eb55af83adc5f5 (patch)
tree72ab79ed75dddfb7b97ddf02ba4d19c4efc9ea5a /library/src/text
parent378ebe5f5601f11c3f428c17bed492012feb251e (diff)
More `bail!` usage
Diffstat (limited to 'library/src/text')
-rw-r--r--library/src/text/mod.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/library/src/text/mod.rs b/library/src/text/mod.rs
index 6090094a..bde5dbac 100644
--- a/library/src/text/mod.rs
+++ b/library/src/text/mod.rs
@@ -644,7 +644,7 @@ cast! {
self => self.0.into_value(),
v: Smart<Dir> => {
if v.map_or(false, |dir| dir.axis() == Axis::Y) {
- Err("text direction must be horizontal")?;
+ bail!("text direction must be horizontal");
}
Self(v)
},
@@ -703,7 +703,7 @@ cast! {
self => self.0.into_value(),
v: i64 => match v {
1 ..= 20 => Self::new(v as u8),
- _ => Err("stylistic set must be between 1 and 20")?,
+ _ => bail!("stylistic set must be between 1 and 20"),
},
}