impl FromSql for various heap-allocated string and blob slices#1558
impl FromSql for various heap-allocated string and blob slices#1558gwenn merged 3 commits intorusqlite:masterfrom H2CO3:master
impl FromSql for various heap-allocated string and blob slices#1558Conversation
|
I don't konw why postgres doesn't support these types: |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #1558 +/- ##
==========================================
+ Coverage 85.81% 85.95% +0.14%
==========================================
Files 57 57
Lines 10664 10725 +61
==========================================
+ Hits 9151 9219 +68
+ Misses 1513 1506 -7 ☔ View full report in Codecov by Sentry. |
No idea, to be honest. Seems like an omission. They don't seem to break anything, and I can't think of anything obvious why they shouldn't be supported, either. (And I can give good arguments as to why they should.) |
|
@thomcc Would you mind giving your review ? |
thomcc
left a comment
There was a problem hiding this comment.
Looks like a good change to me.
|
@thomcc @gwenn Sorry, I have zero idea how to please |
|
You should just run |
Thanks, will do this soon. |
|
@thomcc Done, albeit the formatting of the getter closures became very… peculiar, to put it mildly. |
|
Thanks! |
Just what it says on the tin. This adds
impl FromSql for:Cow<'_, T> where T: ToOwned + FromSqlRc<str>Arc<str>Box<[u8]>Rc<[u8]>Arc<[u8]>Unit tests are included and passing. This doesn't seem to break anything used by the current test suite, and adding concrete
impls shouldn't usually be a breaking change, so it seems we're good to go.