diff options
| author | KyleMiles <krm504@nyu.edu> | 2023-01-05 15:29:09 -0500 |
|---|---|---|
| committer | KyleMiles <krm504@nyu.edu> | 2023-01-06 16:29:56 -0500 |
| commit | 52edc39a7081fd6662e14fbcd473adabbbc36c7a (patch) | |
| tree | 2901f70389dcd6e9f69aa453ba7125c5cd0cbf0d /rust/src/types.rs | |
| parent | 0f530dd41bee6ed057567c42c7ae92fd474364c8 (diff) | |
Cargo doc fixes
Diffstat (limited to 'rust/src/types.rs')
| -rw-r--r-- | rust/src/types.rs | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/rust/src/types.rs b/rust/src/types.rs index eac2e7d1..c7f55b8f 100644 --- a/rust/src/types.rs +++ b/rust/src/types.rs @@ -81,8 +81,9 @@ impl<T> Conf<T> { } } -/// Conf<T> + Conf<T> ==> Conf<T> /// Returns best value or LHS on tie +/// +/// `Conf<T>` + `Conf<T>` → `Conf<T>` impl<T> ConfMergable<T, Conf<T>> for Conf<T> { type Result = Conf<T>; fn merge(self, other: Conf<T>) -> Conf<T> { @@ -94,8 +95,9 @@ impl<T> ConfMergable<T, Conf<T>> for Conf<T> { } } -/// Conf<T> + Option<Conf<T>> ==> Conf<T> /// Returns LHS if RHS is None +/// +/// `Conf<T>` + `Option<Conf<T>>` → `Conf<T>` impl<T> ConfMergable<T, Option<Conf<T>>> for Conf<T> { type Result = Conf<T>; fn merge(self, other: Option<Conf<T>>) -> Conf<T> { @@ -106,8 +108,9 @@ impl<T> ConfMergable<T, Option<Conf<T>>> for Conf<T> { } } -/// Option<Conf<T>> + Conf<T> ==> Conf<T> /// Returns RHS if LHS is None +/// +/// `Option<Conf<T>>` + `Conf<T>` → `Conf<T>` impl<T> ConfMergable<T, Conf<T>> for Option<Conf<T>> { type Result = Conf<T>; fn merge(self, other: Conf<T>) -> Conf<T> { @@ -118,8 +121,9 @@ impl<T> ConfMergable<T, Conf<T>> for Option<Conf<T>> { } } -/// Option<Conf<T>> + Option<Conf<T>> ==> Option<Conf<T>> /// Returns best non-None value or None +/// +/// `Option<Conf<T>>` + `Option<Conf<T>>` → `Option<Conf<T>>` impl<T> ConfMergable<T, Option<Conf<T>>> for Option<Conf<T>> { type Result = Option<Conf<T>>; fn merge(self, other: Option<Conf<T>>) -> Option<Conf<T>> { |
