Skip to content

Commit a3fcff1

Browse files
committed
just use debug name
1 parent 07396ea commit a3fcff1

1 file changed

Lines changed: 3 additions & 14 deletions

File tree

src/table/capability.rs

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -13,25 +13,14 @@ use std::{
1313
sync::Arc,
1414
};
1515

16-
#[derive(Clone, Copy, PartialEq, Eq)]
16+
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
1717
pub(crate) enum TableCapabilityKind {
1818
Insert,
1919
Delete,
2020
Update,
2121
InsertUpdate,
2222
}
2323

24-
impl TableCapabilityKind {
25-
const fn name(self) -> &'static str {
26-
match self {
27-
Self::Insert => "insert",
28-
Self::Delete => "delete",
29-
Self::Update => "update",
30-
Self::InsertUpdate => "insert_update",
31-
}
32-
}
33-
}
34-
3524
/// A typed table binding capability used with [`crate::prelude::StdbPlugin::bind`].
3625
///
3726
/// Construct capabilities with [`Self::insert`], [`Self::delete`],
@@ -241,9 +230,9 @@ where
241230
let key = (TypeId::of::<TTable>(), kind);
242231
assert!(
243232
!self.registered_capabilities.contains(&key),
244-
"duplicate table capability registration: accessor `{}` already has `{}` bound",
233+
"duplicate table capability registration: accessor `{}` already has `{:?}` bound",
245234
type_name::<TTable>(),
246-
kind.name(),
235+
kind,
247236
);
248237
self.registered_capabilities.push(key);
249238
self.table_registrations.push(Arc::new(register));

0 commit comments

Comments
 (0)