Error variant Api::Problem prints "API error: {problem}" however the Problem struct has display impl that starts by printing "API error". Together this results in "API error: API error" followed by the details.
This fixes that by annotating Api::Problem with thiserror's transparent attribute which forwards the display impl to the underlying types display impl.
Error variant
Api::Problem
prints "API error: {problem}" however the Problem struct has display impl that starts by printing "API error". Together this results in "API error: API error" followed by the details.This fixes that by annotating
Api::Problem
withthiserror
'stransparent
attribute which forwards the display impl to the underlying types display impl.