#macro #fix #temporary #build #mode #lets #write

no-std fix_me

A very simple macro that lets you write temporary code that WILL NOT build in release mode

3 releases

0.1.2 Sep 25, 2020
0.1.1 Jul 19, 2020
0.1.0 Jul 2, 2020

#5 in #lets

Download history 128/week @ 2024-01-31 19/week @ 2024-02-14 22/week @ 2024-02-21 30/week @ 2024-02-28 2/week @ 2024-03-06 14/week @ 2024-03-13

78 downloads per month

MIT license

5KB

Fix me is useful for writing temporary code that will be fixed later. It replaces comments like

//FIXME:Rework error handling 
or
//TODO:Add logging

Unlike comments fix_me is enforced by the compiler.

fix_me is a simple macro that lets you write temporary code that WILL NOT build in release mode.

  • You can still compile debug builds and run test --release without issue.
  • fix_me has no overhead on any release or debug code, instead it provides a compile error if any fix_me code is still in the project at release time.

Simple fix_me hello world

//Use on functions
fix_me::fix_me!(
	fn only_false() -> bool {
		use fix_me::fix_me;
		//Or in functions
		fix_me!(
		return true;
		);
	}
);

fn main() {
	match only_false() {
		false => println!("Hello"),
		_ => {}
	}       
}

It is recommended to add it to the dependencies as you are making changes then remove it as you finish your work.

Feature flag unfixed_code will allow you to compile release code even with fix_me still in your code base. A very simple macro that lets you write temporary code that WILL NOT build in release mode. You can still run debug and test --release without issue.

No runtime deps

Features