Is panic!() the same as trap()?

Couldn’t find the answer. There is no such panic hook in ic-cdk-rs either.

Will panic revert the state? Is it correct to use Result::expect and other helpers which panic?