Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit388c7b7

Browse files
committed
Simplify Debug impl of Column
1 parentf17e927 commit388c7b7

File tree

2 files changed

+4
-14
lines changed

2 files changed

+4
-14
lines changed

‎tokio-postgres/src/prepare.rs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ pub async fn prepare(
100100
name: field.name().to_string(),
101101
table_oid:NonZeroU32::new(field.table_oid()),
102102
column_id:NonZeroI16::new(field.column_id()),
103-
type_,
103+
r#type:type_,
104104
};
105105
columns.push(column);
106106
}

‎tokio-postgres/src/statement.rs‎

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -66,11 +66,12 @@ impl Statement {
6666
}
6767

6868
/// Information about a column of a query.
69+
#[derive(Debug)]
6970
pubstructColumn{
7071
pub(crate)name:String,
7172
pub(crate)table_oid:Option<NonZeroU32>,
7273
pub(crate)column_id:Option<NonZeroI16>,
73-
pub(crate)type_:Type,
74+
pub(crate)r#type:Type,
7475
}
7576

7677
implColumn{
@@ -92,17 +93,6 @@ impl Column {
9293

9394
/// Returns the type of the column.
9495
pubfntype_(&self) ->&Type{
95-
&self.type_
96-
}
97-
}
98-
99-
impl fmt::DebugforColumn{
100-
fnfmt(&self,fmt:&mut fmt::Formatter<'_>) -> fmt::Result{
101-
fmt.debug_struct("Column")
102-
.field("name",&self.name)
103-
.field("table_oid",&self.table_oid)
104-
.field("column_id",&self.column_id)
105-
.field("type",&self.type_)
106-
.finish()
96+
&self.r#type
10797
}
10898
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp