injm 1.0.1

A CLI tool that injects content into marked regions in source files.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use thiserror::Error;

pub type Result<T> = std::result::Result<T, InjectorError>;

#[derive(Debug, Error)]
pub enum InjectorError {
    #[error("empty input content")]
    EmptyInputContent,

    #[error("invalid range: ({begin}, {end})")]
    InvalidRange { begin: usize, end: usize },

    #[error("line {line_number} mixes tabs and spaces in indentation")]
    MixedIndentChar { line_number: usize },
}