File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change 2
2
/// where we want to ensure that no error is returned, such as
3
3
/// the `ibc_packet_receive` entry point.
4
4
///
5
+ /// In contrast to `Empty`, this does not have a JSON schema
6
+ /// and cannot be used for message and query types.
7
+ ///
5
8
/// Once the ! type is stable, this is not needed anymore.
6
9
/// See <https://github.com/rust-lang/rust/issues/35121>.
7
10
pub enum Never { }
8
11
12
+ // The Debug implementation is needed to allow the use of `Result::unwrap`.
9
13
impl core:: fmt:: Debug for Never {
10
14
fn fmt ( & self , _f : & mut core:: fmt:: Formatter < ' _ > ) -> core:: fmt:: Result {
11
15
// This is unreachable because no instance of Never can exist
12
16
unreachable ! ( )
13
17
}
14
18
}
15
19
20
+ // The Display implementation is needed to fulfill the ToString requirement of
21
+ // entry point errors: `Result<IbcReceiveResponse<C>, E>` with `E: ToString`.
16
22
impl core:: fmt:: Display for Never {
17
23
fn fmt ( & self , _f : & mut core:: fmt:: Formatter < ' _ > ) -> core:: fmt:: Result {
18
24
// This is unreachable because no instance of Never can exist
You can’t perform that action at this time.
0 commit comments