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

Commit21fdfe8

Browse files
committed
Use map instead of ?
1 parentd61eef2 commit21fdfe8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

‎postgres-types/src/smol_str_02.rs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ use crate::{FromSql, IsNull, ToSql, Type};
66

77
impl<'a>FromSql<'a>forSmolStr{
88
fnfrom_sql(ty:&Type,raw:&'a[u8]) ->Result<Self,Box<dynError +Sync +Send>>{
9-
Ok(SmolStr::new(<&strasFromSql>::from_sql(ty, raw)?))
9+
<&strasFromSql>::from_sql(ty, raw).map(SmolStr::new)
1010
}
1111

1212
fnaccepts(ty:&Type) ->bool{

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp