From 46104a2db8d0a05d8d3e14d9253ed55a955e5475 Mon Sep 17 00:00:00 2001 From: Gregory Edison Date: Thu, 21 Sep 2023 11:47:34 +0700 Subject: [PATCH] add rust doc, update should panic --- crates/sequencer/src/sequencer.rs | 1 + crates/sequencer/src/state.rs | 8 ++------ 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/crates/sequencer/src/sequencer.rs b/crates/sequencer/src/sequencer.rs index 46b7a34c..1f336a15 100644 --- a/crates/sequencer/src/sequencer.rs +++ b/crates/sequencer/src/sequencer.rs @@ -7,6 +7,7 @@ use blockifier::state::state_api::{State, StateReader}; /// We bound S such that a mutable reference to S (&'a mut S) /// must implement State and StateReader. The `for` keyword /// indicates that the bound must hold for any lifetime 'a. +/// For more details, check out https://doc.rust-lang.org/nomicon/hrtb.html pub struct Sequencer where for<'a> &'a mut S: State + StateReader, diff --git a/crates/sequencer/src/state.rs b/crates/sequencer/src/state.rs index 3d36acaf..f49d8a91 100644 --- a/crates/sequencer/src/state.rs +++ b/crates/sequencer/src/state.rs @@ -219,9 +219,7 @@ mod tests { } #[test] - #[should_panic( - expected = "UndeclaredClassHash(ClassHash(StarkFelt(\"0x0000000000000000000000000000000000000000000000000000000000000001\")))" - )] + #[should_panic(expected = "UndeclaredClassHash")] fn test_uninitialized_contract_class() { // Given let mut state = &mut State::default(); @@ -247,9 +245,7 @@ mod tests { } #[test] - #[should_panic( - expected = "UndeclaredClassHash(ClassHash(StarkFelt(\"0x0000000000000000000000000000000000000000000000000000000000000001\"))" - )] + #[should_panic(expected = "UndeclaredClassHash")] fn test_uninitialized_compiled_class_hash() { // Given let mut state = &mut State::default();