mirror of
https://github.com/typst/typst
synced 2025-05-15 17:45:27 +08:00
Fix a few variadic signatures
This commit is contained in:
parent
c20b6ec6e1
commit
0340497e00
@ -253,7 +253,7 @@ impl Args {
|
|||||||
/// The arguments to construct.
|
/// The arguments to construct.
|
||||||
#[external]
|
#[external]
|
||||||
#[variadic]
|
#[variadic]
|
||||||
arguments: Vec<Args>,
|
arguments: Vec<Value>,
|
||||||
) -> Args {
|
) -> Args {
|
||||||
args.take()
|
args.take()
|
||||||
}
|
}
|
||||||
|
@ -311,7 +311,7 @@ impl Func {
|
|||||||
/// The arguments to apply to the function.
|
/// The arguments to apply to the function.
|
||||||
#[external]
|
#[external]
|
||||||
#[variadic]
|
#[variadic]
|
||||||
arguments: Vec<Args>,
|
arguments: Vec<Value>,
|
||||||
) -> Func {
|
) -> Func {
|
||||||
let span = self.span;
|
let span = self.span;
|
||||||
Self {
|
Self {
|
||||||
@ -331,7 +331,7 @@ impl Func {
|
|||||||
/// The fields to filter for.
|
/// The fields to filter for.
|
||||||
#[variadic]
|
#[variadic]
|
||||||
#[external]
|
#[external]
|
||||||
fields: Vec<Args>,
|
fields: Vec<Value>,
|
||||||
) -> StrResult<Selector> {
|
) -> StrResult<Selector> {
|
||||||
let fields = args.to_named();
|
let fields = args.to_named();
|
||||||
args.items.retain(|arg| arg.name.is_none());
|
args.items.retain(|arg| arg.name.is_none());
|
||||||
|
Loading…
x
Reference in New Issue
Block a user