[−][src]Crate block_effects
With block_effects
, it is possible to chain different block effects with the use of the block!
macro.
This idea was proposed by mcy.
Goal
The main purpose of this crate is to minimize indentation for nested blocks.
Unfortunately proc macros also add indentation.
So to fully benefit from this one should not indent the block!
macro or even put the macro braces on the same line as the block.
Example
use block_effects::block; block!{ if let Some(_) = Some(0) if let Some(_) = Some(0) { assert!(true); } } let _future = block!{ unsafe async for i in 0..3 match i { 0..=2 => assert!(true), _ => assert!(false) } };
Macros
block | The |