textwrap-macros 0.3.0

Simple procedural macros to use textwrap utilities at compile time.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#![cfg_attr(not(feature = "std"), no_std)]

#[macro_use]
extern crate textwrap_macros;

#[test]
fn test_constant() {
    const X: &[&str] = wrap!("Concurrency without data races.", 15);
    const Y: &[&str] = &["Concurrency", "without data", "races."];
    assert_eq!(X, Y);
}

#[test]
fn test_static() {
    static X: &[&str] = wrap!("Concurrency without data races.", 15);
    static Y: &[&str] = &["Concurrency", "without data", "races."];
    assert_eq!(X, Y);
}