• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

cljoly / rusqlite_migration / 14391306314 / 1
95%
master: 95%

Build:
DEFAULT BRANCH: master
Ran 10 Apr 2025 10:15PM UTC
Files 5
Run time 0s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

10 Apr 2025 10:14PM UTC coverage: 94.048% (+0.05%) from 93.994%
14391306314.1

push

github

cljoly
refactor: Keep migrations in `Cow` instead of `Vec`

This builds on https://github.com/cljoly/rusqlite_migration/pull/251 and
proposes another path. Like #251, it provides a method to store the
migrations in a `const` context, but:
* it does so without breaking changes, at least compared to the latest
  release: `new` is not const anymore, but that change was not released
  in a stable version.
* exposes only concrete types like `Vec` and slices to build the
  migrations, instead of the discussed `impl Into<Cow<'m, [M<'m>]>>`.
  This should make the compiler report clearer errors, improving
  usability.
* we can still easily built from a `Cow` type, by borrowing it.

Drawbacks
---------

The main drawback I can think of is this: the most intuitive function to
call (`new`) takes a `Vec`, while it would be better to just use a slice
(which `from_slice` takes). But that cost should be minimal and
preserves backward compatibility.

Co-authored-by: Joaquim Monteiro <joaquim.monteiro@protonmail.com>

316 of 336 relevant lines covered (94.05%)

5.71 hits per line

Source Files on job 14391306314.1
  • Tree
  • List 5
  • Changed 1
  • Source Changed 0
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 14391306314
  • e5e8ec6a on github
  • Prev Job for on master (#14345771743.1)
  • Next Job for on master (#14409648104.1)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc