summaryrefslogtreecommitdiff
path: root/library/src/compute/data.rs
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2023-04-04 14:36:25 +0200
committerLaurenz <laurmaedje@gmail.com>2023-04-04 14:36:25 +0200
commitc2d88989a732aed01f4274b8813fecff07bcca19 (patch)
treeabcd9efa22ae998bf938ed0aab8b8f205d46f149 /library/src/compute/data.rs
parent8271ba5a521b2d442c605314124af2e456c1aa48 (diff)
Format code
Diffstat (limited to 'library/src/compute/data.rs')
-rw-r--r--library/src/compute/data.rs16
1 files changed, 8 insertions, 8 deletions
diff --git a/library/src/compute/data.rs b/library/src/compute/data.rs
index c2dc632b..1e0edebb 100644
--- a/library/src/compute/data.rs
+++ b/library/src/compute/data.rs
@@ -212,21 +212,21 @@ fn format_json_error(error: serde_json::Error) -> String {
/// The file must contain a valid YAML object or array. YAML mappings will be
/// converted into Typst dictionaries, and YAML sequences will be converted into
/// Typst arrays. Strings and booleans will be converted into the Typst
-/// equivalents, null-values (`null`, `~` or empty ``) will be converted into
-/// `{none}`, and numbers will be converted to floats or integers depending on
+/// equivalents, null-values (`null`, `~` or empty ``) will be converted into
+/// `{none}`, and numbers will be converted to floats or integers depending on
/// whether they are whole numbers.
///
-/// Note that mapping keys that are not a string cause the entry to be
+/// Note that mapping keys that are not a string cause the entry to be
/// discarded.
-///
+///
/// Custom YAML tags are ignored, though the loaded value will still be
/// present.
-///
+///
/// The function returns a dictionary or value or an array, depending on
/// the YAML file.
///
/// The YAML files in the example contain objects with authors as keys,
-/// each with a sequence of their own submapping with the keys
+/// each with a sequence of their own submapping with the keys
/// "title" and "published"
///
/// ## Example
@@ -275,9 +275,9 @@ fn convert_yaml(value: serde_yaml::Value) -> Value {
serde_yaml::Value::Mapping(v) => Value::Dict(
v.into_iter()
.map(|(key, value)| (convert_yaml_key(key), convert_yaml(value)))
- .filter_map(|(key, value)| key.map(|key|(key, value)))
+ .filter_map(|(key, value)| key.map(|key| (key, value)))
.collect(),
- )
+ ),
}
}