wip 0.2.0

Crate providing traits and macros to use while developing Rust code
Documentation
  • Coverage
  • 100%
    18 out of 18 items documented8 out of 18 items with examples
  • Size
  • Source code size: 169.14 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 352.94 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 3s Average build duration of successful builds.
  • all releases: 4s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Repository
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • dureuill

wip -- The crate you'll never put into production

License Crates.io Docs dependency status

wip helps you during Rust development by helping signal when something is unfinished.

It plays a role similar to the std::todo macro, but emits warning on use, so that a proper CI blocks uses of this crate from reaching production.

Screenshot of the helix editor displaying various warnings emitted by this crate

What's inside?

  • wip extension methods for Result and Option. They function like unwrap but emit warnings on use, so that you remember to remove them before merging that PR!
  • clone_fixme extension method for any clonable object, for clones that you might later regret, via [WipCloneExt::clone_fixme].
  • wip!() macros that emit warnings and work with iterators (wip_iter!) and futures (wip_future!, you guessed it)
  • A fixme() macro that doesn't panic like wip!, but still emit a warning, to keep track of all these // FIXME: handle edge case in your code...

How to use?

  1. Add the crate to your dependencies.
cargo add wip
  1. (optional) glob import the prelude in your files: use wip::prelude::*; with the one from this crate.
use wip::prelude::*;
  1. Profit!

This crate relies on deprecation warnings, so make sure you don't #![allow(deprecated)], lest it won't warn you as intended.

Alternatives

I don't currently know of crates exposing the same functionality.

However, if you don't like the idea of adding a dependency for this, did you know you could use doc comments over expressions to benefit from a free warning?

unused doc comment
use `//` for a plain comment
`#[warn(unused_doc_comments)]` on by default

No genAI

This crate does not use any genAI tooling and intends on staying so.