Clean up doctests by extracting common code

Open
#678 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
48/100
Issue type
Refactor
Clarity
Mostly clear
Activity status
Active
Tech stack
rust

Research direction

Review the doctests for repeated structs and migrations, starting with the example in issue #675. Compare whether shared code belongs in a doc(hidden) area of the cot crate or in a new cot-test crate, then confirm the doctests still pass without duplicated setup.

Written by the indexing model from the issue text.

Description

A-docs enhancement good first issue

There are some doctests that copy-paste the same structs or migrations over and over again (see #675 for an example).

It would be nice to review what we have, and extract the common code out of these tests. It should go either to some doc(hidden) part in the cot crate, or (preferably) into another crate, e.g. cot-test.

Dominant language
Rust
Stars
1.1k
Forks
57
Avg merge
17h 39m
Merged PRs (30d)
12

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from cot-rs/cot

All issues in cot-rs/cot

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.