From 39f4e5845079bd688f14585a129e3a623fdf420c Mon Sep 17 00:00:00 2001 From: Pascal Seitz Date: Fri, 7 Oct 2022 10:01:43 +0800 Subject: [PATCH] improve comment --- fastfield_codecs/src/column.rs | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/fastfield_codecs/src/column.rs b/fastfield_codecs/src/column.rs index 8b9f50d94..afbb7785f 100644 --- a/fastfield_codecs/src/column.rs +++ b/fastfield_codecs/src/column.rs @@ -126,8 +126,7 @@ impl<'a, T: Copy + PartialOrd + Send + Sync> Column for VecColumn<'a, T> { } impl<'a, T: Copy + Ord + Default, V> From<&'a V> for VecColumn<'a, T> -where - V: AsRef<[T]> + ?Sized, +where V: AsRef<[T]> + ?Sized { fn from(values: &'a V) -> Self { let values = values.as_ref(); @@ -147,8 +146,11 @@ struct MonotonicMappingColumn { } /// Creates a view of a column transformed by a strictly monotonic mapping. See -/// [`StrictlyMonotonicFn`]. E.g. apply a gcd monotonic_mapping([100, 200, 300]) == [1, 2, 3] -/// The provided mappings need to be the inverse of each other. +/// [`StrictlyMonotonicFn`]. +/// +/// E.g. apply a gcd monotonic_mapping([100, 200, 300]) == [1, 2, 3] +/// monotonic_mapping.mapping() is expected to be injective, and we should always have +/// monotonic_mapping.inverse(monotonic_mapping.mapping(el)) == el /// /// The inverse of the mapping is required for: /// `fn get_between_vals(&self, range: RangeInclusive) -> Vec ` @@ -224,8 +226,7 @@ where pub struct IterColumn(T); impl From for IterColumn -where - T: Iterator + Clone + ExactSizeIterator, +where T: Iterator + Clone + ExactSizeIterator { fn from(iter: T) -> Self { IterColumn(iter)