From 4f90eb2cd1bb488db004463bb8f4ce58f2e14f51 Mon Sep 17 00:00:00 2001 From: amigin Date: Thu, 21 Nov 2024 10:09:45 +0200 Subject: [PATCH] Improvements --- my-no-sql-core/src/db/db_table/db_table_name.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/my-no-sql-core/src/db/db_table/db_table_name.rs b/my-no-sql-core/src/db/db_table/db_table_name.rs index 46f4d33..d7d85f6 100644 --- a/my-no-sql-core/src/db/db_table/db_table_name.rs +++ b/my-no-sql-core/src/db/db_table/db_table_name.rs @@ -1,4 +1,4 @@ -use std::sync::Arc; +use std::{fmt::Display, sync::Arc}; #[derive(Debug, Clone, PartialEq, Eq, Hash)] pub struct DbTableName(Arc); @@ -13,6 +13,12 @@ impl DbTableName { } } +impl Display for DbTableName { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(f, "{}", self.0) + } +} + impl Into for String { fn into(self) -> DbTableName { DbTableName(Arc::new(self))