<commit_before>extern crate opentype;
extern crate postscript;
extern crate truetype;

use std::fs::File;
use std::io::{Seek, SeekFrom};

mod fixture;

use fixture::Fixture;

macro_rules! ok(($result:expr) => ($result.unwrap()));

macro_rules! setup(
    ($fixture:ident) => (::setup(::fixture::Fixture::$fixture, None));
    ($fixture:ident, $table:expr) => (::setup(::fixture::Fixture::$fixture, Some($table)));
);

macro_rules! tags(($($name:expr),*) => (vec![$(::truetype::Tag(*$name)),*]));

mod file;
mod glyph_definition;
mod glyph_positioning;
mod glyph_substitution;

fn setup(fixture: Fixture, table: Option<&str>) -> File {
    let mut file = ok!(File::open(fixture.path()));
    ok!(file.seek(SeekFrom::Start(table.map(|table| fixture.offset(table)).unwrap_or(0))));
    file
}<commit_msg>Make a cosmetic adjustment<commit_after>extern crate opentype;
extern crate postscript;
extern crate truetype;

use std::fs::File;

macro_rules! ok(($result:expr) => ($result.unwrap()));

macro_rules! setup(
    ($fixture:ident) => (::setup(::fixture::Fixture::$fixture, None));
    ($fixture:ident, $table:expr) => (::setup(::fixture::Fixture::$fixture, Some($table)));
);

macro_rules! tags(($($name:expr),*) => (vec![$(::truetype::Tag(*$name)),*]));

mod file;
mod fixture;
mod glyph_definition;
mod glyph_positioning;
mod glyph_substitution;

use fixture::Fixture;

fn setup(fixture: Fixture, table: Option<&str>) -> File {
    use std::io::{Seek, SeekFrom};

    let mut file = ok!(File::open(fixture.path()));
    ok!(file.seek(SeekFrom::Start(table.map(|table| fixture.offset(table)).unwrap_or(0))));
    file
}
{'fraction_non_alphanumeric': 0.21494749845583694, 'fraction_numerical': 0.0012353304508956147, 'mean_word_length': 7.01980198019802, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1246070', 'n_tokens_mistral': 595, 'n_tokens_neox': 574, 'n_words': 111}