Skip to content
This repository was archived by the owner on Oct 10, 2019. It is now read-only.

Commit 29db483

Browse files
committed
Minor cleanup
1 parent 0fad8fc commit 29db483

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

postgres-derive-codegen/src/fromsql.rs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -100,11 +100,8 @@ fn enum_from_sql_body(ctx: &mut ExtCtxt,
100100
}
101101

102102
arms.push(quote_arm!(ctx, v => {
103-
let err: ::std::boxed::Box<::std::error::Error
104-
+ ::std::marker::Sync
105-
+ ::std::marker::Send>
106-
= format!("unknown variant `{}`", v).into();
107-
::std::result::Result::Err(::postgres::error::Error::Conversion(err))
103+
::std::result::Result::Err(::postgres::error::Error::Conversion(
104+
format!("unknown variant `{}`", v).into()))
108105
}));
109106

110107
let buf = token::str_to_ident("buf");

postgres-derive-codegen/src/tosql.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ fn enum_to_sql_body(ctx: &mut ExtCtxt,
113113
let match_ = ctx.expr_match(span, match_arg, arms);
114114

115115
quote_block!(ctx, {
116-
let s: &'static str = $match_;
116+
let s = $match_;
117117
try!(::std::io::Write::write_all(out, s.as_bytes()));
118118
::std::result::Result::Ok(::postgres::types::IsNull::No)
119119
})

0 commit comments

Comments
 (0)