create text_processing crate

master
Manos Pitsidianakis 2019-07-22 15:14:39 +03:00
parent ff37e97cba
commit d84ceca88e
Signed by: Manos Pitsidianakis
GPG Key ID: 73627C2F690DF710
12 changed files with 24 additions and 10 deletions

View File

@ -20,4 +20,4 @@ lto = true
debug = false
[workspace]
members = ["melib", "ui", "debug_printer", "testing"]
members = ["melib", "ui", "debug_printer", "testing", "text_processing"]

View File

@ -23,4 +23,4 @@ serde = "1.0.71"
serde_derive = "1.0.71"
bincode = "1.0.1"
uuid = { version = "0.6", features = ["serde", "v4"] }
unicode-segmentation = "1.2.1" # >:c
text_processing = { path = "../text_processing", version = "*" }

View File

@ -1,5 +1,5 @@
use super::*;
use crate::grapheme_clusters::Graphemes;
use text_processing::grapheme_clusters::Graphemes;
pub fn encode_header(value: &str) -> String {
let mut ret = String::with_capacity(value.len());

View File

@ -84,6 +84,8 @@ pub mod dbg {
}
}
extern crate text_processing;
pub mod addressbook;
pub mod async_workers;
pub mod backends;
@ -91,14 +93,10 @@ mod collection;
pub mod conf;
pub mod email;
pub mod error;
pub mod grapheme_clusters;
pub mod mailbox;
pub mod thread;
pub use crate::email::*;
pub use crate::thread::*;
mod wcwidth;
pub use self::grapheme_clusters::*;
pub use self::wcwidth::*;
mod structs;
pub use self::structs::*;

View File

@ -34,8 +34,8 @@
use crate::email::parser::BytesExt;
use crate::email::*;
use crate::grapheme_clusters::*;
use crate::structs::StackVec;
use text_processing::grapheme_clusters::*;
use uuid::Uuid;
use fnv::{FnvHashMap, FnvHashSet};

View File

@ -0,0 +1,9 @@
[package]
name = "text_processing"
version = "0.0.1" #:version
authors = ["Manos Pitsidianakis <el13635@mail.ntua.gr>"]
workspace = ".."
edition = "2018"
[dependencies]
unicode-segmentation = "1.2.1"

View File

@ -8,7 +8,7 @@
*/
use super::*;
use crate::wcwidth::{wcwidth, CodePointsIter};
extern crate unicode_segmentation;
use self::unicode_segmentation::UnicodeSegmentation;

View File

@ -0,0 +1,4 @@
pub mod grapheme_clusters;
pub mod wcwidth;
pub use grapheme_clusters::*;
pub use wcwidth::*;

View File

@ -24,3 +24,4 @@ termion = "1.5.1"
bincode = "1.0.1"
uuid = { version = "0.6", features = ["serde", "v4"] }
unicode-segmentation = "1.2.1" # >:c
text_processing = { path = "../text_processing", version = "*" }

View File

@ -27,6 +27,7 @@
extern crate melib;
extern crate mime_apps;
extern crate notify_rust;
extern crate text_processing;
#[macro_use]
extern crate serde_derive;
#[macro_use]
@ -45,6 +46,7 @@ extern crate serde_json;
use melib::*;
use std::collections::VecDeque;
use text_processing::*;
#[macro_use]
mod types;

View File

@ -1,4 +1,4 @@
use melib::Graphemes;
use text_processing::Graphemes;
#[derive(Debug, Clone, Default, PartialEq)]
pub struct UText {