chiark / gitweb /
REPRO
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Mon, 26 Feb 2024 17:04:25 +0000 (17:04 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Mon, 26 Feb 2024 17:04:25 +0000 (17:04 +0000)
src/main.rs

index 7aac490996d0f49d3946c7b4a2df1963c9b57b40..1d8c8240955926f8e1872f639009f76f07698e58 100644 (file)
@@ -5,26 +5,18 @@
 
 use educe::Educe;
 use std::fmt::{self, Debug};
+use std::sync::Arc;
 
 trait Object {}
-trait ClientSideDb {}
-
-use std::sync::Arc;
-use Arc as DbPtr;
-use Arc as ClientDb;
 
 impl Object for NotDebug {}
-impl ClientSideDb for NotDebug {}
 
 #[derive(Educe)]
-//#[educe(Clone, Debug(bound(T: Debug)))]
-#[educe(Clone, Debug)]
-pub struct Obj<T: Object, LocalDb: ClientSideDb> {
-    ptr: DbPtr<T>,
+#[educe(Clone, Debug(bound(T: Debug)))]
+//#[educe(Clone, Debug)]
+pub struct Obj<T: Object> {
+    #[educe(Debug(ignore))]
     data: Arc<T>,
-
-//    #[educe(Debug(ignore))]
-    db: Arc<ClientDb<LocalDb>>,
 }
 
 #[derive(Clone)]
@@ -32,10 +24,8 @@ struct NotDebug;
 
 fn main() {
     let a = Obj {
-        ptr: Arc::new(NotDebug),
         data: Arc::new(NotDebug),
-        db: Arc::new(Arc::new(NotDebug)),
     };
     let a = Clone::clone(&a);
-    println!("{:?}", &a);
+//    println!("{:?}", &a);
 }