Skip to content

Commit 80b5b13

Browse files
committed
[Rust] Impl Debug for RemoteProject
1 parent 07d2ee4 commit 80b5b13

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

rust/src/collaboration/project.rs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
use std::ffi::c_void;
2+
use std::fmt::Debug;
23
use std::path::PathBuf;
34
use std::ptr::NonNull;
45
use std::time::SystemTime;
@@ -870,11 +871,22 @@ impl RemoteProject {
870871
//}
871872
}
872873

874+
impl Debug for RemoteProject {
875+
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
876+
f.debug_struct("RemoteProject")
877+
.field("id", &self.id())
878+
.field("name", &self.name())
879+
.field("description", &self.description())
880+
.finish()
881+
}
882+
}
883+
873884
impl PartialEq for RemoteProject {
874885
fn eq(&self, other: &Self) -> bool {
875886
self.id() == other.id()
876887
}
877888
}
889+
878890
impl Eq for RemoteProject {}
879891

880892
impl ToOwned for RemoteProject {

0 commit comments

Comments
 (0)