Update dependencies, remove unneeded keywords and declarations
Also declaration of a lazy_static element was moved in a better spot
This commit is contained in:
parent
042fd066f0
commit
de45ffc15c
10
Cargo.toml
10
Cargo.toml
@ -9,11 +9,15 @@ edition = "2018"
|
|||||||
[dependencies]
|
[dependencies]
|
||||||
# Logger
|
# Logger
|
||||||
log = "0.4"
|
log = "0.4"
|
||||||
simplelog = "0.7"
|
simplelog = "0.8"
|
||||||
# Struct serializing and deserializing
|
# Struct serializing and deserializing
|
||||||
serde = {version = "1.0", features = ["derive"]}
|
serde = {version = "1.0", features = ["derive"]}
|
||||||
serde_yaml = "0.7"
|
serde_yaml = "0.8"
|
||||||
serde_json = "1.0"
|
serde_json = "1.0"
|
||||||
# Regex support
|
# Regex support
|
||||||
regex = "1.3"
|
regex = "1.3"
|
||||||
lazy_static = "1.4.0"
|
lazy_static = "1.4"
|
||||||
|
|
||||||
|
# [dev-dependencies]
|
||||||
|
# Pretty output
|
||||||
|
prettydiff = "0.3"
|
||||||
|
@ -12,12 +12,8 @@
|
|||||||
//! [original software](https://github.com/ceronyon/LangEvolve) which applies
|
//! [original software](https://github.com/ceronyon/LangEvolve) which applies
|
||||||
//! user-defined sound changes to words and texts based on regex expressions.
|
//! user-defined sound changes to words and texts based on regex expressions.
|
||||||
|
|
||||||
#[macro_use]
|
|
||||||
extern crate lazy_static;
|
|
||||||
|
|
||||||
use std::fs::File;
|
use std::fs::File;
|
||||||
extern crate log;
|
|
||||||
extern crate simplelog;
|
|
||||||
use log::{info, warn};
|
use log::{info, warn};
|
||||||
use simplelog::*;
|
use simplelog::*;
|
||||||
|
|
||||||
|
@ -1,13 +1,11 @@
|
|||||||
extern crate serde;
|
|
||||||
extern crate serde_json;
|
|
||||||
extern crate serde_yaml;
|
|
||||||
use serde::{Deserialize, Serialize};
|
use serde::{Deserialize, Serialize};
|
||||||
|
|
||||||
extern crate log;
|
|
||||||
use log::{debug, error, info};
|
use log::{debug, error, info};
|
||||||
|
|
||||||
use crate::utils::{self, SettingsType};
|
use crate::utils::{self, SettingsType};
|
||||||
|
|
||||||
|
use prettydiff::diff_words;
|
||||||
|
|
||||||
mod rule;
|
mod rule;
|
||||||
use rule::Rule;
|
use rule::Rule;
|
||||||
|
|
||||||
|
@ -1,13 +1,16 @@
|
|||||||
use std::collections::HashMap;
|
use std::collections::HashMap;
|
||||||
|
|
||||||
extern crate serde;
|
|
||||||
extern crate serde_json;
|
|
||||||
extern crate serde_yaml;
|
|
||||||
use serde::{Deserialize, Serialize};
|
use serde::{Deserialize, Serialize};
|
||||||
|
|
||||||
|
use lazy_static::lazy_static;
|
||||||
|
|
||||||
mod regex_wrapper;
|
mod regex_wrapper;
|
||||||
use regex_wrapper::Regex;
|
use regex_wrapper::Regex;
|
||||||
|
|
||||||
|
lazy_static! {
|
||||||
|
static ref RE : Regex = Regex::new("%([A-Z])");
|
||||||
|
}
|
||||||
|
|
||||||
/// Representation of a rule in LangEvolveRs
|
/// Representation of a rule in LangEvolveRs
|
||||||
#[derive(Debug, Serialize, Deserialize, Clone)]
|
#[derive(Debug, Serialize, Deserialize, Clone)]
|
||||||
pub struct Rule {
|
pub struct Rule {
|
||||||
@ -34,9 +37,6 @@ impl Rule {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn detect_categories(&self) -> (u8, u8) {
|
fn detect_categories(&self) -> (u8, u8) {
|
||||||
lazy_static! {
|
|
||||||
static ref RE : Regex = Regex::new("%([A-Z])");
|
|
||||||
}
|
|
||||||
let captures_from = match RE.captures(self.from.as_str()) {
|
let captures_from = match RE.captures(self.from.as_str()) {
|
||||||
None => 0 as u8,
|
None => 0 as u8,
|
||||||
Some(c) => c.len() as u8,
|
Some(c) => c.len() as u8,
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
extern crate log;
|
|
||||||
use log::{info, error};
|
use log::{info, error};
|
||||||
|
|
||||||
use std::fs::File;
|
use std::fs::File;
|
||||||
|
Loading…
Reference in New Issue
Block a user