File tree 1 file changed +6
-8
lines changed
1 file changed +6
-8
lines changed Original file line number Diff line number Diff line change @@ -125,9 +125,9 @@ impl Offer {
125
125
/// The quantity of items supported.
126
126
pub fn supported_quantity ( & self ) -> Quantity {
127
127
match self . contents . quantity_max {
128
- None => Quantity :: One ,
129
- Some ( 0 ) => Quantity :: Many ,
130
- Some ( n ) => Quantity :: Max ( NonZeroU64 :: new ( n ) . unwrap ( ) ) ,
128
+ Some ( 0 ) => Quantity :: Unbounded ,
129
+ Some ( n ) => Quantity :: Bounded ( NonZeroU64 :: new ( n ) . unwrap ( ) ) ,
130
+ None => Quantity :: Bounded ( NonZeroU64 :: new ( 1 ) . unwrap ( ) ) ,
131
131
}
132
132
}
133
133
@@ -160,10 +160,8 @@ pub type CurrencyCode = [u8; 3];
160
160
161
161
/// Quantity of items supported by an [`Offer`].
162
162
pub enum Quantity {
163
- /// A single item.
164
- One ,
165
- /// One or more items.
166
- Many ,
167
163
/// Up to a specific number of items (inclusive).
168
- Max ( NonZeroU64 ) ,
164
+ Bounded ( NonZeroU64 ) ,
165
+ /// One or more items.
166
+ Unbounded ,
169
167
}
You can’t perform that action at this time.
0 commit comments