Sha256: d0bc3ba7f9aea17d3abee4ac05afe6d4a0112d3527698791e1eeaa3464e2b1d4

Contents?: true

Size: 421 Bytes

Versions: 3

Compression:

Stored size: 421 Bytes

Contents

/// {foo1} {foo2}
#[derive(displaydoc::Display)]
pub struct Test {
    foo1: String,
    foo2: String,
}

fn assert_display<T: std::fmt::Display>(input: T, expected: &'static str) {
    let out = format!("{}", input);
    assert_eq!(expected, out);
}

#[test]
fn does_it_print() {
    assert_display(
        Test {
            foo1: "hi".into(),
            foo2: "hello".into(),
        },
        "hi hello",
    );
}

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
wasmtime-29.0.0 ./ext/cargo-vendor/displaydoc-0.2.5/tests/num_in_field.rs
wasmtime-28.0.0 ./ext/cargo-vendor/displaydoc-0.2.5/tests/num_in_field.rs
wasmtime-27.0.0 ./ext/cargo-vendor/displaydoc-0.2.5/tests/num_in_field.rs