From 98d24595b5227f438c28e9b2e8ef9e1b207af4ef Mon Sep 17 00:00:00 2001 From: Christoph Otter Date: Thu, 17 Aug 2023 17:16:36 +0200 Subject: [PATCH] Document order of Coins::{to_vec, into_vec} --- packages/std/src/coins.rs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/packages/std/src/coins.rs b/packages/std/src/coins.rs index 44e72e1330..08171a1424 100644 --- a/packages/std/src/coins.rs +++ b/packages/std/src/coins.rs @@ -101,12 +101,18 @@ impl fmt::Display for Coins { } impl Coins { - /// Conversion to Vec, while NOT consuming the original object + /// Conversion to Vec, while NOT consuming the original object. + /// + /// This produces a vector of coins that is sorted alphabetically by denom with + /// no duplicate denoms. pub fn to_vec(&self) -> Vec { self.0.values().cloned().collect() } - /// Conversion to Vec, consuming the original object + /// Conversion to Vec, consuming the original object. + /// + /// This produces a vector of coins that is sorted alphabetically by denom with + /// no duplicate denoms. pub fn into_vec(self) -> Vec { self.0.into_values().collect() }