Skip to content

Commit

Permalink
Improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
amigin committed Nov 21, 2024
1 parent ea41fd2 commit 4f90eb2
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion my-no-sql-core/src/db/db_table/db_table_name.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use std::sync::Arc;
use std::{fmt::Display, sync::Arc};

#[derive(Debug, Clone, PartialEq, Eq, Hash)]
pub struct DbTableName(Arc<String>);
Expand All @@ -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<DbTableName> for String {
fn into(self) -> DbTableName {
DbTableName(Arc::new(self))
Expand Down

0 comments on commit 4f90eb2

Please sign in to comment.