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

Commitdf2f37d

Browse files
committed
Remove unecessary alias for Timestamp
1 parent6de0fce commitdf2f37d

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

‎postgres-types/src/jiff_01.rs‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ use bytes::BytesMut;
22
use jiff_01::{
33
civil::{Date,DateTime,Time},
44
tz::TimeZone,
5-
Span,TimestampasJiffTimestamp,Zoned,
5+
Span,Timestamp,Zoned,
66
};
77
use postgres_protocol::types;
88
use std::error::Error;
@@ -32,8 +32,8 @@ impl ToSql for DateTime {
3232
to_sql_checked!();
3333
}
3434

35-
impl<'a>FromSql<'a>forJiffTimestamp{
36-
fnfrom_sql(type_:&Type,raw:&[u8]) ->Result<JiffTimestamp,Box<dynError +Sync +Send>>{
35+
impl<'a>FromSql<'a>forTimestamp{
36+
fnfrom_sql(type_:&Type,raw:&[u8]) ->Result<Timestamp,Box<dynError +Sync +Send>>{
3737
Ok(DateTime::from_sql(type_, raw)?
3838
.to_zoned(TimeZone::UTC)?
3939
.timestamp())
@@ -42,7 +42,7 @@ impl<'a> FromSql<'a> for JiffTimestamp {
4242
accepts!(TIMESTAMPTZ);
4343
}
4444

45-
implToSqlforJiffTimestamp{
45+
implToSqlforTimestamp{
4646
fnto_sql(&self, _:&Type,w:&mutBytesMut) ->Result<IsNull,Box<dynError +Sync +Send>>{
4747
types::timestamp_to_sql(
4848
self.since(base().to_zoned(TimeZone::UTC)?)?
@@ -58,7 +58,7 @@ impl ToSql for JiffTimestamp {
5858

5959
impl<'a>FromSql<'a>forZoned{
6060
fnfrom_sql(type_:&Type,raw:&[u8]) ->Result<Zoned,Box<dynError +Sync +Send>>{
61-
Ok(JiffTimestamp::from_sql(type_, raw)?.to_zoned(TimeZone::UTC))
61+
Ok(Timestamp::from_sql(type_, raw)?.to_zoned(TimeZone::UTC))
6262
}
6363

6464
accepts!(TIMESTAMPTZ);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp