diff options
Diffstat (limited to 'library/src/text')
| -rw-r--r-- | library/src/text/deco.rs | 2 | ||||
| -rw-r--r-- | library/src/text/link.rs | 2 | ||||
| -rw-r--r-- | library/src/text/mod.rs | 18 | ||||
| -rw-r--r-- | library/src/text/par.rs | 6 | ||||
| -rw-r--r-- | library/src/text/raw.rs | 2 | ||||
| -rw-r--r-- | library/src/text/shift.rs | 2 |
6 files changed, 16 insertions, 16 deletions
diff --git a/library/src/text/deco.rs b/library/src/text/deco.rs index 7db7fa1b..3357f76c 100644 --- a/library/src/text/deco.rs +++ b/library/src/text/deco.rs @@ -34,7 +34,7 @@ impl<const L: DecoLine> DecoNode<L> { /// with the glyphs. Does not apply to strikethrough. pub const EVADE: bool = true; - fn construct(_: &mut Vm, args: &mut Args) -> SourceResult<Content> { + fn construct(_: &Vm, args: &mut Args) -> SourceResult<Content> { Ok(Self(args.expect("body")?).pack()) } diff --git a/library/src/text/link.rs b/library/src/text/link.rs index fd7aec8a..f682eea9 100644 --- a/library/src/text/link.rs +++ b/library/src/text/link.rs @@ -29,7 +29,7 @@ impl LinkNode { #[property(skip, referenced)] pub(crate) const DEST: Option<Destination> = None; - fn construct(_: &mut Vm, args: &mut Args) -> SourceResult<Content> { + fn construct(_: &Vm, args: &mut Args) -> SourceResult<Content> { let dest = args.expect::<Destination>("destination")?; Ok(match dest { Destination::Url(url) => match args.eat()? { diff --git a/library/src/text/mod.rs b/library/src/text/mod.rs index 45808310..81343210 100644 --- a/library/src/text/mod.rs +++ b/library/src/text/mod.rs @@ -128,7 +128,7 @@ impl TextNode { #[property(skip, fold)] const DECO: Decoration = vec![]; - fn construct(_: &mut Vm, args: &mut Args) -> SourceResult<Content> { + fn construct(_: &Vm, args: &mut Args) -> SourceResult<Content> { // The text constructor is special: It doesn't create a text node. // Instead, it leaves the passed argument structurally unchanged, but // styles all text in it. @@ -416,7 +416,7 @@ pub struct SpaceNode; #[node(Unlabellable, Behave)] impl SpaceNode { - fn construct(_: &mut Vm, _: &mut Args) -> SourceResult<Content> { + fn construct(_: &Vm, _: &mut Args) -> SourceResult<Content> { Ok(Self.pack()) } } @@ -437,7 +437,7 @@ pub struct LinebreakNode { #[node(Behave)] impl LinebreakNode { - fn construct(_: &mut Vm, args: &mut Args) -> SourceResult<Content> { + fn construct(_: &Vm, args: &mut Args) -> SourceResult<Content> { let justify = args.named("justify")?.unwrap_or(false); Ok(Self { justify }.pack()) } @@ -457,19 +457,19 @@ pub struct SmartQuoteNode { #[node] impl SmartQuoteNode { - fn construct(_: &mut Vm, args: &mut Args) -> SourceResult<Content> { + fn construct(_: &Vm, args: &mut Args) -> SourceResult<Content> { let double = args.named("double")?.unwrap_or(true); Ok(Self { double }.pack()) } } /// Convert a string or content to lowercase. -pub fn lower(_: &mut Vm, args: &mut Args) -> SourceResult<Value> { +pub fn lower(_: &Vm, args: &mut Args) -> SourceResult<Value> { case(Case::Lower, args) } /// Convert a string or content to uppercase. -pub fn upper(_: &mut Vm, args: &mut Args) -> SourceResult<Value> { +pub fn upper(_: &Vm, args: &mut Args) -> SourceResult<Value> { case(Case::Upper, args) } @@ -503,7 +503,7 @@ impl Case { } /// Display text in small capitals. -pub fn smallcaps(_: &mut Vm, args: &mut Args) -> SourceResult<Value> { +pub fn smallcaps(_: &Vm, args: &mut Args) -> SourceResult<Value> { let body: Content = args.expect("content")?; Ok(Value::Content(body.styled(TextNode::SMALLCAPS, true))) } @@ -514,7 +514,7 @@ pub struct StrongNode(pub Content); #[node(Show)] impl StrongNode { - fn construct(_: &mut Vm, args: &mut Args) -> SourceResult<Content> { + fn construct(_: &Vm, args: &mut Args) -> SourceResult<Content> { Ok(Self(args.expect("body")?).pack()) } @@ -538,7 +538,7 @@ pub struct EmphNode(pub Content); #[node(Show)] impl EmphNode { - fn construct(_: &mut Vm, args: &mut Args) -> SourceResult<Content> { + fn construct(_: &Vm, args: &mut Args) -> SourceResult<Content> { Ok(Self(args.expect("body")?).pack()) } diff --git a/library/src/text/par.rs b/library/src/text/par.rs index 196878f8..1dd6a42c 100644 --- a/library/src/text/par.rs +++ b/library/src/text/par.rs @@ -31,7 +31,7 @@ impl ParNode { /// How to determine line breaks. pub const LINEBREAKS: Smart<Linebreaks> = Smart::Auto; - fn construct(_: &mut Vm, args: &mut Args) -> SourceResult<Content> { + fn construct(_: &Vm, args: &mut Args) -> SourceResult<Content> { // The paragraph constructor is special: It doesn't create a paragraph // node. Instead, it just ensures that the passed content lives is in a // separate paragraph and styles it. @@ -119,7 +119,7 @@ pub struct ParbreakNode; #[node(Unlabellable)] impl ParbreakNode { - fn construct(_: &mut Vm, _: &mut Args) -> SourceResult<Content> { + fn construct(_: &Vm, _: &mut Args) -> SourceResult<Content> { Ok(Self.pack()) } } @@ -132,7 +132,7 @@ pub struct RepeatNode(pub Content); #[node(LayoutInline)] impl RepeatNode { - fn construct(_: &mut Vm, args: &mut Args) -> SourceResult<Content> { + fn construct(_: &Vm, args: &mut Args) -> SourceResult<Content> { Ok(Self(args.expect("body")?).pack()) } } diff --git a/library/src/text/raw.rs b/library/src/text/raw.rs index 101f527c..e47875dc 100644 --- a/library/src/text/raw.rs +++ b/library/src/text/raw.rs @@ -25,7 +25,7 @@ impl RawNode { #[property(referenced)] pub const LANG: Option<EcoString> = None; - fn construct(_: &mut Vm, args: &mut Args) -> SourceResult<Content> { + fn construct(_: &Vm, args: &mut Args) -> SourceResult<Content> { Ok(Self { text: args.expect("text")?, block: args.named("block")?.unwrap_or(false), diff --git a/library/src/text/shift.rs b/library/src/text/shift.rs index e63211c6..b05f68b7 100644 --- a/library/src/text/shift.rs +++ b/library/src/text/shift.rs @@ -30,7 +30,7 @@ impl<const S: ShiftKind> ShiftNode<S> { /// The font size for synthetic sub- and superscripts. pub const SIZE: TextSize = TextSize(Em::new(0.6).into()); - fn construct(_: &mut Vm, args: &mut Args) -> SourceResult<Content> { + fn construct(_: &Vm, args: &mut Args) -> SourceResult<Content> { Ok(Self(args.expect("body")?).pack()) } |
