chiark / gitweb /
INNER
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Mon, 19 Feb 2024 19:31:05 +0000 (19:31 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Mon, 19 Feb 2024 19:31:05 +0000 (19:31 +0000)
src/main.rs

index 1d3ac3be6c12f9f5f6b334dcc000f3a1fb9c9f3c..a552470e897a2c19c1e02358dadd58d130fe6b6c 100644 (file)
@@ -2,9 +2,9 @@ use educe::Educe;
 use std::fmt;
 
 #[derive(Debug)]
-pub struct MyDebug;
+pub struct Inner;
 
-impl MyDebug {
+impl Inner {
     fn our_fmt(&self, _f: &mut fmt::Formatter) -> fmt::Result {
         Ok(())
     }
@@ -13,15 +13,15 @@ impl MyDebug {
 #[derive(Educe)]
 #[educe(Debug(name = false))]
 pub struct Thing {
-    #[educe(Debug(method = "MyDebug::our_fmt"))]
-    field: MyDebug,
+    #[educe(Debug(method = "Inner::our_fmt"))]
+    field: Inner,
     #[educe(Debug(name(Q)))]
     other: u32,
 }
 
 fn main() {
     let a = Thing {
-        field: MyDebug,
+        field: Inner,
         other: 6,
     };
     println!("{:?}", &a);