Skip to content

Commit

Permalink
use to_string() instead of dump_code for snapshots
Browse files Browse the repository at this point in the history
- `dump_code()` does not provide a stable order for facts, so facts can jump around when typing a query or extra authorizer code
- `to_string()` provides the origin of facts as comments, instead of obscuring it
  • Loading branch information
divarvel committed Oct 30, 2023
1 parent 3c33525 commit 521e1da
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/parse_snapshot.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ pub fn inspect_snapshot(query: &JsValue) -> JsValue {

fn inspect_snapshot_inner(query: InspectSnapshotQuery) -> Result<ParseResult, error::Token> {
let mut authorizer = Authorizer::from_base64_snapshot(&query.data)?;
let code = authorizer.dump_code();
let code = authorizer.to_string();
let iterations = authorizer.iterations();
let elapsed_micros = authorizer.execution_time().as_micros();

Expand Down

0 comments on commit 521e1da

Please sign in to comment.