From b8a58bdda81ee21d555a010a20b95ba02657cc2a Mon Sep 17 00:00:00 2001 From: Clement Delafargue Date: Mon, 26 Feb 2024 16:01:35 +0100 Subject: [PATCH] fix: use `Authorizer::to_string` for inspection `to_string` provides a more complete view than `dump_code`, including facts origins. Before https://github.com/biscuit-auth/biscuit-rust/pull/195, `to_string()` did not include authorizer facts on snapshots (before running `authorize`). This is not an issue with the latest biscuit-rust version (`4.1.1`), so it is safe to use `to_string()` --- src/inspect.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/inspect.rs b/src/inspect.rs index 7a28552..429fe2f 100644 --- a/src/inspect.rs +++ b/src/inspect.rs @@ -555,7 +555,7 @@ pub fn handle_inspect_snapshot_inner( let mut authorizer = read_snapshot_from(&snapshot_from)?; let snapshot_description = SnapshotDescription { - code: authorizer.dump_code(), + code: authorizer.to_string(), iterations: authorizer.iterations(), elapsed_micros: authorizer.execution_time().as_micros(), };