jsonc_tools 0.0.1

jsonc_tools: Tools to deal with `jsonc` files. See, [JSON with Comments](https://code.visualstudio.com/docs/languages/json#_json-with-comments) and [jsonc](https://komkom.github.io/) (A Json like file format with comments). See, [User and Workspace Settings](https://code.visualstudio.com/docs/getstarted/settings) and [Settings - vscode](https://vscode.readthedocs.io/en/latest/getstarted/settings/) for example files.
Documentation
extern crate term_size;

use log::{error, trace};

pub fn dimensions_or_exit() -> (usize, usize) {
    if let Some((w, h)) = term_size::dimensions() {
        trace!("term_size::dimensions: width={}, height={}", w, h);
        (w, h)
    } else {
        error!("term_size::dimensions: unable to get term size");
        std::process::exit(1);
    }
}

#[cfg(test)]
mod tests {
    #[test]
    fn it_works() {
        assert_eq!(2 + 2, 4);
    }

    use pretty_assertions::assert_eq;

    #[test]
    fn it_works_pretty_assertions() {
        assert_eq!(2 + 2, 4);
    }
}