summaryrefslogtreecommitdiff
path: root/serde_dhall/src
diff options
context:
space:
mode:
authorstuebinm2021-05-08 18:38:37 +0200
committerstuebinm2021-05-08 18:38:37 +0200
commit3d4afe62809ad5263b303a29ec543e4c39310d97 (patch)
tree94c9ffdda05d88cfbd2608669b7165dddc8d8f4f /serde_dhall/src
parente65c53a8e22e2edf209a31ad28ba67ac5d78bed7 (diff)
inject_types -> with_builtin_typessubstitutions
at request of Nadrieril.
Diffstat (limited to 'serde_dhall/src')
-rw-r--r--serde_dhall/src/options/de.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/serde_dhall/src/options/de.rs b/serde_dhall/src/options/de.rs
index 4f7c346..3f0686d 100644
--- a/serde_dhall/src/options/de.rs
+++ b/serde_dhall/src/options/de.rs
@@ -258,14 +258,14 @@ impl<'a, A> Deserializer<'a, A> {
/// let data = "Newtype.Bar";
///
/// let deserialized = serde_dhall::from_str(data)
- /// .inject_types(substs)
+ /// .with_builtin_types(substs)
/// .parse::<Newtype>()
/// .unwrap();
///
/// assert_eq!(deserialized, Newtype::Bar);
///
/// ```
- pub fn inject_types(
+ pub fn with_builtin_types(
self,
tys: impl IntoIterator<Item = (String, SimpleType)>,
) -> Self {
@@ -285,7 +285,7 @@ impl<'a, A> Deserializer<'a, A> {
}
}
- pub fn inject_single_type(self, name: String, ty: SimpleType) -> Self {
+ pub fn with_builtin_type(self, name: String, ty: SimpleType) -> Self {
Deserializer {
substitutions: self
.substitutions