echoes 0.10.2

Find duplicated Rust doctests, functions and contexts
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use serde::Deserialize;
use std::sync::LazyLock;

#[derive(Deserialize)]
pub struct Case {
    pub id: String,
    pub family: String,
    pub a: String,
    pub b: String,
    pub expected: String,
}

pub fn cases() -> &'static [Case] {
    static CASES: LazyLock<Vec<Case>> = LazyLock::new(|| {
        serde_json::from_str(include_str!("../fixtures/dependency/cases.json")).unwrap()
    });
    &CASES
}