mirror of
https://github.com/typst/typst
synced 2025-08-15 15:38:33 +08:00
Revise doc comments
This commit is contained in:
parent
c7216c26f5
commit
16ccc1d2c4
@ -814,7 +814,7 @@ impl Array {
|
|||||||
/// function. The sorting algorithm used is stable.
|
/// function. The sorting algorithm used is stable.
|
||||||
///
|
///
|
||||||
/// Returns an error if two values could not be compared or if the key
|
/// Returns an error if two values could not be compared or if the key
|
||||||
/// function (if given) yields an error.
|
/// or comparison function (if given) yields an error.
|
||||||
///
|
///
|
||||||
/// To sort according to multiple criteria at once, e.g. in case of equality
|
/// To sort according to multiple criteria at once, e.g. in case of equality
|
||||||
/// between some criteria, the key function can return an array. The results
|
/// between some criteria, the key function can return an array. The results
|
||||||
@ -841,8 +841,11 @@ impl Array {
|
|||||||
/// determine the keys to sort by.
|
/// determine the keys to sort by.
|
||||||
#[named]
|
#[named]
|
||||||
key: Option<Func>,
|
key: Option<Func>,
|
||||||
/// If given, uses this function to compare elements in the array to
|
/// If given, uses this function to compare elements in the array.
|
||||||
/// determine their relative order.
|
///
|
||||||
|
/// This function should return an integer, whose sign is
|
||||||
|
/// used to determine the relative order of two given
|
||||||
|
/// elements.
|
||||||
#[named]
|
#[named]
|
||||||
compare: Option<Func>,
|
compare: Option<Func>,
|
||||||
) -> SourceResult<Array> {
|
) -> SourceResult<Array> {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user