aboutsummaryrefslogtreecommitdiff
path: root/common/object/src/debug.rs
diff options
context:
space:
mode:
Diffstat (limited to 'common/object/src/debug.rs')
-rw-r--r--common/object/src/debug.rs14
1 files changed, 4 insertions, 10 deletions
diff --git a/common/object/src/debug.rs b/common/object/src/debug.rs
index b45d5bf..196da20 100644
--- a/common/object/src/debug.rs
+++ b/common/object/src/debug.rs
@@ -4,16 +4,10 @@
Copyright (C) 2026 metamuffin <metamuffin.org>
*/
-use crate::{Object, ObjectBuffer, Tag, TypedTag, ValueType};
+use crate::{Object, Tag, TypedTag, ValueType};
use std::{any::type_name, fmt::Debug};
-impl Debug for ObjectBuffer {
- fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
- self.as_object().fmt(f)
- }
-}
-
-impl Debug for Object<'_> {
+impl Debug for Object {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut s = f.debug_struct("Object");
let mut nonexhaustive = false;
@@ -23,8 +17,8 @@ impl Debug for Object<'_> {
let ty = self.offset_type(i);
let sz = self.size(i);
match (ty, sz) {
- (ValueType::String, _) => s.field(k, &self.get_typed::<&str>(i).unwrap()),
- (ValueType::Binary, _) => s.field(k, &self.get_typed::<&[u8]>(i).unwrap()),
+ (ValueType::String, _) => s.field(k, &self.get_typed::<str>(i).unwrap()),
+ (ValueType::Binary, _) => s.field(k, &self.get_typed::<[u8]>(i).unwrap()),
(ValueType::Object, _) => s.field(k, &self.get_typed::<Object>(i).unwrap()),
(ValueType::UInt, 4) => s.field(k, &self.get_typed::<u32>(i).unwrap()),
(ValueType::UInt, 8) => s.field(k, &self.get_typed::<u64>(i).unwrap()),