Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/braille.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ use crate::canonicalize::get_parent;
use std::borrow::Cow;
use std::ops::Range;
use std::sync::LazyLock;
use log::error;

static UEB_PREFIXES: phf::Set<char> = phf_set! {
'⠼', '⠈', '⠘', '⠸', '⠐', '⠨', '⠰', '⠠',
Expand Down Expand Up @@ -3033,6 +3034,7 @@ mod tests {
#[allow(unused_imports)]
use crate::init_logger;
use crate::interface::*;
use log::debug;

#[test]
fn ueb_highlight_24() -> Result<()> { // issue 24
Expand Down
2 changes: 2 additions & 0 deletions src/canonicalize.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ use crate::chemistry::*;
use unicode_script::Script;
use roman_numerals_rs::RomanNumeral;
use std::sync::LazyLock;
use log::{debug};
use bitflags::bitflags;

// FIX: DECIMAL_SEPARATOR should be set by env, or maybe language
const DECIMAL_SEPARATOR: &str = ".";
Expand Down
1 change: 1 addition & 0 deletions src/chemistry.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ use regex::Regex;
use crate::xpath_functions::IsBracketed;
use phf::{phf_map, phf_set};
use std::convert::TryInto;
use log::{error};
use std::collections::HashSet;
use std::cmp::Ordering;
use crate::errors::*;
Expand Down
1 change: 0 additions & 1 deletion src/definitions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
//! See the struct [`Definitions`] for the variables that are read in.
#![allow(clippy::needless_return)]

extern crate yaml_rust;
use yaml_rust::yaml::Hash;
use yaml_rust::Yaml;
use crate::errors::*;
Expand Down
2 changes: 2 additions & 0 deletions src/infer_intent.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ use crate::pretty_print::mml_to_string;
use crate::xpath_functions::is_leaf;
use regex::Regex;
use phf::phf_set;
use log::{debug, error, warn};

const IMPLICIT_FUNCTION_NAME: &str = "apply-function";

Expand Down Expand Up @@ -619,6 +620,7 @@ fn find_arg<'r, 'c, 's:'c, 'm:'c>(
mod tests {
#[allow(unused_imports)]
use crate::init_logger;
use log::debug;
use sxd_document::parser;


Expand Down
4 changes: 1 addition & 3 deletions src/interface.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ use sxd_document::Package;

use crate::canonicalize::{as_element, name};
use crate::shim_filesystem::{find_all_dirs_shim, find_files_in_dir_that_ends_with_shim};
use log::{debug, error};

use crate::navigate::*;
use crate::pretty_print::mml_to_string;
Expand All @@ -30,9 +31,6 @@ fn enable_logs() {
INIT.call_once(||{
#[cfg(target_os = "android")]
{
extern crate log;
extern crate android_logger;

use log::*;
use android_logger::*;

Expand Down
10 changes: 0 additions & 10 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,6 @@ pub mod errors {
pub use anyhow::{anyhow, bail, Error, Result, Context};
}

#[macro_use]
extern crate bitflags;

#[macro_use]
extern crate log;

#[macro_use]
extern crate cfg_if;


pub mod interface;
#[cfg(feature = "include-zip")]
pub use shim_filesystem::ZIPPED_RULE_FILES;
Expand Down
2 changes: 1 addition & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#![allow(clippy::needless_return)]

use libmathcat::interface::*;
use log::*;
use log::{debug, info};
use std::time::Instant;


Expand Down
1 change: 1 addition & 0 deletions src/navigate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ use crate::interface::copy_mathml;
use std::time::Instant;
use crate::errors::*;
use phf::phf_set;
use log::{debug};

pub const ID_OFFSET: &str = "data-id-offset";

Expand Down
2 changes: 1 addition & 1 deletion src/prefs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@
use yaml_rust::{Yaml, YamlLoader};
use crate::pretty_print::yaml_to_string;
use crate::tts::TTS;
extern crate dirs;
use std::cell::RefCell;
use std::rc::Rc;
use log::{debug, error, warn};
use std::path::{Path, PathBuf};
use std::sync::LazyLock;
use crate::speech::{as_str_checked, RulesFor, FileAndTime};
Expand Down
1 change: 0 additions & 1 deletion src/pretty_print.rs
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,6 @@ fn is_complex(v: &Yaml) -> bool {

use std::error::Error;
use std::fmt::{self, Display};
extern crate yaml_rust;
use yaml_rust::{Yaml, yaml::Hash};

//use crate::yaml::{Hash, Yaml};
Expand Down
2 changes: 2 additions & 0 deletions src/shim_filesystem.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

use std::path::{Path, PathBuf};
use crate::errors::*;
use cfg_if::cfg_if;
use log::{debug};


// The zipped files are needed by WASM builds.
Expand Down
1 change: 1 addition & 0 deletions src/speech.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ use std::rc::Rc;
use crate::shim_filesystem::{read_to_string_shim, canonicalize_shim};
use crate::canonicalize::{as_element, create_mathml_element, set_mathml_name, name, MATHML_FROM_NAME_ATTR};
use regex::Regex;
use log::{debug, error, info};


pub const NAV_NODE_SPEECH_NOT_FOUND: &str = "NAV_NODE_NOT_FOUND";
Expand Down
1 change: 1 addition & 0 deletions src/xpath_functions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ use crate::definitions::{Definitions, SPEECH_DEFINITIONS, BRAILLE_DEFINITIONS};
use regex::Regex;
use crate::pretty_print::mml_to_string;
use std::cell::{Ref, RefCell};
use log::{debug, error, warn};
use std::sync::LazyLock;
use std::thread::LocalKey;
use phf::phf_set;
Expand Down
Loading