chiark
/
gitweb
/
~ianmdlvl
/
otter.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
57ec090
)
utils: Improve display_as_debug! so it can pass generic params
author
Ian Jackson
<ijackson@chiark.greenend.org.uk>
Mon, 25 Jan 2021 19:26:53 +0000
(19:26 +0000)
committer
Ian Jackson
<ijackson@chiark.greenend.org.uk>
Fri, 29 Jan 2021 23:24:05 +0000
(23:24 +0000)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
src/error.rs
patch
|
blob
|
history
diff --git
a/src/error.rs
b/src/error.rs
index 676acb65e8db22490711d45924458854b7a6cb95..22d9f97e76f0209a97e2c4d7d806f0cc6375db2b 100644
(file)
--- a/
src/error.rs
+++ b/
src/error.rs
@@
-181,8
+181,8
@@
impl IdForById for PieceId {
#[macro_export]
macro_rules! display_as_debug {
- {$x:ty} => {
- impl std::fmt::Display for $x {
+ {$x:ty
$( , $($gen_tt:tt)* )?
} => {
+ impl
$( $($gen_tt)* )?
std::fmt::Display for $x {
#[throws(std::fmt::Error)]
fn fmt(&self, f: &mut std::fmt::Formatter) {
<Self as Debug>::fmt(self, f)?