@@ -81,7 +81,6 @@ pub enum ActorTerminationReason {
8181 Success ,
8282 Wait ( Option < u32 > , MessageWaitedType ) ,
8383 GasAllowanceExceeded ,
84- #[ from]
8584 Trap ( TrapExplanation ) ,
8685}
8786
@@ -116,15 +115,15 @@ pub struct SystemTerminationReason;
116115 derive_more:: From ,
117116) ]
118117pub enum UnrecoverableExecutionError {
119- #[ display( fmt = "Invalid debug string passed in `gr_debug` syscall" ) ]
118+ #[ display( "Invalid debug string passed in `gr_debug` syscall" ) ]
120119 InvalidDebugString ,
121- #[ display( fmt = "Not enough gas for operation" ) ]
120+ #[ display( "Not enough gas for operation" ) ]
122121 NotEnoughGas ,
123- #[ display( fmt = "Cannot take data in payload range from message with size" ) ]
122+ #[ display( "Cannot take data in payload range from message with size" ) ]
124123 ReadWrongRange ,
125- #[ display( fmt = "Unsupported version of environment variables encountered" ) ]
124+ #[ display( "Unsupported version of environment variables encountered" ) ]
126125 UnsupportedEnvVarsVersion ,
127- #[ display( fmt = "Length is overflowed to read panic payload" ) ]
126+ #[ display( "Length is overflowed to read panic payload" ) ]
128127 PanicBufferIsTooBig ,
129128}
130129
@@ -143,10 +142,10 @@ pub enum UnrecoverableExecutionError {
143142) ]
144143pub enum UnrecoverableMemoryError {
145144 /// The error occurs in attempt to access memory outside wasm program memory.
146- #[ display( fmt = "Trying to access memory outside wasm program memory" ) ]
145+ #[ display( "Trying to access memory outside wasm program memory" ) ]
147146 AccessOutOfBounds ,
148147 /// The error occurs, when program tries to allocate in block-chain runtime more memory than allowed.
149- #[ display( fmt = "Trying to allocate more memory in block-chain runtime than allowed" ) ]
148+ #[ display( "Trying to allocate more memory in block-chain runtime than allowed" ) ]
150149 RuntimeAllocOutOfBounds ,
151150}
152151
@@ -165,10 +164,10 @@ pub enum UnrecoverableMemoryError {
165164) ]
166165pub enum UnrecoverableWaitError {
167166 /// An error occurs in attempt to wait for or wait up to zero blocks.
168- #[ display( fmt = "Waiting duration cannot be zero" ) ]
167+ #[ display( "Waiting duration cannot be zero" ) ]
169168 ZeroDuration ,
170169 /// An error occurs in attempt to wait after reply sent.
171- #[ display( fmt = "`wait()` is not allowed after reply sent" ) ]
170+ #[ display( "`wait()` is not allowed after reply sent" ) ]
172171 WaitAfterReply ,
173172}
174173
@@ -185,11 +184,11 @@ pub enum UnrecoverableWaitError {
185184 derive_more:: From ,
186185) ]
187186pub enum UnrecoverableExtError {
188- #[ display( fmt = "Execution error: {_0}" ) ]
187+ #[ display( "Execution error: {_0}" ) ]
189188 Execution ( UnrecoverableExecutionError ) ,
190- #[ display( fmt = "Memory error: {_0}" ) ]
189+ #[ display( "Memory error: {_0}" ) ]
191190 Memory ( UnrecoverableMemoryError ) ,
192- #[ display( fmt = "Waiting error: {_0}" ) ]
191+ #[ display( "Waiting error: {_0}" ) ]
193192 Wait ( UnrecoverableWaitError ) ,
194193}
195194
@@ -207,22 +206,22 @@ pub enum UnrecoverableExtError {
207206) ]
208207pub enum TrapExplanation {
209208 /// An error occurs in attempt to charge more gas than available during execution.
210- #[ display( fmt = "Not enough gas to continue execution" ) ]
209+ #[ display( "Not enough gas to continue execution" ) ]
211210 GasLimitExceeded ,
212211 /// An error occurs in attempt to call forbidden syscall.
213- #[ display( fmt = "Unable to call a forbidden function" ) ]
212+ #[ display( "Unable to call a forbidden function" ) ]
214213 ForbiddenFunction ,
215214 /// The error occurs when a program tries to allocate more memory than
216215 /// allowed.
217- #[ display( fmt = "Trying to allocate more wasm program memory than allowed" ) ]
216+ #[ display( "Trying to allocate more wasm program memory than allowed" ) ]
218217 ProgramAllocOutOfBounds ,
219- #[ display( fmt = "Syscall unrecoverable error: {_0}" ) ]
218+ #[ display( "Syscall unrecoverable error: {_0}" ) ]
220219 UnrecoverableExt ( UnrecoverableExtError ) ,
221- #[ display( fmt = "Panic occurred: {_0}" ) ]
220+ #[ display( "Panic occurred: {_0}" ) ]
222221 Panic ( PanicBuffer ) ,
223- #[ display( fmt = "Stack limit exceeded" ) ]
222+ #[ display( "Stack limit exceeded" ) ]
224223 StackLimitExceeded ,
225- #[ display( fmt = "Reason is unknown. Possibly `unreachable` instruction is occurred" ) ]
224+ #[ display( "Reason is unknown. Possibly `unreachable` instruction is occurred" ) ]
226225 Unknown ,
227226}
228227
0 commit comments