File tree Expand file tree Collapse file tree 1 file changed +10
-10
lines changed
Expand file tree Collapse file tree 1 file changed +10
-10
lines changed Original file line number Diff line number Diff line change @@ -114,16 +114,6 @@ impl Params {
114114 return Err ( Error :: MemoryTooLittle ) ;
115115 }
116116
117- // Note: we don't need to check `MAX_M_COST`, since it's `u32::MAX`
118-
119- if m_cost < p_cost * 8 {
120- return Err ( Error :: MemoryTooLittle ) ;
121- }
122-
123- if t_cost < Params :: MIN_T_COST {
124- return Err ( Error :: TimeTooSmall ) ;
125- }
126-
127117 // Note: we don't need to check `MAX_T_COST`, since it's `u32::MAX`
128118
129119 if p_cost < Params :: MIN_P_COST {
@@ -134,6 +124,16 @@ impl Params {
134124 return Err ( Error :: ThreadsTooMany ) ;
135125 }
136126
127+ // Note: we don't need to check `MAX_M_COST`, since it's `u32::MAX`
128+
129+ if m_cost < p_cost * 8 {
130+ return Err ( Error :: MemoryTooLittle ) ;
131+ }
132+
133+ if t_cost < Params :: MIN_T_COST {
134+ return Err ( Error :: TimeTooSmall ) ;
135+ }
136+
137137 if let Some ( len) = output_len {
138138 if len < Params :: MIN_OUTPUT_LEN {
139139 return Err ( Error :: OutputTooShort ) ;
You can’t perform that action at this time.
0 commit comments