summaryrefslogtreecommitdiff
path: root/src/library
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2022-01-27 23:07:10 +0100
committerLaurenz <laurmaedje@gmail.com>2022-01-27 23:07:10 +0100
commitc183ed3c15110e11bffd40fad5c5fdfb4d1a5814 (patch)
tree3deea994c8e1b44fc3a0644eca10162c46b9b3fc /src/library
parent4f66907d08a8ed18b41e70188b112d7c915aa0bc (diff)
Mutex comes from tex and we don't want any
Diffstat (limited to 'src/library')
-rw-r--r--src/library/deco.rs29
1 files changed, 3 insertions, 26 deletions
diff --git a/src/library/deco.rs b/src/library/deco.rs
index 5f27c8be..ccb657d1 100644
--- a/src/library/deco.rs
+++ b/src/library/deco.rs
@@ -38,33 +38,10 @@ pub struct Decoration {
pub extent: Linear,
}
-impl Decoration {
- /// Create a new underline with default settings.
- pub const fn underline() -> Self {
+impl From<DecoLine> for Decoration {
+ fn from(line: DecoLine) -> Self {
Self {
- line: DecoLine::Underline,
- stroke: None,
- thickness: None,
- offset: None,
- extent: Linear::zero(),
- }
- }
-
- /// Create a new strikethrough with default settings.
- pub const fn strikethrough() -> Self {
- Self {
- line: DecoLine::Underline,
- stroke: None,
- thickness: None,
- offset: None,
- extent: Linear::zero(),
- }
- }
-
- /// Create a new overline with default settings.
- pub const fn overline() -> Self {
- Self {
- line: DecoLine::Overline,
+ line,
stroke: None,
thickness: None,
offset: None,