summaryrefslogtreecommitdiff
path: root/src/library/spacing.rs
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2020-08-03 16:01:23 +0200
committerLaurenz <laurmaedje@gmail.com>2020-08-03 16:04:55 +0200
commitdbfb3d2ced91e56314dfabbb4df9a338926c0a7a (patch)
tree678264cb18f8abc81ebe28077f5aef2df4e5a4bd /src/library/spacing.rs
parent5a8f2fb73ddafba9fdbe952385ae2676126183ae (diff)
Formatting, documentation and small improvements 🧽
Diffstat (limited to 'src/library/spacing.rs')
-rw-r--r--src/library/spacing.rs10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/library/spacing.rs b/src/library/spacing.rs
index d8263694..545f3910 100644
--- a/src/library/spacing.rs
+++ b/src/library/spacing.rs
@@ -1,13 +1,11 @@
-//! Spacing.
-
-use crate::length::ScaleLength;
use crate::layout::SpacingKind;
+use crate::length::ScaleLength;
use super::*;
function! {
/// `parbreak`: Ends the current paragraph.
///
- /// self has the same effect as two subsequent newlines.
+ /// This has the same effect as two subsequent newlines.
#[derive(Debug, Default, Clone, PartialEq)]
pub struct ParBreakFunc;
@@ -25,7 +23,7 @@ function! {
}
function! {
- /// `h` and `v`: Add spacing along an axis.
+ /// `h` and `v`: Add horizontal or vertical spacing.
#[derive(Debug, Clone, PartialEq)]
pub struct SpacingFunc {
spacing: Option<(SpecAxis, ScaleLength)>,
@@ -35,7 +33,7 @@ function! {
parse(header, body, state, f, meta) {
expect_no_body(body, f);
- SpacingFunc {
+ Self {
spacing: header.args.pos.expect::<ScaleLength>(f)
.map(|s| (meta, s))
.or_missing(header.name.span, "spacing", f),