tft 0.1.1

Text file type list and detection similar to that of Neovim
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use std::{path::Path, time::Instant};

use tft::FileType;

fn main() {
    const ITERATIONS: usize = 1000;
    let start = Instant::now();
    for _ in 0..ITERATIONS {
        assert_eq!(
            FileType::Text,
            tft::detect(Path::new("alskdjlaskdjasld.aslkdjalskdj"), "")
        );
    }
    println!("{:?}", start.elapsed() / ITERATIONS as u32);
}