refactor: function! macro for error context (#317)

Deletes any now-superfluous `const NAME: &'static str = "name";` definitions.

This gives a path to the function that is being called, which is useful
for debugging errors. It replaces the necessity of implementing
`const NAME: &'static str = "name";` in every function that wants to
use these macros (or coming up with a custom context).
This commit is contained in:
Isaiah Becker-Mayer 2023-12-05 18:44:17 +00:00 committed by GitHub
parent 9355ae5b3d
commit 6588f7cdc7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 35 additions and 103 deletions

View file

@ -129,7 +129,7 @@ fn truncated() {
expect![[r#"
Error {
context: "PreconnectionBlob",
context: "<ironrdp_pdu::pcb::PreconnectionBlob as ironrdp_pdu::PduDecode>::decode",
kind: NotEnoughBytes {
received: 0,
expected: 239,