+4634 -3380 +/-136 browse
1 | diff --git a/build.rs b/build.rs |
2 | index 7946d81..2268918 100644 |
3 | --- a/build.rs |
4 | +++ b/build.rs |
5 | @@ -37,14 +37,9 @@ fn main() { |
6 | ]); |
7 | #[cfg(feature = "cli-docs")] |
8 | { |
9 | - use flate2::Compression; |
10 | - use flate2::GzBuilder; |
11 | + use flate2::{Compression, GzBuilder}; |
12 | const MANDOC_OPTS: &[&str] = &["-T", "utf8", "-I", "os=Generated by mandoc(1)"]; |
13 | - use std::env; |
14 | - use std::fs::File; |
15 | - use std::io::prelude::*; |
16 | - use std::path::Path; |
17 | - use std::process::Command; |
18 | + use std::{env, fs::File, io::prelude::*, path::Path, process::Command}; |
19 | |
20 | let out_dir = env::var("OUT_DIR").unwrap(); |
21 | let mut out_dir_path = Path::new(&out_dir).to_path_buf(); |
22 | @@ -57,7 +52,8 @@ fn main() { |
23 | .output() |
24 | .or_else(|_| Command::new("man").arg("-l").arg(filepath).output()) |
25 | .expect( |
26 | - "could not execute `mandoc` or `man`. If the binaries are not available in the PATH, disable `cli-docs` feature to be able to continue compilation.", |
27 | + "could not execute `mandoc` or `man`. If the binaries are not available in \ |
28 | + the PATH, disable `cli-docs` feature to be able to continue compilation.", |
29 | ); |
30 | |
31 | let file = File::create(&out_dir_path).unwrap_or_else(|err| { |
32 | diff --git a/config_macros.rs b/config_macros.rs |
33 | index 1c8e40c..ce0ea75 100644 |
34 | --- a/config_macros.rs |
35 | +++ b/config_macros.rs |
36 | @@ -19,9 +19,11 @@ |
37 | * along with meli. If not, see <http://www.gnu.org/licenses/>. |
38 | */ |
39 | |
40 | - use std::fs::File; |
41 | - use std::io::prelude::*; |
42 | - use std::process::{Command, Stdio}; |
43 | + use std::{ |
44 | + fs::File, |
45 | + io::prelude::*, |
46 | + process::{Command, Stdio}, |
47 | + }; |
48 | |
49 | use quote::{format_ident, quote}; |
50 | |
51 | @@ -29,7 +31,8 @@ use quote::{format_ident, quote}; |
52 | pub fn override_derive(filenames: &[(&str, &str)]) { |
53 | let mut output_file = |
54 | File::create("src/conf/overrides.rs").expect("Unable to open output file"); |
55 | - let mut output_string = r##"/* |
56 | + let mut output_string = r##"// @generated |
57 | + /* |
58 | * meli - conf/overrides.rs |
59 | * |
60 | * Copyright 2020 Manos Pitsidianakis |
61 | @@ -60,7 +63,7 @@ use super::*; |
62 | |
63 | 'file_loop: for (filename, ident) in filenames { |
64 | println!("cargo:rerun-if-changed={}", filename); |
65 | - let mut file = File::open(&filename) |
66 | + let mut file = File::open(filename) |
67 | .unwrap_or_else(|err| panic!("Unable to open file `{}` {}", filename, err)); |
68 | |
69 | let mut src = String::new(); |
70 | diff --git a/melib/build.rs b/melib/build.rs |
71 | index b6ddfcd..659e6eb 100644 |
72 | --- a/melib/build.rs |
73 | +++ b/melib/build.rs |
74 | @@ -29,11 +29,12 @@ fn main() -> Result<(), std::io::Error> { |
75 | println!("cargo:rerun-if-changed=build.rs"); |
76 | println!("cargo:rerun-if-changed={}", MOD_PATH); |
77 | /* Line break tables */ |
78 | - use std::fs::File; |
79 | - use std::io::prelude::*; |
80 | - use std::io::BufReader; |
81 | - use std::path::Path; |
82 | - use std::process::{Command, Stdio}; |
83 | + use std::{ |
84 | + fs::File, |
85 | + io::{prelude::*, BufReader}, |
86 | + path::Path, |
87 | + process::{Command, Stdio}, |
88 | + }; |
89 | const LINE_BREAK_TABLE_URL: &str = |
90 | "http://www.unicode.org/Public/UCD/latest/ucd/LineBreak.txt"; |
91 | /* Grapheme width tables */ |
92 | @@ -52,7 +53,7 @@ fn main() -> Result<(), std::io::Error> { |
93 | std::process::exit(0); |
94 | } |
95 | let mut child = Command::new("curl") |
96 | - .args(&["-o", "-", LINE_BREAK_TABLE_URL]) |
97 | + .args(["-o", "-", LINE_BREAK_TABLE_URL]) |
98 | .stdout(Stdio::piped()) |
99 | .stdin(Stdio::null()) |
100 | .stderr(Stdio::inherit()) |
101 | @@ -69,7 +70,8 @@ fn main() -> Result<(), std::io::Error> { |
102 | let tokens: &str = line.split_whitespace().next().unwrap(); |
103 | |
104 | let semicolon_idx: usize = tokens.chars().position(|c| c == ';').unwrap(); |
105 | - /* LineBreak.txt list is ascii encoded so we can assume each char takes one byte: */ |
106 | + /* LineBreak.txt list is ascii encoded so we can assume each char takes one |
107 | + * byte: */ |
108 | let chars_str: &str = &tokens[..semicolon_idx]; |
109 | |
110 | let mut codepoint_iter = chars_str.split(".."); |
111 | @@ -87,21 +89,21 @@ fn main() -> Result<(), std::io::Error> { |
112 | child.wait()?; |
113 | |
114 | let child = Command::new("curl") |
115 | - .args(&["-o", "-", UNICODE_DATA_URL]) |
116 | + .args(["-o", "-", UNICODE_DATA_URL]) |
117 | .stdout(Stdio::piped()) |
118 | .output()?; |
119 | |
120 | let unicode_data = String::from_utf8_lossy(&child.stdout); |
121 | |
122 | let child = Command::new("curl") |
123 | - .args(&["-o", "-", EAW_URL]) |
124 | + .args(["-o", "-", EAW_URL]) |
125 | .stdout(Stdio::piped()) |
126 | .output()?; |
127 | |
128 | let eaw_data = String::from_utf8_lossy(&child.stdout); |
129 | |
130 | let child = Command::new("curl") |
131 | - .args(&["-o", "-", EMOJI_DATA_URL]) |
132 | + .args(["-o", "-", EMOJI_DATA_URL]) |
133 | .stdout(Stdio::piped()) |
134 | .output()?; |
135 | |
136 | @@ -198,13 +200,13 @@ fn main() -> Result<(), std::io::Error> { |
137 | } |
138 | // Apply the following special cases: |
139 | // - The unassigned code points in the following blocks default to "W": |
140 | - // CJK Unified Ideographs Extension A: U+3400..U+4DBF |
141 | - // CJK Unified Ideographs: U+4E00..U+9FFF |
142 | - // CJK Compatibility Ideographs: U+F900..U+FAFF |
143 | - // - All undesignated code points in Planes 2 and 3, whether inside or |
144 | - // outside of allocated blocks, default to "W": |
145 | - // Plane 2: U+20000..U+2FFFD |
146 | - // Plane 3: U+30000..U+3FFFD |
147 | + // - CJK Unified Ideographs Extension A: U+3400..U+4DBF |
148 | + // - CJK Unified Ideographs: U+4E00..U+9FFF |
149 | + // - CJK Compatibility Ideographs: U+F900..U+FAFF |
150 | + // - All undesignated code points in Planes 2 and 3, whether inside or outside |
151 | + // of allocated blocks, default to "W": |
152 | + // - Plane 2: U+20000..U+2FFFD |
153 | + // - Plane 3: U+30000..U+3FFFD |
154 | const WIDE_RANGES: [(usize, usize); 5] = [ |
155 | (0x3400, 0x4DBF), |
156 | (0x4E00, 0x9FFF), |
157 | @@ -245,12 +247,12 @@ fn main() -> Result<(), std::io::Error> { |
158 | } |
159 | |
160 | use std::str::FromStr; |
161 | - let mut v = comment.trim().split_whitespace().next().unwrap(); |
162 | + let mut v = comment.split_whitespace().next().unwrap(); |
163 | if v.starts_with('E') { |
164 | v = &v[1..]; |
165 | } |
166 | if v.as_bytes() |
167 | - .get(0) |
168 | + .first() |
169 | .map(|c| !c.is_ascii_digit()) |
170 | .unwrap_or(true) |
171 | { |
172 | @@ -325,7 +327,7 @@ fn main() -> Result<(), std::io::Error> { |
173 | } |
174 | } |
175 | |
176 | - let mut file = File::create(&mod_path)?; |
177 | + let mut file = File::create(mod_path)?; |
178 | file.write_all( |
179 | br#"/* |
180 | * meli - text_processing crate. |
181 | diff --git a/melib/src/addressbook.rs b/melib/src/addressbook.rs |
182 | index 42867d0..64374e6 100644 |
183 | --- a/melib/src/addressbook.rs |
184 | +++ b/melib/src/addressbook.rs |
185 | @@ -24,12 +24,14 @@ pub mod vcard; |
186 | |
187 | pub mod mutt; |
188 | |
189 | - use crate::datetime::{self, UnixTimestamp}; |
190 | - use crate::parsec::Parser; |
191 | - use std::collections::HashMap; |
192 | + use std::{collections::HashMap, ops::Deref}; |
193 | + |
194 | use uuid::Uuid; |
195 | |
196 | - use std::ops::Deref; |
197 | + use crate::{ |
198 | + datetime::{self, UnixTimestamp}, |
199 | + parsec::Parser, |
200 | + }; |
201 | |
202 | #[derive(Hash, Debug, PartialEq, Eq, Clone, Copy, Deserialize, Serialize)] |
203 | #[serde(from = "String")] |
204 | @@ -85,7 +87,8 @@ pub struct Card { |
205 | last_edited: UnixTimestamp, |
206 | extra_properties: HashMap<String, String>, |
207 | |
208 | - /// If true, we can't make any changes because we do not manage this resource. |
209 | + /// If true, we can't make any changes because we do not manage this |
210 | + /// resource. |
211 | external_resource: bool, |
212 | } |
213 | |
214 | diff --git a/melib/src/addressbook/mutt.rs b/melib/src/addressbook/mutt.rs |
215 | index 805c354..59cb4ff 100644 |
216 | --- a/melib/src/addressbook/mutt.rs |
217 | +++ b/melib/src/addressbook/mutt.rs |
218 | @@ -20,11 +20,11 @@ |
219 | */ |
220 | |
221 | //! # Mutt contact formats |
222 | - //! |
223 | + |
224 | + use std::collections::VecDeque; |
225 | |
226 | use super::*; |
227 | use crate::parsec::{is_not, map_res, match_literal_anycase, prefix, Parser}; |
228 | - use std::collections::VecDeque; |
229 | |
230 | //alias <nickname> [ <long name> ] <address> |
231 | // From mutt doc: |
232 | diff --git a/melib/src/addressbook/vcard.rs b/melib/src/addressbook/vcard.rs |
233 | index 2556b6d..90c19a2 100644 |
234 | --- a/melib/src/addressbook/vcard.rs |
235 | +++ b/melib/src/addressbook/vcard.rs |
236 | @@ -27,11 +27,13 @@ |
237 | //! - Version 4 [RFC 6350: vCard Format Specification](https://datatracker.ietf.org/doc/rfc6350/) |
238 | //! - Parameter escaping [RFC 6868 Parameter Value Encoding in iCalendar and vCard](https://datatracker.ietf.org/doc/rfc6868/) |
239 | |
240 | + use std::{collections::HashMap, convert::TryInto}; |
241 | + |
242 | use super::*; |
243 | - use crate::error::{Error, Result}; |
244 | - use crate::parsec::{match_literal_anycase, one_or_more, peek, prefix, take_until, Parser}; |
245 | - use std::collections::HashMap; |
246 | - use std::convert::TryInto; |
247 | + use crate::{ |
248 | + error::{Error, Result}, |
249 | + parsec::{match_literal_anycase, one_or_more, peek, prefix, take_until, Parser}, |
250 | + }; |
251 | |
252 | /* Supported vcard versions */ |
253 | pub trait VCardVersion: core::fmt::Debug {} |
254 | @@ -86,7 +88,11 @@ impl CardDeserializer { |
255 | input = if (!input.starts_with(HEADER_CRLF) || !input.ends_with(FOOTER_CRLF)) |
256 | && (!input.starts_with(HEADER_LF) || !input.ends_with(FOOTER_LF)) |
257 | { |
258 | - return Err(Error::new(format!("Error while parsing vcard: input does not start or end with correct header and footer. input is:\n{:?}", input))); |
259 | + return Err(Error::new(format!( |
260 | + "Error while parsing vcard: input does not start or end with correct header and \ |
261 | + footer. input is:\n{:?}", |
262 | + input |
263 | + ))); |
264 | } else if input.starts_with(HEADER_CRLF) { |
265 | &input[HEADER_CRLF.len()..input.len() - FOOTER_CRLF.len()] |
266 | } else { |
267 | diff --git a/melib/src/backends.rs b/melib/src/backends.rs |
268 | index be7e8c8..dde57ed 100644 |
269 | --- a/melib/src/backends.rs |
270 | +++ b/melib/src/backends.rs |
271 | @@ -36,35 +36,41 @@ pub mod jmap; |
272 | pub mod maildir; |
273 | #[cfg(feature = "mbox_backend")] |
274 | pub mod mbox; |
275 | + use std::{ |
276 | + any::Any, |
277 | + borrow::Cow, |
278 | + collections::{BTreeSet, HashMap}, |
279 | + fmt, |
280 | + fmt::Debug, |
281 | + future::Future, |
282 | + ops::Deref, |
283 | + pin::Pin, |
284 | + sync::{Arc, RwLock}, |
285 | + }; |
286 | + |
287 | + use futures::stream::Stream; |
288 | + |
289 | #[cfg(feature = "imap_backend")] |
290 | pub use self::imap::ImapType; |
291 | - #[cfg(feature = "imap_backend")] |
292 | - pub use self::nntp::NntpType; |
293 | - use crate::conf::AccountSettings; |
294 | - use crate::error::{Error, ErrorKind, Result}; |
295 | - |
296 | #[cfg(feature = "maildir_backend")] |
297 | use self::maildir::MaildirType; |
298 | #[cfg(feature = "mbox_backend")] |
299 | use self::mbox::MboxType; |
300 | + #[cfg(feature = "imap_backend")] |
301 | + pub use self::nntp::NntpType; |
302 | use super::email::{Envelope, EnvelopeHash, Flag}; |
303 | - use futures::stream::Stream; |
304 | - use std::any::Any; |
305 | - use std::borrow::Cow; |
306 | - use std::collections::BTreeSet; |
307 | - use std::collections::HashMap; |
308 | - use std::fmt; |
309 | - use std::fmt::Debug; |
310 | - use std::future::Future; |
311 | - use std::ops::Deref; |
312 | - use std::pin::Pin; |
313 | - use std::sync::{Arc, RwLock}; |
314 | + use crate::{ |
315 | + conf::AccountSettings, |
316 | + error::{Error, ErrorKind, Result}, |
317 | + }; |
318 | |
319 | #[macro_export] |
320 | macro_rules! get_path_hash { |
321 | ($path:expr) => {{ |
322 | - use std::collections::hash_map::DefaultHasher; |
323 | - use std::hash::{Hash, Hasher}; |
324 | + use std::{ |
325 | + collections::hash_map::DefaultHasher, |
326 | + hash::{Hash, Hasher}, |
327 | + }; |
328 | let mut hasher = DefaultHasher::new(); |
329 | $path.hash(&mut hasher); |
330 | hasher.finish() |
331 | @@ -97,10 +103,13 @@ impl Default for Backends { |
332 | } |
333 | |
334 | #[cfg(feature = "notmuch_backend")] |
335 | - pub const NOTMUCH_ERROR_MSG: &str = |
336 | - "libnotmuch5 was not found in your system. Make sure it is installed and in the library paths. For a custom file path, use `library_file_path` setting in your notmuch account.\n"; |
337 | + pub const NOTMUCH_ERROR_MSG: &str = "libnotmuch5 was not found in your system. Make sure it is \ |
338 | + installed and in the library paths. For a custom file path, \ |
339 | + use `library_file_path` setting in your notmuch account.\n"; |
340 | #[cfg(not(feature = "notmuch_backend"))] |
341 | - pub const NOTMUCH_ERROR_MSG: &str = "this version of meli is not compiled with notmuch support. Use an appropriate version and make sure libnotmuch5 is installed and in the library paths.\n"; |
342 | + pub const NOTMUCH_ERROR_MSG: &str = "this version of meli is not compiled with notmuch support. \ |
343 | + Use an appropriate version and make sure libnotmuch5 is \ |
344 | + installed and in the library paths.\n"; |
345 | |
346 | #[cfg(not(feature = "notmuch_backend"))] |
347 | pub const NOTMUCH_ERROR_DETAILS: &str = ""; |
348 | @@ -432,13 +441,14 @@ pub trait MailBackend: ::std::fmt::Debug + Send + Sync { |
349 | } |
350 | } |
351 | |
352 | - /// A `BackendOp` manages common operations for the various mail backends. They only live for the |
353 | - /// duration of the operation. They are generated by the `operation` method of `Mailbackend` trait. |
354 | + /// A `BackendOp` manages common operations for the various mail backends. They |
355 | + /// only live for the duration of the operation. They are generated by the |
356 | + /// `operation` method of `Mailbackend` trait. |
357 | /// |
358 | /// # Motivation |
359 | /// |
360 | - /// We need a way to do various operations on individual mails regardless of what backend they come |
361 | - /// from (eg local or imap). |
362 | + /// We need a way to do various operations on individual mails regardless of |
363 | + /// what backend they come from (eg local or imap). |
364 | /// |
365 | /// # Creation |
366 | /// ```ignore |
367 | @@ -474,8 +484,8 @@ pub trait BackendOp: ::std::fmt::Debug + ::std::marker::Send { |
368 | |
369 | /// Wrapper for BackendOps that are to be set read-only. |
370 | /// |
371 | - /// Warning: Backend implementations may still cause side-effects (for example IMAP can set the |
372 | - /// Seen flag when fetching an envelope) |
373 | + /// Warning: Backend implementations may still cause side-effects (for example |
374 | + /// IMAP can set the Seen flag when fetching an envelope) |
375 | #[derive(Debug)] |
376 | pub struct ReadOnlyOp { |
377 | op: Box<dyn BackendOp>, |
378 | diff --git a/melib/src/backends/imap.rs b/melib/src/backends/imap.rs |
379 | index b987963..b356f4b 100644 |
380 | --- a/melib/src/backends/imap.rs |
381 | +++ b/melib/src/backends/imap.rs |
382 | @@ -36,26 +36,29 @@ use cache::{ImapCacheReset, ModSequence}; |
383 | pub mod managesieve; |
384 | mod untagged; |
385 | |
386 | - use crate::backends::{ |
387 | - RefreshEventKind::{self, *}, |
388 | - *, |
389 | + use std::{ |
390 | + collections::{hash_map::DefaultHasher, BTreeSet, HashMap, HashSet}, |
391 | + convert::TryFrom, |
392 | + hash::Hasher, |
393 | + pin::Pin, |
394 | + str::FromStr, |
395 | + sync::{Arc, Mutex}, |
396 | + time::{Duration, SystemTime}, |
397 | }; |
398 | |
399 | - use crate::collection::Collection; |
400 | - use crate::conf::AccountSettings; |
401 | - use crate::connections::timeout; |
402 | - use crate::email::{parser::BytesExt, *}; |
403 | - use crate::error::{Error, Result, ResultIntoError}; |
404 | - use futures::lock::Mutex as FutureMutex; |
405 | - use futures::stream::Stream; |
406 | - use std::collections::hash_map::DefaultHasher; |
407 | - use std::collections::{BTreeSet, HashMap, HashSet}; |
408 | - use std::convert::TryFrom; |
409 | - use std::hash::Hasher; |
410 | - use std::pin::Pin; |
411 | - use std::str::FromStr; |
412 | - use std::sync::{Arc, Mutex}; |
413 | - use std::time::{Duration, SystemTime}; |
414 | + use futures::{lock::Mutex as FutureMutex, stream::Stream}; |
415 | + |
416 | + use crate::{ |
417 | + backends::{ |
418 | + RefreshEventKind::{self, *}, |
419 | + *, |
420 | + }, |
421 | + collection::Collection, |
422 | + conf::AccountSettings, |
423 | + connections::timeout, |
424 | + email::{parser::BytesExt, *}, |
425 | + error::{Error, Result, ResultIntoError}, |
426 | + }; |
427 | |
428 | pub type ImapNum = usize; |
429 | pub type UID = ImapNum; |
430 | @@ -340,7 +343,8 @@ impl MailBackend for ImapType { |
431 | cache_handle, |
432 | }; |
433 | |
434 | - /* do this in a closure to prevent recursion limit error in async_stream macro */ |
435 | + /* do this in a closure to prevent recursion limit error in async_stream |
436 | + * macro */ |
437 | let prepare_cl = |f: &ImapMailbox| { |
438 | f.set_warm(true); |
439 | if let Ok(mut exists) = f.exists.lock() { |
440 | @@ -526,15 +530,15 @@ impl MailBackend for ImapType { |
441 | } |
442 | |
443 | fn operation(&self, hash: EnvelopeHash) -> Result<Box<dyn BackendOp>> { |
444 | - let (uid, mailbox_hash) = if let Some(v) = |
445 | - self.uid_store.hash_index.lock().unwrap().get(&hash) |
446 | - { |
447 | - *v |
448 | - } else { |
449 | - return Err(Error::new( |
450 | - "Message not found in local cache, it might have been deleted before you requested it." |
451 | + let (uid, mailbox_hash) = |
452 | + if let Some(v) = self.uid_store.hash_index.lock().unwrap().get(&hash) { |
453 | + *v |
454 | + } else { |
455 | + return Err(Error::new( |
456 | + "Message not found in local cache, it might have been deleted before you \ |
457 | + requested it.", |
458 | )); |
459 | - }; |
460 | + }; |
461 | Ok(Box::new(ImapOp::new( |
462 | uid, |
463 | mailbox_hash, |
464 | @@ -749,8 +753,20 @@ impl MailBackend for ImapType { |
465 | cmd.push_str("\\Draft "); |
466 | } |
467 | Ok(_) => { |
468 | - crate::log(format!("Application error: more than one flag bit set in set_flags: {:?}", flags), crate::ERROR); |
469 | - return Err(Error::new(format!("Application error: more than one flag bit set in set_flags: {:?}", flags)).set_kind(crate::ErrorKind::Bug)); |
470 | + crate::log( |
471 | + format!( |
472 | + "Application error: more than one flag bit set in \ |
473 | + set_flags: {:?}", |
474 | + flags |
475 | + ), |
476 | + crate::ERROR, |
477 | + ); |
478 | + return Err(Error::new(format!( |
479 | + "Application error: more than one flag bit set in set_flags: \ |
480 | + {:?}", |
481 | + flags |
482 | + )) |
483 | + .set_kind(crate::ErrorKind::Bug)); |
484 | } |
485 | Err(tag) => { |
486 | let hash = TagHash::from_bytes(tag.as_bytes()); |
487 | @@ -812,13 +828,17 @@ impl MailBackend for ImapType { |
488 | Ok(_) => { |
489 | crate::log( |
490 | format!( |
491 | - "Application error: more than one flag bit set in set_flags: {:?}", flags |
492 | - ), |
493 | + "Application error: more than one flag bit set in \ |
494 | + set_flags: {:?}", |
495 | + flags |
496 | + ), |
497 | crate::ERROR, |
498 | ); |
499 | return Err(Error::new(format!( |
500 | - "Application error: more than one flag bit set in set_flags: {:?}", flags |
501 | - ))); |
502 | + "Application error: more than one flag bit set in set_flags: \ |
503 | + {:?}", |
504 | + flags |
505 | + ))); |
506 | } |
507 | Err(tag) => { |
508 | cmd.push_str(tag); |
509 | @@ -892,16 +912,17 @@ impl MailBackend for ImapType { |
510 | Ok(Box::pin(async move { |
511 | /* Must transform path to something the IMAP server will accept |
512 | * |
513 | - * Each root mailbox has a hierarchy delimeter reported by the LIST entry. All paths |
514 | - * must use this delimeter to indicate children of this mailbox. |
515 | + * Each root mailbox has a hierarchy delimeter reported by the LIST entry. |
516 | + * All paths must use this delimeter to indicate children of this |
517 | + * mailbox. |
518 | * |
519 | - * A new root mailbox should have the default delimeter, which can be found out by issuing |
520 | - * an empty LIST command as described in RFC3501: |
521 | + * A new root mailbox should have the default delimeter, which can be found |
522 | + * out by issuing an empty LIST command as described in RFC3501: |
523 | * C: A101 LIST "" "" |
524 | * S: * LIST (\Noselect) "/" "" |
525 | * |
526 | - * The default delimiter for us is '/' just like UNIX paths. I apologise if this |
527 | - * decision is unpleasant for you. |
528 | + * The default delimiter for us is '/' just like UNIX paths. I apologise if |
529 | + * this decision is unpleasant for you. |
530 | */ |
531 | |
532 | { |
533 | @@ -924,8 +945,8 @@ impl MailBackend for ImapType { |
534 | } |
535 | } |
536 | |
537 | - /* FIXME Do not try to CREATE a sub-mailbox in a mailbox that has the \Noinferiors |
538 | - * flag set. */ |
539 | + /* FIXME Do not try to CREATE a sub-mailbox in a mailbox |
540 | + * that has the \Noinferiors flag set. */ |
541 | } |
542 | |
543 | let mut response = Vec::with_capacity(8 * 1024); |
544 | @@ -950,7 +971,17 @@ impl MailBackend for ImapType { |
545 | ret?; |
546 | let new_hash = MailboxHash::from_bytes(path.as_str().as_bytes()); |
547 | uid_store.mailboxes.lock().await.clear(); |
548 | - Ok((new_hash, new_mailbox_fut?.await.map_err(|err| Error::new(format!("Mailbox create was succesful (returned `{}`) but listing mailboxes afterwards returned `{}`", String::from_utf8_lossy(&response), err)))?)) |
549 | + Ok(( |
550 | + new_hash, |
551 | + new_mailbox_fut?.await.map_err(|err| { |
552 | + Error::new(format!( |
553 | + "Mailbox create was succesful (returned `{}`) but listing mailboxes \ |
554 | + afterwards returned `{}`", |
555 | + String::from_utf8_lossy(&response), |
556 | + err |
557 | + )) |
558 | + })?, |
559 | + )) |
560 | })) |
561 | } |
562 | |
563 | @@ -970,7 +1001,12 @@ impl MailBackend for ImapType { |
564 | imap_path = mailboxes[&mailbox_hash].imap_path().to_string(); |
565 | let permissions = mailboxes[&mailbox_hash].permissions(); |
566 | if !permissions.delete_mailbox { |
567 | - return Err(Error::new(format!("You do not have permission to delete `{}`. Set permissions for this mailbox are {}", mailboxes[&mailbox_hash].name(), permissions))); |
568 | + return Err(Error::new(format!( |
569 | + "You do not have permission to delete `{}`. Set permissions for this \ |
570 | + mailbox are {}", |
571 | + mailboxes[&mailbox_hash].name(), |
572 | + permissions |
573 | + ))); |
574 | } |
575 | } |
576 | let mut response = Vec::with_capacity(8 * 1024); |
577 | @@ -998,7 +1034,15 @@ impl MailBackend for ImapType { |
578 | let ret: Result<()> = ImapResponse::try_from(response.as_slice())?.into(); |
579 | ret?; |
580 | uid_store.mailboxes.lock().await.clear(); |
581 | - new_mailbox_fut?.await.map_err(|err| format!("Mailbox delete was succesful (returned `{}`) but listing mailboxes afterwards returned `{}`", String::from_utf8_lossy(&response), err).into()) |
582 | + new_mailbox_fut?.await.map_err(|err| { |
583 | + format!( |
584 | + "Mailbox delete was succesful (returned `{}`) but listing mailboxes \ |
585 | + afterwards returned `{}`", |
586 | + String::from_utf8_lossy(&response), |
587 | + err |
588 | + ) |
589 | + .into() |
590 | + }) |
591 | })) |
592 | } |
593 | |
594 | @@ -1064,7 +1108,12 @@ impl MailBackend for ImapType { |
595 | let mailboxes = uid_store.mailboxes.lock().await; |
596 | let permissions = mailboxes[&mailbox_hash].permissions(); |
597 | if !permissions.delete_mailbox { |
598 | - return Err(Error::new(format!("You do not have permission to rename mailbox `{}` (rename is equivalent to delete + create). Set permissions for this mailbox are {}", mailboxes[&mailbox_hash].name(), permissions))); |
599 | + return Err(Error::new(format!( |
600 | + "You do not have permission to rename mailbox `{}` (rename is equivalent \ |
601 | + to delete + create). Set permissions for this mailbox are {}", |
602 | + mailboxes[&mailbox_hash].name(), |
603 | + permissions |
604 | + ))); |
605 | } |
606 | if mailboxes[&mailbox_hash].separator != b'/' { |
607 | new_path = new_path.replace( |
608 | @@ -1089,7 +1138,14 @@ impl MailBackend for ImapType { |
609 | let ret: Result<()> = ImapResponse::try_from(response.as_slice())?.into(); |
610 | ret?; |
611 | uid_store.mailboxes.lock().await.clear(); |
612 | - new_mailbox_fut?.await.map_err(|err| format!("Mailbox rename was succesful (returned `{}`) but listing mailboxes afterwards returned `{}`", String::from_utf8_lossy(&response), err))?; |
613 | + new_mailbox_fut?.await.map_err(|err| { |
614 | + format!( |
615 | + "Mailbox rename was succesful (returned `{}`) but listing mailboxes \ |
616 | + afterwards returned `{}`", |
617 | + String::from_utf8_lossy(&response), |
618 | + err |
619 | + ) |
620 | + })?; |
621 | Ok(BackendMailbox::clone( |
622 | &uid_store.mailboxes.lock().await[&new_hash], |
623 | )) |
624 | @@ -1107,7 +1163,12 @@ impl MailBackend for ImapType { |
625 | let mailboxes = uid_store.mailboxes.lock().await; |
626 | let permissions = mailboxes[&mailbox_hash].permissions(); |
627 | if !permissions.change_permissions { |
628 | - return Err(Error::new(format!("You do not have permission to change permissions for mailbox `{}`. Set permissions for this mailbox are {}", mailboxes[&mailbox_hash].name(), permissions))); |
629 | + return Err(Error::new(format!( |
630 | + "You do not have permission to change permissions for mailbox `{}`. Set \ |
631 | + permissions for this mailbox are {}", |
632 | + mailboxes[&mailbox_hash].name(), |
633 | + permissions |
634 | + ))); |
635 | } |
636 | |
637 | Err(Error::new("Unimplemented.")) |
638 | @@ -1262,7 +1323,8 @@ impl ImapType { |
639 | |
640 | if use_oauth2 && !s.extra.contains_key("server_password_command") { |
641 | return Err(Error::new(format!( |
642 | - "({}) `use_oauth2` use requires `server_password_command` set with a command that returns an OAUTH2 token. Consult documentation for guidance.", |
643 | + "({}) `use_oauth2` use requires `server_password_command` set with a command that \ |
644 | + returns an OAUTH2 token. Consult documentation for guidance.", |
645 | s.name, |
646 | ))); |
647 | } |
648 | @@ -1524,14 +1586,16 @@ impl ImapType { |
649 | if !s.extra.contains_key("server_password_command") { |
650 | if use_oauth2 { |
651 | return Err(Error::new(format!( |
652 | - "({}) `use_oauth2` use requires `server_password_command` set with a command that returns an OAUTH2 token. Consult documentation for guidance.", |
653 | + "({}) `use_oauth2` use requires `server_password_command` set with a command \ |
654 | + that returns an OAUTH2 token. Consult documentation for guidance.", |
655 | s.name, |
656 | ))); |
657 | } |
658 | get_conf_val!(s["server_password"])?; |
659 | } else if s.extra.contains_key("server_password") { |
660 | return Err(Error::new(format!( |
661 | - "Configuration error ({}): both server_password and server_password_command are set, cannot choose", |
662 | + "Configuration error ({}): both server_password and server_password_command are \ |
663 | + set, cannot choose", |
664 | s.name.as_str(), |
665 | ))); |
666 | } |
667 | @@ -1541,7 +1605,8 @@ impl ImapType { |
668 | let use_starttls = get_conf_val!(s["use_starttls"], false)?; |
669 | if !use_tls && use_starttls { |
670 | return Err(Error::new(format!( |
671 | - "Configuration error ({}): incompatible use_tls and use_starttls values: use_tls = false, use_starttls = true", |
672 | + "Configuration error ({}): incompatible use_tls and use_starttls values: use_tls \ |
673 | + = false, use_starttls = true", |
674 | s.name.as_str(), |
675 | ))); |
676 | } |
677 | @@ -1565,7 +1630,8 @@ impl ImapType { |
678 | #[cfg(not(feature = "deflate_compression"))] |
679 | if s.extra.contains_key("use_deflate") { |
680 | return Err(Error::new(format!( |
681 | - "Configuration error ({}): setting `use_deflate` is set but this version of meli isn't compiled with DEFLATE support.", |
682 | + "Configuration error ({}): setting `use_deflate` is set but this version of meli \ |
683 | + isn't compiled with DEFLATE support.", |
684 | s.name.as_str(), |
685 | ))); |
686 | } |
687 | @@ -1578,8 +1644,10 @@ impl ImapType { |
688 | let diff = extra_keys.difference(&keys).collect::<Vec<&&str>>(); |
689 | if !diff.is_empty() { |
690 | return Err(Error::new(format!( |
691 | - "Configuration error ({}): the following flags are set but are not recognized: {:?}.", |
692 | - s.name.as_str(), diff |
693 | + "Configuration error ({}): the following flags are set but are not recognized: \ |
694 | + {:?}.", |
695 | + s.name.as_str(), |
696 | + diff |
697 | ))); |
698 | } |
699 | Ok(()) |
700 | @@ -1658,7 +1726,14 @@ async fn fetch_hlpr(state: &mut FetchState) -> Result<Vec<Envelope>> { |
701 | /* Try resetting the database */ |
702 | if let Some(ref mut cache_handle) = state.cache_handle { |
703 | if let Err(err) = cache_handle.reset() { |
704 | - crate::log(format!("IMAP cache error: could not reset cache for {}. Reason: {}", state.uid_store.account_name, err), crate::ERROR); |
705 | + crate::log( |
706 | + format!( |
707 | + "IMAP cache error: could not reset cache for {}. Reason: \ |
708 | + {}", |
709 | + state.uid_store.account_name, err |
710 | + ), |
711 | + crate::ERROR, |
712 | + ); |
713 | } |
714 | } |
715 | state.stage = FetchStage::InitialFresh; |
716 | @@ -1743,11 +1818,14 @@ async fn fetch_hlpr(state: &mut FetchState) -> Result<Vec<Envelope>> { |
717 | if max_uid_left > 0 { |
718 | debug!("{} max_uid_left= {}", mailbox_hash, max_uid_left); |
719 | let command = if max_uid_left == 1 { |
720 | - "UID FETCH 1 (UID FLAGS ENVELOPE BODY.PEEK[HEADER.FIELDS (REFERENCES)] BODYSTRUCTURE)".to_string() |
721 | + "UID FETCH 1 (UID FLAGS ENVELOPE BODY.PEEK[HEADER.FIELDS (REFERENCES)] \ |
722 | + BODYSTRUCTURE)" |
723 | + .to_string() |
724 | } else { |
725 | format!( |
726 | - "UID FETCH {}:{} (UID FLAGS ENVELOPE BODY.PEEK[HEADER.FIELDS (REFERENCES)] BODYSTRUCTURE)", |
727 | - std::cmp::max(max_uid_left.saturating_sub(chunk_size), 1), |
728 | + "UID FETCH {}:{} (UID FLAGS ENVELOPE BODY.PEEK[HEADER.FIELDS \ |
729 | + (REFERENCES)] BODYSTRUCTURE)", |
730 | + std::cmp::max(max_uid_left.saturating_sub(chunk_size), 1), |
731 | max_uid_left |
732 | ) |
733 | }; |
734 | diff --git a/melib/src/backends/imap/cache.rs b/melib/src/backends/imap/cache.rs |
735 | index f0bca45..3046ab1 100644 |
736 | --- a/melib/src/backends/imap/cache.rs |
737 | +++ b/melib/src/backends/imap/cache.rs |
738 | @@ -21,12 +21,13 @@ |
739 | |
740 | use super::*; |
741 | mod sync; |
742 | + use std::convert::TryFrom; |
743 | + |
744 | use crate::{ |
745 | backends::MailboxHash, |
746 | email::{Envelope, EnvelopeHash}, |
747 | error::*, |
748 | }; |
749 | - use std::convert::TryFrom; |
750 | |
751 | #[derive(Debug, PartialEq, Hash, Eq, Ord, PartialOrd, Copy, Clone)] |
752 | pub struct ModSequence(pub std::num::NonZeroU64); |
753 | @@ -105,10 +106,11 @@ pub use sqlite3_m::*; |
754 | #[cfg(feature = "sqlite3")] |
755 | mod sqlite3_m { |
756 | use super::*; |
757 | - use crate::sqlite3::rusqlite::types::{ |
758 | - FromSql, FromSqlError, FromSqlResult, ToSql, ToSqlOutput, |
759 | + use crate::sqlite3::{ |
760 | + self, |
761 | + rusqlite::types::{FromSql, FromSqlError, FromSqlResult, ToSql, ToSqlOutput}, |
762 | + DatabaseDescription, |
763 | }; |
764 | - use crate::sqlite3::{self, DatabaseDescription}; |
765 | |
766 | type Sqlite3UID = i32; |
767 | |
768 | @@ -287,23 +289,45 @@ mod sqlite3_m { |
769 | })?; |
770 | |
771 | if let Some(Ok(highestmodseq)) = select_response.highestmodseq { |
772 | - self.connection.execute( |
773 | - "INSERT OR IGNORE INTO mailbox (uidvalidity, flags, highestmodseq, mailbox_hash) VALUES (?1, ?2, ?3, ?4)", |
774 | - sqlite3::params![select_response.uidvalidity as Sqlite3UID, select_response.flags.1.iter().map(|s| s.as_str()).collect::<Vec<&str>>().join("\0").as_bytes(), highestmodseq, mailbox_hash], |
775 | - ) |
776 | - .chain_err_summary(|| { |
777 | - format!( |
778 | - "Could not insert uidvalidity {} in header_cache of account {}", |
779 | - select_response.uidvalidity, self.uid_store.account_name |
780 | - ) |
781 | - })?; |
782 | + self.connection |
783 | + .execute( |
784 | + "INSERT OR IGNORE INTO mailbox (uidvalidity, flags, highestmodseq, \ |
785 | + mailbox_hash) VALUES (?1, ?2, ?3, ?4)", |
786 | + sqlite3::params![ |
787 | + select_response.uidvalidity as Sqlite3UID, |
788 | + select_response |
789 | + .flags |
790 | + .1 |
791 | + .iter() |
792 | + .map(|s| s.as_str()) |
793 | + .collect::<Vec<&str>>() |
794 | + .join("\0") |
795 | + .as_bytes(), |
796 | + highestmodseq, |
797 | + mailbox_hash |
798 | + ], |
799 | + ) |
800 | + .chain_err_summary(|| { |
801 | + format!( |
802 | + "Could not insert uidvalidity {} in header_cache of account {}", |
803 | + select_response.uidvalidity, self.uid_store.account_name |
804 | + ) |
805 | + })?; |
806 | } else { |
807 | self.connection |
808 | .execute( |
809 | - "INSERT OR IGNORE INTO mailbox (uidvalidity, flags, mailbox_hash) VALUES (?1, ?2, ?3)", |
810 | + "INSERT OR IGNORE INTO mailbox (uidvalidity, flags, mailbox_hash) VALUES \ |
811 | + (?1, ?2, ?3)", |
812 | sqlite3::params![ |
813 | select_response.uidvalidity as Sqlite3UID, |
814 | - select_response.flags.1.iter().map(|s| s.as_str()).collect::<Vec<&str>>().join("\0").as_bytes(), |
815 | + select_response |
816 | + .flags |
817 | + .1 |
818 | + .iter() |
819 | + .map(|s| s.as_str()) |
820 | + .collect::<Vec<&str>>() |
821 | + .join("\0") |
822 | + .as_bytes(), |
823 | mailbox_hash |
824 | ], |
825 | ) |
826 | @@ -463,9 +487,24 @@ mod sqlite3_m { |
827 | { |
828 | max_uid = std::cmp::max(max_uid, *uid); |
829 | tx.execute( |
830 | - "INSERT OR REPLACE INTO envelopes (hash, uid, mailbox_hash, modsequence, envelope) VALUES (?1, ?2, ?3, ?4, ?5)", |
831 | - sqlite3::params![envelope.hash(), *uid as Sqlite3UID, mailbox_hash, modseq, &envelope], |
832 | - ).chain_err_summary(|| format!("Could not insert envelope {} {} in header_cache of account {}", envelope.message_id(), envelope.hash(), uid_store.account_name))?; |
833 | + "INSERT OR REPLACE INTO envelopes (hash, uid, mailbox_hash, modsequence, \ |
834 | + envelope) VALUES (?1, ?2, ?3, ?4, ?5)", |
835 | + sqlite3::params![ |
836 | + envelope.hash(), |
837 | + *uid as Sqlite3UID, |
838 | + mailbox_hash, |
839 | + modseq, |
840 | + &envelope |
841 | + ], |
842 | + ) |
843 | + .chain_err_summary(|| { |
844 | + format!( |
845 | + "Could not insert envelope {} {} in header_cache of account {}", |
846 | + envelope.message_id(), |
847 | + envelope.hash(), |
848 | + uid_store.account_name |
849 | + ) |
850 | + })?; |
851 | } |
852 | } |
853 | tx.commit()?; |
854 | @@ -523,15 +562,17 @@ mod sqlite3_m { |
855 | env.tags_mut() |
856 | .extend(tags.iter().map(|t| TagHash::from_bytes(t.as_bytes()))); |
857 | tx.execute( |
858 | - "UPDATE envelopes SET envelope = ?1 WHERE mailbox_hash = ?2 AND uid = ?3;", |
859 | - sqlite3::params![&env, mailbox_hash, *uid as Sqlite3UID], |
860 | - ) |
861 | - .chain_err_summary(|| { |
862 | - format!( |
863 | - "Could not update envelope {} uid {} from mailbox {} account {}", |
864 | - env_hash, *uid, mailbox_hash, uid_store.account_name |
865 | - ) |
866 | - })?; |
867 | + "UPDATE envelopes SET envelope = ?1 WHERE mailbox_hash = ?2 AND \ |
868 | + uid = ?3;", |
869 | + sqlite3::params![&env, mailbox_hash, *uid as Sqlite3UID], |
870 | + ) |
871 | + .chain_err_summary(|| { |
872 | + format!( |
873 | + "Could not update envelope {} uid {} from mailbox {} account \ |
874 | + {}", |
875 | + env_hash, *uid, mailbox_hash, uid_store.account_name |
876 | + ) |
877 | + })?; |
878 | uid_store |
879 | .envelopes |
880 | .lock() |
881 | @@ -563,8 +604,9 @@ mod sqlite3_m { |
882 | let mut ret: Vec<(UID, Envelope, Option<ModSequence>)> = match identifier { |
883 | Ok(uid) => { |
884 | let mut stmt = self.connection.prepare( |
885 | - "SELECT uid, envelope, modsequence FROM envelopes WHERE mailbox_hash = ?1 AND uid = ?2;", |
886 | - )?; |
887 | + "SELECT uid, envelope, modsequence FROM envelopes WHERE mailbox_hash = ?1 \ |
888 | + AND uid = ?2;", |
889 | + )?; |
890 | |
891 | let x = stmt |
892 | .query_map(sqlite3::params![mailbox_hash, uid as Sqlite3UID], |row| { |
893 | @@ -579,8 +621,9 @@ mod sqlite3_m { |
894 | } |
895 | Err(env_hash) => { |
896 | let mut stmt = self.connection.prepare( |
897 | - "SELECT uid, envelope, modsequence FROM envelopes WHERE mailbox_hash = ?1 AND hash = ?2;", |
898 | - )?; |
899 | + "SELECT uid, envelope, modsequence FROM envelopes WHERE mailbox_hash = ?1 \ |
900 | + AND hash = ?2;", |
901 | + )?; |
902 | |
903 | let x = stmt |
904 | .query_map(sqlite3::params![mailbox_hash, env_hash], |row| { |
905 | diff --git a/melib/src/backends/imap/cache/sync.rs b/melib/src/backends/imap/cache/sync.rs |
906 | index 2497d4e..3dde2cc 100644 |
907 | --- a/melib/src/backends/imap/cache/sync.rs |
908 | +++ b/melib/src/backends/imap/cache/sync.rs |
909 | @@ -130,7 +130,8 @@ impl ImapConnection { |
910 | // 2. tag1 UID FETCH <lastseenuid+1>:* <descriptors> |
911 | self.send_command( |
912 | format!( |
913 | - "UID FETCH {}:* (UID FLAGS ENVELOPE BODY.PEEK[HEADER.FIELDS (REFERENCES)] BODYSTRUCTURE)", |
914 | + "UID FETCH {}:* (UID FLAGS ENVELOPE BODY.PEEK[HEADER.FIELDS (REFERENCES)] \ |
915 | + BODYSTRUCTURE)", |
916 | max_uid + 1 |
917 | ) |
918 | .as_bytes(), |
919 | @@ -375,9 +376,9 @@ impl ImapConnection { |
920 | // client MUST |
921 | // * empty the local cache of that mailbox; |
922 | // * "forget" the cached HIGHESTMODSEQ value for the mailbox; |
923 | - // * remove any pending "actions" that refer to UIDs in that |
924 | - // mailbox (note that this doesn't affect actions performed on |
925 | - // client-generated fake UIDs; see Section 5); and |
926 | + // * remove any pending "actions" that refer to UIDs in that mailbox (note |
927 | + // that this doesn't affect actions performed on client-generated fake UIDs; |
928 | + // see Section 5); and |
929 | // * skip steps 1b and 2-II; |
930 | cache_handle.clear(mailbox_hash, &select_response)?; |
931 | return Ok(None); |
932 | @@ -398,9 +399,9 @@ impl ImapConnection { |
933 | let new_highestmodseq = select_response.highestmodseq.unwrap().unwrap(); |
934 | let mut refresh_events = vec![]; |
935 | // 1b) Check the mailbox HIGHESTMODSEQ. |
936 | - // If the cached value is the same as the one returned by the server, skip fetching |
937 | - // message flags on step 2-II, i.e., the client only has to find out which messages got |
938 | - // expunged. |
939 | + // If the cached value is the same as the one returned by the server, skip |
940 | + // fetching message flags on step 2-II, i.e., the client only has to |
941 | + // find out which messages got expunged. |
942 | if cached_highestmodseq != new_highestmodseq { |
943 | /* Cache is synced, only figure out which messages got expunged */ |
944 | |
945 | @@ -415,7 +416,8 @@ impl ImapConnection { |
946 | // 2. tag1 UID FETCH <lastseenuid+1>:* <descriptors> |
947 | self.send_command( |
948 | format!( |
949 | - "UID FETCH {}:* (UID FLAGS ENVELOPE BODY.PEEK[HEADER.FIELDS (REFERENCES)] BODYSTRUCTURE) (CHANGEDSINCE {})", |
950 | + "UID FETCH {}:* (UID FLAGS ENVELOPE BODY.PEEK[HEADER.FIELDS (REFERENCES)] \ |
951 | + BODYSTRUCTURE) (CHANGEDSINCE {})", |
952 | cached_max_uid + 1, |
953 | cached_highestmodseq, |
954 | ) |
955 | @@ -571,8 +573,8 @@ impl ImapConnection { |
956 | .insert(mailbox_hash, Ok(new_highestmodseq)); |
957 | } |
958 | let mut valid_envs = BTreeSet::default(); |
959 | - // This should be UID SEARCH 1:<maxuid> but it's difficult to compare to cached UIDs at the |
960 | - // point of calling this function |
961 | + // This should be UID SEARCH 1:<maxuid> but it's difficult to compare to cached |
962 | + // UIDs at the point of calling this function |
963 | self.send_command(b"UID SEARCH ALL").await?; |
964 | self.read_response(&mut response, RequiredResponses::SEARCH) |
965 | .await?; |
966 | @@ -614,7 +616,8 @@ impl ImapConnection { |
967 | Ok(Some(payload.into_iter().map(|(_, env)| env).collect())) |
968 | } |
969 | |
970 | - //rfc7162_Quick Flag Changes Resynchronization (CONDSTORE)_and Quick Mailbox Resynchronization (QRESYNC) |
971 | + //rfc7162_Quick Flag Changes Resynchronization (CONDSTORE)_and Quick Mailbox |
972 | + // Resynchronization (QRESYNC) |
973 | pub async fn resync_condstoreqresync( |
974 | &mut self, |
975 | _cache_handle: Box<dyn ImapCache>, |
976 | @@ -634,8 +637,8 @@ impl ImapConnection { |
977 | ) |
978 | }; |
979 | |
980 | - /* first SELECT the mailbox to get READ/WRITE permissions (because EXAMINE only |
981 | - * returns READ-ONLY for both cases) */ |
982 | + /* first SELECT the mailbox to get READ/WRITE permissions (because EXAMINE |
983 | + * only returns READ-ONLY for both cases) */ |
984 | let mut select_response = self |
985 | .select_mailbox(mailbox_hash, &mut response, true) |
986 | .await? |
987 | diff --git a/melib/src/backends/imap/connection.rs b/melib/src/backends/imap/connection.rs |
988 | index 8918117..1b9c76c 100644 |
989 | --- a/melib/src/backends/imap/connection.rs |
990 | +++ b/melib/src/backends/imap/connection.rs |
991 | @@ -20,33 +20,38 @@ |
992 | */ |
993 | |
994 | use super::protocol_parser::{ImapLineSplit, ImapResponse, RequiredResponses, SelectResponse}; |
995 | - use crate::backends::{MailboxHash, RefreshEvent}; |
996 | - use crate::connections::{lookup_ipv4, timeout, Connection}; |
997 | - use crate::email::parser::BytesExt; |
998 | - use crate::error::*; |
999 | + use crate::{ |
1000 | + backends::{MailboxHash, RefreshEvent}, |
1001 | + connections::{lookup_ipv4, timeout, Connection}, |
1002 | + email::parser::BytesExt, |
1003 | + error::*, |
1004 | + }; |
1005 | extern crate native_tls; |
1006 | + use std::{ |
1007 | + collections::HashSet, |
1008 | + convert::TryFrom, |
1009 | + future::Future, |
1010 | + iter::FromIterator, |
1011 | + pin::Pin, |
1012 | + sync::Arc, |
1013 | + time::{Duration, Instant, SystemTime}, |
1014 | + }; |
1015 | + |
1016 | use futures::io::{AsyncReadExt, AsyncWriteExt}; |
1017 | use native_tls::TlsConnector; |
1018 | pub use smol::Async as AsyncWrapper; |
1019 | - use std::collections::HashSet; |
1020 | - use std::convert::TryFrom; |
1021 | - use std::future::Future; |
1022 | - use std::iter::FromIterator; |
1023 | - use std::pin::Pin; |
1024 | - use std::sync::Arc; |
1025 | - use std::time::{Duration, Instant, SystemTime}; |
1026 | |
1027 | const IMAP_PROTOCOL_TIMEOUT: Duration = Duration::from_secs(60 * 28); |
1028 | |
1029 | - use super::protocol_parser; |
1030 | - use super::{Capabilities, ImapServerConf, UIDStore}; |
1031 | + use super::{protocol_parser, Capabilities, ImapServerConf, UIDStore}; |
1032 | |
1033 | #[derive(Debug, Clone, Copy)] |
1034 | pub enum SyncPolicy { |
1035 | None, |
1036 | ///rfc4549 `Synch Ops for Disconnected IMAP4 Clients` <https://tools.ietf.org/html/rfc4549> |
1037 | Basic, |
1038 | - ///rfc7162 `IMAP Extensions: Quick Flag Changes Resynchronization (CONDSTORE) and Quick Mailbox Resynchronization (QRESYNC)` |
1039 | + ///rfc7162 `IMAP Extensions: Quick Flag Changes Resynchronization |
1040 | + /// (CONDSTORE) and Quick Mailbox Resynchronization (QRESYNC)` |
1041 | Condstore, |
1042 | CondstoreQresync, |
1043 | } |
1044 | @@ -144,13 +149,14 @@ impl ImapStream { |
1045 | if let Some(timeout) = server_conf.timeout { |
1046 | TcpStream::connect_timeout(&addr, timeout)? |
1047 | } else { |
1048 | - TcpStream::connect(&addr)? |
1049 | + TcpStream::connect(addr)? |
1050 | }, |
1051 | ))?; |
1052 | if server_conf.use_starttls { |
1053 | let err_fn = || { |
1054 | if server_conf.server_port == 993 { |
1055 | - "STARTTLS failed. Server port is set to 993, which normally uses TLS. Maybe try disabling use_starttls." |
1056 | + "STARTTLS failed. Server port is set to 993, which normally uses TLS. \ |
1057 | + Maybe try disabling use_starttls." |
1058 | } else { |
1059 | "STARTTLS failed. Is the connection already encrypted?" |
1060 | } |
1061 | @@ -246,7 +252,7 @@ impl ImapStream { |
1062 | if let Some(timeout) = server_conf.timeout { |
1063 | TcpStream::connect_timeout(&addr, timeout)? |
1064 | } else { |
1065 | - TcpStream::connect(&addr)? |
1066 | + TcpStream::connect(addr)? |
1067 | }, |
1068 | ))? |
1069 | }; |
1070 | @@ -350,10 +356,14 @@ impl ImapStream { |
1071 | .any(|cap| cap.eq_ignore_ascii_case(b"AUTH=XOAUTH2")) |
1072 | { |
1073 | return Err(Error::new(format!( |
1074 | - "Could not connect to {}: OAUTH2 is enabled but server did not return AUTH=XOAUTH2 capability. Returned capabilities were: {}", |
1075 | - &server_conf.server_hostname, |
1076 | - capabilities.iter().map(|capability| |
1077 | - String::from_utf8_lossy(capability).to_string()).collect::<Vec<String>>().join(" ") |
1078 | + "Could not connect to {}: OAUTH2 is enabled but server did not return \ |
1079 | + AUTH=XOAUTH2 capability. Returned capabilities were: {}", |
1080 | + &server_conf.server_hostname, |
1081 | + capabilities |
1082 | + .iter() |
1083 | + .map(|capability| String::from_utf8_lossy(capability).to_string()) |
1084 | + .collect::<Vec<String>>() |
1085 | + .join(" ") |
1086 | ))); |
1087 | } |
1088 | ret.send_command( |
1089 | @@ -414,8 +424,8 @@ impl ImapStream { |
1090 | } |
1091 | |
1092 | if capabilities.is_none() { |
1093 | - /* sending CAPABILITY after LOGIN automatically is an RFC recommendation, so check |
1094 | - * for lazy servers */ |
1095 | + /* sending CAPABILITY after LOGIN automatically is an RFC recommendation, so |
1096 | + * check for lazy servers */ |
1097 | drop(capabilities); |
1098 | ret.send_command(b"CAPABILITY").await?; |
1099 | ret.read_response(&mut res).await.unwrap(); |
1100 | @@ -648,7 +658,14 @@ impl ImapConnection { |
1101 | | ImapResponse::Bad(code) |
1102 | | ImapResponse::Preauth(code) |
1103 | | ImapResponse::Bye(code) => { |
1104 | - crate::log(format!("Could not use COMPRESS=DEFLATE in account `{}`: server replied with `{}`", self.uid_store.account_name, code), crate::LoggingLevel::WARN); |
1105 | + crate::log( |
1106 | + format!( |
1107 | + "Could not use COMPRESS=DEFLATE in account `{}`: server \ |
1108 | + replied with `{}`", |
1109 | + self.uid_store.account_name, code |
1110 | + ), |
1111 | + crate::LoggingLevel::WARN, |
1112 | + ); |
1113 | } |
1114 | ImapResponse::Ok(_) => { |
1115 | let ImapStream { |
1116 | @@ -750,7 +767,7 @@ impl ImapConnection { |
1117 | &required_responses |
1118 | );*/ |
1119 | for l in response.split_rn() { |
1120 | - /*debug!("check line: {}", &l);*/ |
1121 | + /* debug!("check line: {}", &l); */ |
1122 | if required_responses.check(l) || !self.process_untagged(l).await? { |
1123 | ret.extend_from_slice(l); |
1124 | } |
1125 | diff --git a/melib/src/backends/imap/mailbox.rs b/melib/src/backends/imap/mailbox.rs |
1126 | index 0e8aa7f..a26d3da 100644 |
1127 | --- a/melib/src/backends/imap/mailbox.rs |
1128 | +++ b/melib/src/backends/imap/mailbox.rs |
1129 | @@ -19,12 +19,15 @@ |
1130 | * along with meli. If not, see <http://www.gnu.org/licenses/>. |
1131 | */ |
1132 | |
1133 | + use std::sync::{Arc, Mutex, RwLock}; |
1134 | + |
1135 | use super::protocol_parser::SelectResponse; |
1136 | - use crate::backends::{ |
1137 | - BackendMailbox, LazyCountSet, Mailbox, MailboxHash, MailboxPermissions, SpecialUsageMailbox, |
1138 | + use crate::{ |
1139 | + backends::{ |
1140 | + BackendMailbox, LazyCountSet, Mailbox, MailboxHash, MailboxPermissions, SpecialUsageMailbox, |
1141 | + }, |
1142 | + error::*, |
1143 | }; |
1144 | - use crate::error::*; |
1145 | - use std::sync::{Arc, Mutex, RwLock}; |
1146 | |
1147 | #[derive(Debug, Default, Clone)] |
1148 | pub struct ImapMailbox { |
1149 | @@ -51,7 +54,8 @@ impl ImapMailbox { |
1150 | &self.imap_path |
1151 | } |
1152 | |
1153 | - /// Establish that mailbox contents have been fetched at least once during this execution |
1154 | + /// Establish that mailbox contents have been fetched at least once during |
1155 | + /// this execution |
1156 | #[inline(always)] |
1157 | pub fn set_warm(&self, new_value: bool) { |
1158 | *self.warm.lock().unwrap() = new_value; |
1159 | diff --git a/melib/src/backends/imap/managesieve.rs b/melib/src/backends/imap/managesieve.rs |
1160 | index e8620d0..6493259 100644 |
1161 | --- a/melib/src/backends/imap/managesieve.rs |
1162 | +++ b/melib/src/backends/imap/managesieve.rs |
1163 | @@ -19,19 +19,25 @@ |
1164 | * along with meli. If not, see <http://www.gnu.org/licenses/>. |
1165 | */ |
1166 | |
1167 | - use super::{ImapConnection, ImapProtocol, ImapServerConf, UIDStore}; |
1168 | - use crate::conf::AccountSettings; |
1169 | - use crate::email::parser::IResult; |
1170 | - use crate::error::{Error, Result}; |
1171 | - use crate::get_conf_val; |
1172 | - use crate::imap::RequiredResponses; |
1173 | + use std::{ |
1174 | + str::FromStr, |
1175 | + sync::{Arc, Mutex}, |
1176 | + time::SystemTime, |
1177 | + }; |
1178 | + |
1179 | use nom::{ |
1180 | branch::alt, bytes::complete::tag, combinator::map, multi::separated_list1, |
1181 | sequence::separated_pair, |
1182 | }; |
1183 | - use std::str::FromStr; |
1184 | - use std::sync::{Arc, Mutex}; |
1185 | - use std::time::SystemTime; |
1186 | + |
1187 | + use super::{ImapConnection, ImapProtocol, ImapServerConf, UIDStore}; |
1188 | + use crate::{ |
1189 | + conf::AccountSettings, |
1190 | + email::parser::IResult, |
1191 | + error::{Error, Result}, |
1192 | + get_conf_val, |
1193 | + imap::RequiredResponses, |
1194 | + }; |
1195 | |
1196 | pub struct ManageSieveConnection { |
1197 | pub inner: ImapConnection, |
1198 | @@ -61,12 +67,17 @@ pub enum ManageSieveResponse<'a> { |
1199 | } |
1200 | |
1201 | mod parser { |
1202 | + use nom::{ |
1203 | + bytes::complete::tag, |
1204 | + character::complete::crlf, |
1205 | + combinator::{iterator, map, opt}, |
1206 | + }; |
1207 | + pub use nom::{ |
1208 | + bytes::complete::{is_not, tag_no_case}, |
1209 | + sequence::{delimited, pair, preceded, terminated}, |
1210 | + }; |
1211 | + |
1212 | use super::*; |
1213 | - use nom::bytes::complete::tag; |
1214 | - pub use nom::bytes::complete::{is_not, tag_no_case}; |
1215 | - use nom::character::complete::crlf; |
1216 | - use nom::combinator::{iterator, map, opt}; |
1217 | - pub use nom::sequence::{delimited, pair, preceded, terminated}; |
1218 | |
1219 | pub fn sieve_name(input: &[u8]) -> IResult<&[u8], &[u8]> { |
1220 | crate::backends::imap::protocol_parser::string_token(input) |
1221 | diff --git a/melib/src/backends/imap/operations.rs b/melib/src/backends/imap/operations.rs |
1222 | index f7b48e3..e2488de 100644 |
1223 | --- a/melib/src/backends/imap/operations.rs |
1224 | +++ b/melib/src/backends/imap/operations.rs |
1225 | @@ -19,13 +19,11 @@ |
1226 | * along with meli. If not, see <http://www.gnu.org/licenses/>. |
1227 | */ |
1228 | |
1229 | - use super::*; |
1230 | - |
1231 | - use crate::backends::*; |
1232 | - use crate::email::*; |
1233 | - use crate::error::Error; |
1234 | use std::sync::Arc; |
1235 | |
1236 | + use super::*; |
1237 | + use crate::{backends::*, email::*, error::Error}; |
1238 | + |
1239 | /// `BackendOp` implementor for Imap |
1240 | #[derive(Debug, Clone)] |
1241 | pub struct ImapOp { |
1242 | diff --git a/melib/src/backends/imap/protocol_parser.rs b/melib/src/backends/imap/protocol_parser.rs |
1243 | index edcfe98..6fb8238 100644 |
1244 | --- a/melib/src/backends/imap/protocol_parser.rs |
1245 | +++ b/melib/src/backends/imap/protocol_parser.rs |
1246 | @@ -19,24 +19,28 @@ |
1247 | * along with meli. If not, see <http://www.gnu.org/licenses/>. |
1248 | */ |
1249 | |
1250 | - use super::*; |
1251 | - use crate::email::address::{Address, MailboxAddress}; |
1252 | - use crate::email::parser::{ |
1253 | - generic::{byte_in_range, byte_in_slice}, |
1254 | - BytesExt, IResult, |
1255 | - }; |
1256 | - use crate::error::ResultIntoError; |
1257 | + use std::{convert::TryFrom, str::FromStr}; |
1258 | + |
1259 | use nom::{ |
1260 | branch::{alt, permutation}, |
1261 | bytes::complete::{is_a, is_not, tag, take, take_until, take_while}, |
1262 | - character::complete::digit1, |
1263 | - character::is_digit, |
1264 | + character::{complete::digit1, is_digit}, |
1265 | combinator::{map, map_res, opt}, |
1266 | multi::{fold_many1, length_data, many0, many1, separated_list1}, |
1267 | sequence::{delimited, preceded}, |
1268 | }; |
1269 | - use std::convert::TryFrom; |
1270 | - use std::str::FromStr; |
1271 | + |
1272 | + use super::*; |
1273 | + use crate::{ |
1274 | + email::{ |
1275 | + address::{Address, MailboxAddress}, |
1276 | + parser::{ |
1277 | + generic::{byte_in_range, byte_in_slice}, |
1278 | + BytesExt, IResult, |
1279 | + }, |
1280 | + }, |
1281 | + error::ResultIntoError, |
1282 | + }; |
1283 | |
1284 | bitflags! { |
1285 | #[derive(Default, Serialize, Deserialize)] |
1286 | @@ -137,7 +141,7 @@ fn test_imap_required_responses() { |
1287 | let response = |
1288 | &b"* 1040 FETCH (UID 1064 FLAGS ())\r\nM15 OK Fetch completed (0.001 + 0.299 secs).\r\n"[..]; |
1289 | for l in response.split_rn() { |
1290 | - /*debug!("check line: {}", &l);*/ |
1291 | + /* debug!("check line: {}", &l); */ |
1292 | if required_responses.check(l) { |
1293 | ret.extend_from_slice(l); |
1294 | } |
1295 | @@ -159,35 +163,59 @@ pub struct ImapLineIterator<'a> { |
1296 | |
1297 | #[derive(Debug, PartialEq)] |
1298 | pub enum ResponseCode { |
1299 | - ///The human-readable text contains a special alert that MUST be presented to the user in a fashion that calls the user's attention to the message. |
1300 | + ///The human-readable text contains a special alert that MUST be presented |
1301 | + /// to the user in a fashion that calls the user's attention to the message. |
1302 | Alert(String), |
1303 | |
1304 | - ///Optionally followed by a parenthesized list of charsets. A SEARCH failed because the given charset is not supported by this implementation. If the optional list of charsets is given, this lists the charsets that are supported by this implementation. |
1305 | + ///Optionally followed by a parenthesized list of charsets. A SEARCH |
1306 | + /// failed because the given charset is not supported by this |
1307 | + /// implementation. If the optional list of charsets is given, this lists |
1308 | + /// the charsets that are supported by this implementation. |
1309 | Badcharset(Option<String>), |
1310 | |
1311 | - /// Followed by a list of capabilities. This can appear in the initial OK or PREAUTH response to transmit an initial capabilities list. This makes it unnecessary for a client to send a separate CAPABILITY command if it recognizes this response. |
1312 | + /// Followed by a list of capabilities. This can appear in the initial OK |
1313 | + /// or PREAUTH response to transmit an initial capabilities list. This |
1314 | + /// makes it unnecessary for a client to send a separate CAPABILITY command |
1315 | + /// if it recognizes this response. |
1316 | Capability, |
1317 | |
1318 | - /// The human-readable text represents an error in parsing the [RFC-2822] header or [MIME-IMB] headers of a message in the mailbox. |
1319 | + /// The human-readable text represents an error in parsing the [RFC-2822] |
1320 | + /// header or [MIME-IMB] headers of a message in the mailbox. |
1321 | Parse(String), |
1322 | |
1323 | - /// Followed by a parenthesized list of flags, indicates which of the known flags the client can change permanently. Any flags that are in the FLAGS untagged response, but not the PERMANENTFLAGS list, can not be set permanently. If the client attempts to STORE a flag that is not in the PERMANENTFLAGS list, the server will either ignore the change or store the state change for the remainder of the current session only. The PERMANENTFLAGS list can also include the special flag \*, which indicates that it is possible to create new keywords by attempting to store those flags in the mailbox. |
1324 | + /// Followed by a parenthesized list of flags, indicates which of the known |
1325 | + /// flags the client can change permanently. Any flags that are in the |
1326 | + /// FLAGS untagged response, but not the PERMANENTFLAGS list, can not be set |
1327 | + /// permanently. If the client attempts to STORE a flag that is not in the |
1328 | + /// PERMANENTFLAGS list, the server will either ignore the change or store |
1329 | + /// the state change for the remainder of the current session only. The |
1330 | + /// PERMANENTFLAGS list can also include the special flag \*, which |
1331 | + /// indicates that it is possible to create new keywords by attempting to |
1332 | + /// store those flags in the mailbox. |
1333 | Permanentflags(String), |
1334 | |
1335 | - /// The mailbox is selected read-only, or its access while selected has changed from read-write to read-only. |
1336 | + /// The mailbox is selected read-only, or its access while selected has |
1337 | + /// changed from read-write to read-only. |
1338 | ReadOnly, |
1339 | |
1340 | - /// The mailbox is selected read-write, or its access while selected has changed from read-only to read-write. |
1341 | + /// The mailbox is selected read-write, or its access while selected has |
1342 | + /// changed from read-only to read-write. |
1343 | ReadWrite, |
1344 | |
1345 | - /// An APPEND or COPY attempt is failing because the target mailbox does not exist (as opposed to some other reason). This is a hint to the client that the operation can succeed if the mailbox is first created by the CREATE command. |
1346 | + /// An APPEND or COPY attempt is failing because the target mailbox does not |
1347 | + /// exist (as opposed to some other reason). This is a hint to the client |
1348 | + /// that the operation can succeed if the mailbox is first created by the |
1349 | + /// CREATE command. |
1350 | Trycreate, |
1351 | |
1352 | - /// Followed by a decimal number, indicates the next unique identifier value. Refer to section 2.3.1.1 for more information. |
1353 | + /// Followed by a decimal number, indicates the next unique identifier |
1354 | + /// value. Refer to section 2.3.1.1 for more information. |
1355 | Uidnext(UID), |
1356 | - /// Followed by a decimal number, indicates the unique identifier validity value. Refer to section 2.3.1.1 for more information. |
1357 | + /// Followed by a decimal number, indicates the unique identifier validity |
1358 | + /// value. Refer to section 2.3.1.1 for more information. |
1359 | Uidvalidity(UID), |
1360 | - /// Followed by a decimal number, indicates the number of the first message without the \Seen flag set. |
1361 | + /// Followed by a decimal number, indicates the number of the first message |
1362 | + /// without the \Seen flag set. |
1363 | Unseen(ImapNum), |
1364 | } |
1365 | |
1366 | @@ -195,15 +223,23 @@ impl std::fmt::Display for ResponseCode { |
1367 | fn fmt(&self, fmt: &mut std::fmt::Formatter) -> std::fmt::Result { |
1368 | use ResponseCode::*; |
1369 | match self { |
1370 | - Alert(s)=> write!(fmt, "ALERT: {}", s), |
1371 | - Badcharset(None)=> write!(fmt, "Given charset is not supported by this server."), |
1372 | - Badcharset(Some(s))=> write!(fmt, "Given charset is not supported by this server. Supported ones are: {}", s), |
1373 | + Alert(s) => write!(fmt, "ALERT: {}", s), |
1374 | + Badcharset(None) => write!(fmt, "Given charset is not supported by this server."), |
1375 | + Badcharset(Some(s)) => write!( |
1376 | + fmt, |
1377 | + "Given charset is not supported by this server. Supported ones are: {}", |
1378 | + s |
1379 | + ), |
1380 | Capability => write!(fmt, "Capability response"), |
1381 | Parse(s) => write!(fmt, "Server error in parsing message headers: {}", s), |
1382 | Permanentflags(s) => write!(fmt, "Mailbox supports these flags: {}", s), |
1383 | - ReadOnly=> write!(fmt, "This mailbox is selected read-only."), |
1384 | + ReadOnly => write!(fmt, "This mailbox is selected read-only."), |
1385 | ReadWrite => write!(fmt, "This mailbox is selected with read-write permissions."), |
1386 | - Trycreate => write!(fmt, "Failed to operate on the target mailbox because it doesn't exist. Try creating it first."), |
1387 | + Trycreate => write!( |
1388 | + fmt, |
1389 | + "Failed to operate on the target mailbox because it doesn't exist. Try creating \ |
1390 | + it first." |
1391 | + ), |
1392 | Uidnext(uid) => write!(fmt, "Next UID value is {}", uid), |
1393 | Uidvalidity(uid) => write!(fmt, "Next UIDVALIDITY value is {}", uid), |
1394 | Unseen(uid) => write!(fmt, "First message without the \\Seen flag is {}", uid), |
1395 | @@ -265,7 +301,8 @@ impl TryFrom<&'_ [u8]> for ImapResponse { |
1396 | )) |
1397 | })? + 1..] |
1398 | .trim(); |
1399 | - // M12 NO [CANNOT] Invalid mailbox name: Name must not have \'/\' characters (0.000 + 0.098 + 0.097 secs).\r\n |
1400 | + // M12 NO [CANNOT] Invalid mailbox name: Name must not have \'/\' characters |
1401 | + // (0.000 + 0.098 + 0.097 secs).\r\n |
1402 | if val.ends_with(b" secs).") { |
1403 | val = &val[..val.rfind(b"(").ok_or_else(|| { |
1404 | Error::new(format!( |
1405 | @@ -432,8 +469,8 @@ fn test_imap_line_iterator() { |
1406 | */ |
1407 | |
1408 | /* |
1409 | - * LIST (\HasNoChildren) "." INBOX.Sent |
1410 | - * LIST (\HasChildren) "." INBOX |
1411 | + * LIST (\HasNoChildren) "." INBOX.Sent |
1412 | + * LIST (\HasChildren) "." INBOX |
1413 | */ |
1414 | |
1415 | pub fn list_mailbox_result(input: &[u8]) -> IResult<&[u8], ImapMailbox> { |
1416 | @@ -604,7 +641,8 @@ pub fn fetch_response(input: &[u8]) -> ImapParseResult<FetchResponse<'_>> { |
1417 | i += (input.len() - i - rest.len()) + 1; |
1418 | } else { |
1419 | return debug!(Err(Error::new(format!( |
1420 | - "Unexpected input while parsing UID FETCH response. Could not parse FLAGS: {:.40}.", |
1421 | + "Unexpected input while parsing UID FETCH response. Could not parse FLAGS: \ |
1422 | + {:.40}.", |
1423 | String::from_utf8_lossy(&input[i..]) |
1424 | )))); |
1425 | } |
1426 | @@ -639,7 +677,8 @@ pub fn fetch_response(input: &[u8]) -> ImapParseResult<FetchResponse<'_>> { |
1427 | i += input.len() - i - rest.len(); |
1428 | } else { |
1429 | return debug!(Err(Error::new(format!( |
1430 | - "Unexpected input while parsing UID FETCH response. Could not parse RFC822: {:.40}", |
1431 | + "Unexpected input while parsing UID FETCH response. Could not parse RFC822: \ |
1432 | + {:.40}", |
1433 | String::from_utf8_lossy(&input[i..]) |
1434 | )))); |
1435 | } |
1436 | @@ -650,7 +689,8 @@ pub fn fetch_response(input: &[u8]) -> ImapParseResult<FetchResponse<'_>> { |
1437 | i += input.len() - i - rest.len(); |
1438 | } else { |
1439 | return debug!(Err(Error::new(format!( |
1440 | - "Unexpected input while parsing UID FETCH response. Could not parse ENVELOPE: {:.40}", |
1441 | + "Unexpected input while parsing UID FETCH response. Could not parse ENVELOPE: \ |
1442 | + {:.40}", |
1443 | String::from_utf8_lossy(&input[i..]) |
1444 | )))); |
1445 | } |
1446 | @@ -672,7 +712,8 @@ pub fn fetch_response(input: &[u8]) -> ImapParseResult<FetchResponse<'_>> { |
1447 | i += input.len() - i - rest.len(); |
1448 | } else { |
1449 | return debug!(Err(Error::new(format!( |
1450 | - "Unexpected input while parsing UID FETCH response. Could not parse BODY[HEADER.FIELDS (REFERENCES)]: {:.40}", |
1451 | + "Unexpected input while parsing UID FETCH response. Could not parse \ |
1452 | + BODY[HEADER.FIELDS (REFERENCES)]: {:.40}", |
1453 | String::from_utf8_lossy(&input[i..]) |
1454 | )))); |
1455 | } |
1456 | @@ -688,7 +729,8 @@ pub fn fetch_response(input: &[u8]) -> ImapParseResult<FetchResponse<'_>> { |
1457 | i += input.len() - i - rest.len(); |
1458 | } else { |
1459 | return debug!(Err(Error::new(format!( |
1460 | - "Unexpected input while parsing UID FETCH response. Could not parse BODY[HEADER.FIELDS (\"REFERENCES\"): {:.40}", |
1461 | + "Unexpected input while parsing UID FETCH response. Could not parse \ |
1462 | + BODY[HEADER.FIELDS (\"REFERENCES\"): {:.40}", |
1463 | String::from_utf8_lossy(&input[i..]) |
1464 | )))); |
1465 | } |
1466 | @@ -815,9 +857,15 @@ macro_rules! flags_to_imap_list { |
1467 | /* Input Example: |
1468 | * ============== |
1469 | * |
1470 | - * "M0 OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE IDLE SORT SORT=DISPLAY THREAD=REFERENCES THREAD=REFS THREAD=ORDEREDSUBJECT MULTIAPPEND URL-PARTIAL CATENATE UNSELECT CHILDREN NAMESPACE UIDPLUS LIST-EXTENDED I18NLEVEL=1 CONDSTORE QRESYNC ESEARCH ESORT SEARCHRES WITHIN CONTEXT=SEARCH LIST-STATUS BINARY MOVE SPECIAL-USE] Logged in\r\n" |
1471 | - * "* CAPABILITY IMAP4rev1 UNSELECT IDLE NAMESPACE QUOTA ID XLIST CHILDREN X-GM-EXT-1 XYZZY SASL-IR AUTH=XOAUTH2 AUTH=PLAIN AUTH=PLAIN-CLIENT TOKEN AUTH=OAUTHBEARER AUTH=XOAUTH\r\n" |
1472 | - * "* CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE IDLE AUTH=PLAIN\r\n" |
1473 | + * "M0 OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE |
1474 | + * IDLE SORT SORT=DISPLAY THREAD=REFERENCES THREAD=REFS THREAD=ORDEREDSUBJECT |
1475 | + * MULTIAPPEND URL-PARTIAL CATENATE UNSELECT CHILDREN NAMESPACE UIDPLUS |
1476 | + * LIST-EXTENDED I18NLEVEL=1 CONDSTORE QRESYNC ESEARCH ESORT SEARCHRES WITHIN |
1477 | + * CONTEXT=SEARCH LIST-STATUS BINARY MOVE SPECIAL-USE] Logged in\r\n" |
1478 | + * "* CAPABILITY IMAP4rev1 UNSELECT IDLE NAMESPACE QUOTA ID XLIST CHILDREN |
1479 | + * X-GM-EXT-1 XYZZY SASL-IR AUTH=XOAUTH2 AUTH=PLAIN AUTH=PLAIN-CLIENT TOKEN |
1480 | + * AUTH=OAUTHBEARER AUTH=XOAUTH\r\n" "* CAPABILITY IMAP4rev1 LITERAL+ |
1481 | + * SASL-IR LOGIN-REFERRALS ID ENABLE IDLE AUTH=PLAIN\r\n" |
1482 | */ |
1483 | |
1484 | pub fn capabilities(input: &[u8]) -> IResult<&[u8], Vec<&[u8]>> { |
1485 | @@ -829,7 +877,8 @@ pub fn capabilities(input: &[u8]) -> IResult<&[u8], Vec<&[u8]>> { |
1486 | Ok((input, ret)) |
1487 | } |
1488 | |
1489 | - /// This enum represents the server's untagged responses detailed in `7. Server Responses` of RFC 3501 INTERNET MESSAGE ACCESS PROTOCOL - VERSION 4rev1 |
1490 | + /// This enum represents the server's untagged responses detailed in `7. Server |
1491 | + /// Responses` of RFC 3501 INTERNET MESSAGE ACCESS PROTOCOL - VERSION 4rev1 |
1492 | #[derive(Debug, PartialEq)] |
1493 | pub enum UntaggedResponse<'s> { |
1494 | /// ```text |
1495 | @@ -1090,7 +1139,8 @@ pub struct SelectResponse { |
1496 | /* |
1497 | * |
1498 | * * FLAGS (\Answered \Flagged \Deleted \Seen \Draft) |
1499 | - * * OK [PERMANENTFLAGS (\Answered \Flagged \Deleted \Seen \Draft \*)] Flags permitted. |
1500 | + * * OK [PERMANENTFLAGS (\Answered \Flagged \Deleted \Seen \Draft \*)] Flags |
1501 | + * permitted. |
1502 | * * 45 EXISTS |
1503 | * * 0 RECENT |
1504 | * * OK [UNSEEN 16] First unseen. |
1505 | @@ -1283,30 +1333,30 @@ pub fn byte_flags(input: &[u8]) -> IResult<&[u8], (Flag, Vec<String>)> { |
1506 | } |
1507 | |
1508 | /* |
1509 | - * The fields of the envelope structure are in the following |
1510 | - * order: date, subject, from, sender, reply-to, to, cc, bcc, |
1511 | - * in-reply-to, and message-id. The date, subject, in-reply-to, |
1512 | - * and message-id fields are strings. The from, sender, reply-to, |
1513 | - * to, cc, and bcc fields are parenthesized lists of address |
1514 | - * structures. |
1515 | - * An address structure is a parenthesized list that describes an |
1516 | - * electronic mail address. The fields of an address structure |
1517 | - * are in the following order: personal name, [SMTP] |
1518 | - * at-domain-list (source route), mailbox name, and host name. |
1519 | - */ |
1520 | + * The fields of the envelope structure are in the following |
1521 | + * order: date, subject, from, sender, reply-to, to, cc, bcc, |
1522 | + * in-reply-to, and message-id. The date, subject, in-reply-to, |
1523 | + * and message-id fields are strings. The from, sender, reply-to, |
1524 | + * to, cc, and bcc fields are parenthesized lists of address |
1525 | + * structures. |
1526 | + * An address structure is a parenthesized list that describes an |
1527 | + * electronic mail address. The fields of an address structure |
1528 | + * are in the following order: personal name, [SMTP] |
1529 | + * at-domain-list (source route), mailbox name, and host name. |
1530 | + */ |
1531 | |
1532 | /* |
1533 | - * * 12 FETCH (FLAGS (\Seen) INTERNALDATE "17-Jul-1996 02:44:25 -0700" |
1534 | - * RFC822.SIZE 4286 ENVELOPE ("Wed, 17 Jul 1996 02:23:25 -0700 (PDT)" |
1535 | - * "IMAP4rev1 WG mtg summary and minutes" |
1536 | - * (("Terry Gray" NIL "gray" "cac.washington.edu")) |
1537 | - * (("Terry Gray" NIL "gray" "cac.washington.edu")) |
1538 | - * (("Terry Gray" NIL "gray" "cac.washington.edu")) |
1539 | - * ((NIL NIL "imap" "cac.washington.edu")) |
1540 | - * ((NIL NIL "minutes" "CNRI.Reston.VA.US") |
1541 | - * ("John Klensin" NIL "KLENSIN" "MIT.EDU")) NIL NIL |
1542 | - * "<B27397-0100000@cac.washington.edu>") |
1543 | - */ |
1544 | + * * 12 FETCH (FLAGS (\Seen) INTERNALDATE "17-Jul-1996 02:44:25 -0700" |
1545 | + * RFC822.SIZE 4286 ENVELOPE ("Wed, 17 Jul 1996 02:23:25 -0700 (PDT)" |
1546 | + * "IMAP4rev1 WG mtg summary and minutes" |
1547 | + * (("Terry Gray" NIL "gray" "cac.washington.edu")) |
1548 | + * (("Terry Gray" NIL "gray" "cac.washington.edu")) |
1549 | + * (("Terry Gray" NIL "gray" "cac.washington.edu")) |
1550 | + * ((NIL NIL "imap" "cac.washington.edu")) |
1551 | + * ((NIL NIL "minutes" "CNRI.Reston.VA.US") |
1552 | + * ("John Klensin" NIL "KLENSIN" "MIT.EDU")) NIL NIL |
1553 | + * "<B27397-0100000@cac.washington.edu>") |
1554 | + */ |
1555 | |
1556 | pub fn envelope(input: &[u8]) -> IResult<&[u8], Envelope> { |
1557 | let (input, _) = tag("(")(input)?; |
1558 | @@ -1466,7 +1516,8 @@ pub fn envelope_address(input: &[u8]) -> IResult<&[u8], Address> { |
1559 | )) |
1560 | } |
1561 | |
1562 | - // Read a literal ie a byte sequence prefixed with a tag containing its length delimited in {}s |
1563 | + // Read a literal ie a byte sequence prefixed with a tag containing its length |
1564 | + // delimited in {}s |
1565 | pub fn literal(input: &[u8]) -> IResult<&[u8], &[u8]> { |
1566 | length_data(delimited( |
1567 | tag("{"), |
1568 | @@ -1694,7 +1745,8 @@ pub fn string_token(input: &[u8]) -> IResult<&[u8], &[u8]> { |
1569 | // ASTRING-CHAR = ATOM-CHAR / resp-specials |
1570 | // atom = 1*ATOM-CHAR |
1571 | // ATOM-CHAR = <any CHAR except atom-specials> |
1572 | - // atom-specials = "(" / ")" / "{" / SP / CTL / list-wildcards / quoted-specials / resp-specials |
1573 | + // atom-specials = "(" / ")" / "{" / SP / CTL / list-wildcards / quoted-specials |
1574 | + // / resp-specials |
1575 | fn astring_char(input: &[u8]) -> IResult<&[u8], &[u8]> { |
1576 | let (rest, chars) = many1(atom_char)(input)?; |
1577 | Ok((rest, &input[0..chars.len()])) |
1578 | diff --git a/melib/src/backends/imap/untagged.rs b/melib/src/backends/imap/untagged.rs |
1579 | index 5f80beb..89b4df5 100644 |
1580 | --- a/melib/src/backends/imap/untagged.rs |
1581 | +++ b/melib/src/backends/imap/untagged.rs |
1582 | @@ -19,18 +19,21 @@ |
1583 | * along with meli. If not, see <http://www.gnu.org/licenses/>. |
1584 | */ |
1585 | |
1586 | + use std::convert::TryInto; |
1587 | + |
1588 | use super::{ImapConnection, MailboxSelection, UID}; |
1589 | - use crate::backends::imap::protocol_parser::{ |
1590 | - generate_envelope_hash, FetchResponse, ImapLineSplit, RequiredResponses, UntaggedResponse, |
1591 | - }; |
1592 | - use crate::backends::BackendMailbox; |
1593 | - use crate::backends::{ |
1594 | - RefreshEvent, |
1595 | - RefreshEventKind::{self, *}, |
1596 | - TagHash, |
1597 | + use crate::{ |
1598 | + backends::{ |
1599 | + imap::protocol_parser::{ |
1600 | + generate_envelope_hash, FetchResponse, ImapLineSplit, RequiredResponses, |
1601 | + UntaggedResponse, |
1602 | + }, |
1603 | + BackendMailbox, RefreshEvent, |
1604 | + RefreshEventKind::{self, *}, |
1605 | + TagHash, |
1606 | + }, |
1607 | + error::*, |
1608 | }; |
1609 | - use crate::error::*; |
1610 | - use std::convert::TryInto; |
1611 | |
1612 | impl ImapConnection { |
1613 | pub async fn process_untagged(&mut self, line: &[u8]) -> Result<bool> { |
1614 | @@ -323,7 +326,11 @@ impl ImapConnection { |
1615 | accum.push(','); |
1616 | accum.push_str(to_str!(ms).trim()); |
1617 | } |
1618 | - format!("UID FETCH {} (UID FLAGS ENVELOPE BODY.PEEK[HEADER.FIELDS (REFERENCES)] BODYSTRUCTURE)", accum) |
1619 | + format!( |
1620 | + "UID FETCH {} (UID FLAGS ENVELOPE BODY.PEEK[HEADER.FIELDS \ |
1621 | + (REFERENCES)] BODYSTRUCTURE)", |
1622 | + accum |
1623 | + ) |
1624 | }; |
1625 | try_fail!( |
1626 | mailbox_hash, |
1627 | diff --git a/melib/src/backends/imap/watch.rs b/melib/src/backends/imap/watch.rs |
1628 | index 46ae2a2..61f3704 100644 |
1629 | --- a/melib/src/backends/imap/watch.rs |
1630 | +++ b/melib/src/backends/imap/watch.rs |
1631 | @@ -18,9 +18,10 @@ |
1632 | * You should have received a copy of the GNU General Public License |
1633 | * along with meli. If not, see <http://www.gnu.org/licenses/>. |
1634 | */ |
1635 | + use std::sync::Arc; |
1636 | + |
1637 | use super::*; |
1638 | use crate::backends::SpecialUsageMailbox; |
1639 | - use std::sync::Arc; |
1640 | |
1641 | /// Arguments for IMAP watching functions |
1642 | pub struct ImapWatchKit { |
1643 | @@ -52,8 +53,8 @@ pub async fn poll_with_examine(kit: ImapWatchKit) -> Result<()> { |
1644 | |
1645 | pub async fn idle(kit: ImapWatchKit) -> Result<()> { |
1646 | debug!("IDLE"); |
1647 | - /* IDLE only watches the connection's selected mailbox. We will IDLE on INBOX and every ~5 |
1648 | - * minutes wake up and poll the others */ |
1649 | + /* IDLE only watches the connection's selected mailbox. We will IDLE on INBOX |
1650 | + * and every ~5 minutes wake up and poll the others */ |
1651 | let ImapWatchKit { |
1652 | mut conn, |
1653 | main_conn, |
1654 | @@ -70,7 +71,10 @@ pub async fn idle(kit: ImapWatchKit) -> Result<()> { |
1655 | { |
1656 | Some(mailbox) => mailbox, |
1657 | None => { |
1658 | - return Err(Error::new("INBOX mailbox not found in local mailbox index. meli may have not parsed the IMAP mailboxes correctly")); |
1659 | + return Err(Error::new( |
1660 | + "INBOX mailbox not found in local mailbox index. meli may have not parsed the \ |
1661 | + IMAP mailboxes correctly", |
1662 | + )); |
1663 | } |
1664 | }; |
1665 | let mailbox_hash = mailbox.hash(); |
1666 | @@ -342,7 +346,8 @@ pub async fn examine_updates( |
1667 | } else if select_response.exists > mailbox.exists.lock().unwrap().len() { |
1668 | conn.send_command( |
1669 | format!( |
1670 | - "FETCH {}:* (UID FLAGS ENVELOPE BODY.PEEK[HEADER.FIELDS (REFERENCES)] BODYSTRUCTURE)", |
1671 | + "FETCH {}:* (UID FLAGS ENVELOPE BODY.PEEK[HEADER.FIELDS (REFERENCES)] \ |
1672 | + BODYSTRUCTURE)", |
1673 | std::cmp::max(mailbox.exists.lock().unwrap().len(), 1) |
1674 | ) |
1675 | .as_bytes(), |
1676 | diff --git a/melib/src/backends/jmap.rs b/melib/src/backends/jmap.rs |
1677 | index 83427f7..54efcab 100644 |
1678 | --- a/melib/src/backends/jmap.rs |
1679 | +++ b/melib/src/backends/jmap.rs |
1680 | @@ -19,21 +19,26 @@ |
1681 | * along with meli. If not, see <http://www.gnu.org/licenses/>. |
1682 | */ |
1683 | |
1684 | - use crate::backends::*; |
1685 | - use crate::conf::AccountSettings; |
1686 | - use crate::connections::timeout; |
1687 | - use crate::email::*; |
1688 | - use crate::error::{Error, Result}; |
1689 | - use crate::Collection; |
1690 | + use std::{ |
1691 | + collections::{HashMap, HashSet}, |
1692 | + convert::TryFrom, |
1693 | + str::FromStr, |
1694 | + sync::{Arc, Mutex, RwLock}, |
1695 | + time::{Duration, Instant}, |
1696 | + }; |
1697 | + |
1698 | use futures::lock::Mutex as FutureMutex; |
1699 | - use isahc::config::RedirectPolicy; |
1700 | - use isahc::{AsyncReadResponseExt, HttpClient}; |
1701 | + use isahc::{config::RedirectPolicy, AsyncReadResponseExt, HttpClient}; |
1702 | use serde_json::Value; |
1703 | - use std::collections::{HashMap, HashSet}; |
1704 | - use std::convert::TryFrom; |
1705 | - use std::str::FromStr; |
1706 | - use std::sync::{Arc, Mutex, RwLock}; |
1707 | - use std::time::{Duration, Instant}; |
1708 | + |
1709 | + use crate::{ |
1710 | + backends::*, |
1711 | + conf::AccountSettings, |
1712 | + connections::timeout, |
1713 | + email::*, |
1714 | + error::{Error, Result}, |
1715 | + Collection, |
1716 | + }; |
1717 | |
1718 | #[macro_export] |
1719 | macro_rules! _impl { |
1720 | @@ -131,7 +136,9 @@ impl JmapServerConf { |
1721 | ^ s.extra.contains_key("server_password")) |
1722 | { |
1723 | return Err(Error::new(format!( |
1724 | - "({}) `use_token` use requires either the `server_password_command` set with a command that returns an Bearer token of your account, or `server_password` with the API Bearer token as a string. Consult documentation for guidance.", |
1725 | + "({}) `use_token` use requires either the `server_password_command` set with a \ |
1726 | + command that returns an Bearer token of your account, or `server_password` with \ |
1727 | + the API Bearer token as a string. Consult documentation for guidance.", |
1728 | s.name, |
1729 | ))); |
1730 | } |
1731 | @@ -416,7 +423,13 @@ impl MailBackend for JmapType { |
1732 | |
1733 | let upload_response: UploadResponse = match serde_json::from_str(&res_text) { |
1734 | Err(err) => { |
1735 | - let err = Error::new(format!("BUG: Could not deserialize {} server JSON response properly, please report this!\nReply from server: {}", &conn.server_conf.server_url, &res_text)).set_source(Some(Arc::new(err))).set_kind(ErrorKind::Bug); |
1736 | + let err = Error::new(format!( |
1737 | + "BUG: Could not deserialize {} server JSON response properly, please \ |
1738 | + report this!\nReply from server: {}", |
1739 | + &conn.server_conf.server_url, &res_text |
1740 | + )) |
1741 | + .set_source(Some(Arc::new(err))) |
1742 | + .set_kind(ErrorKind::Bug); |
1743 | *conn.store.online_status.lock().await = (Instant::now(), Err(err.clone())); |
1744 | return Err(err); |
1745 | } |
1746 | @@ -447,7 +460,13 @@ impl MailBackend for JmapType { |
1747 | |
1748 | let mut v: MethodResponse = match serde_json::from_str(&res_text) { |
1749 | Err(err) => { |
1750 | - let err = Error::new(format!("BUG: Could not deserialize {} server JSON response properly, please report this!\nReply from server: {}", &conn.server_conf.server_url, &res_text)).set_source(Some(Arc::new(err))).set_kind(ErrorKind::Bug); |
1751 | + let err = Error::new(format!( |
1752 | + "BUG: Could not deserialize {} server JSON response properly, please \ |
1753 | + report this!\nReply from server: {}", |
1754 | + &conn.server_conf.server_url, &res_text |
1755 | + )) |
1756 | + .set_source(Some(Arc::new(err))) |
1757 | + .set_kind(ErrorKind::Bug); |
1758 | *conn.store.online_status.lock().await = (Instant::now(), Err(err.clone())); |
1759 | return Err(err); |
1760 | } |
1761 | @@ -528,7 +547,13 @@ impl MailBackend for JmapType { |
1762 | let res_text = res.text().await?; |
1763 | let mut v: MethodResponse = match serde_json::from_str(&res_text) { |
1764 | Err(err) => { |
1765 | - let err = Error::new(format!("BUG: Could not deserialize {} server JSON response properly, please report this!\nReply from server: {}", &conn.server_conf.server_url, &res_text)).set_source(Some(Arc::new(err))).set_kind(ErrorKind::Bug); |
1766 | + let err = Error::new(format!( |
1767 | + "BUG: Could not deserialize {} server JSON response properly, please \ |
1768 | + report this!\nReply from server: {}", |
1769 | + &conn.server_conf.server_url, &res_text |
1770 | + )) |
1771 | + .set_source(Some(Arc::new(err))) |
1772 | + .set_kind(ErrorKind::Bug); |
1773 | *conn.store.online_status.lock().await = (Instant::now(), Err(err.clone())); |
1774 | return Err(err); |
1775 | } |
1776 | @@ -664,7 +689,13 @@ impl MailBackend for JmapType { |
1777 | |
1778 | let mut v: MethodResponse = match serde_json::from_str(&res_text) { |
1779 | Err(err) => { |
1780 | - let err = Error::new(format!("BUG: Could not deserialize {} server JSON response properly, please report this!\nReply from server: {}", &conn.server_conf.server_url, &res_text)).set_source(Some(Arc::new(err))).set_kind(ErrorKind::Bug); |
1781 | + let err = Error::new(format!( |
1782 | + "BUG: Could not deserialize {} server JSON response properly, please \ |
1783 | + report this!\nReply from server: {}", |
1784 | + &conn.server_conf.server_url, &res_text |
1785 | + )) |
1786 | + .set_source(Some(Arc::new(err))) |
1787 | + .set_kind(ErrorKind::Bug); |
1788 | *conn.store.online_status.lock().await = (Instant::now(), Err(err.clone())); |
1789 | return Err(err); |
1790 | } |
1791 | @@ -771,12 +802,22 @@ impl MailBackend for JmapType { |
1792 | |
1793 | let res_text = res.text().await?; |
1794 | /* |
1795 | - *{"methodResponses":[["Email/set",{"notUpdated":null,"notDestroyed":null,"oldState":"86","newState":"87","accountId":"u148940c7","updated":{"M045926eed54b11423918f392":{"id":"M045926eed54b11423918f392"}},"created":null,"destroyed":null,"notCreated":null},"m3"]],"sessionState":"cyrus-0;p-5;vfs-0"} |
1796 | + *{"methodResponses":[["Email/set",{"notUpdated":null,"notDestroyed":null," |
1797 | + * oldState":"86","newState":"87","accountId":"u148940c7","updated":{" |
1798 | + * M045926eed54b11423918f392":{"id":"M045926eed54b11423918f392"}},"created": |
1799 | + * null,"destroyed":null,"notCreated":null},"m3"]],"sessionState":"cyrus-0; |
1800 | + * p-5;vfs-0"} |
1801 | */ |
1802 | //debug!("res_text = {}", &res_text); |
1803 | let mut v: MethodResponse = match serde_json::from_str(&res_text) { |
1804 | Err(err) => { |
1805 | - let err = Error::new(format!("BUG: Could not deserialize {} server JSON response properly, please report this!\nReply from server: {}", &conn.server_conf.server_url, &res_text)).set_source(Some(Arc::new(err))).set_kind(ErrorKind::Bug); |
1806 | + let err = Error::new(format!( |
1807 | + "BUG: Could not deserialize {} server JSON response properly, please \ |
1808 | + report this!\nReply from server: {}", |
1809 | + &conn.server_conf.server_url, &res_text |
1810 | + )) |
1811 | + .set_source(Some(Arc::new(err))) |
1812 | + .set_kind(ErrorKind::Bug); |
1813 | *conn.store.online_status.lock().await = (Instant::now(), Err(err.clone())); |
1814 | return Err(err); |
1815 | } |
1816 | diff --git a/melib/src/backends/jmap/connection.rs b/melib/src/backends/jmap/connection.rs |
1817 | index fd47d2d..795fdaa 100644 |
1818 | --- a/melib/src/backends/jmap/connection.rs |
1819 | +++ b/melib/src/backends/jmap/connection.rs |
1820 | @@ -19,10 +19,12 @@ |
1821 | * along with meli. If not, see <http://www.gnu.org/licenses/>. |
1822 | */ |
1823 | |
1824 | - use super::*; |
1825 | - use isahc::config::Configurable; |
1826 | use std::sync::MutexGuard; |
1827 | |
1828 | + use isahc::config::Configurable; |
1829 | + |
1830 | + use super::*; |
1831 | + |
1832 | #[derive(Debug)] |
1833 | pub struct JmapConnection { |
1834 | pub session: Arc<Mutex<JmapSession>>, |
1835 | @@ -73,11 +75,22 @@ impl JmapConnection { |
1836 | let mut jmap_session_resource_url = self.server_conf.server_url.to_string(); |
1837 | jmap_session_resource_url.push_str("/.well-known/jmap"); |
1838 | |
1839 | - let mut req = self.client.get_async(&jmap_session_resource_url).await.map_err(|err| { |
1840 | - let err = Error::new(format!("Could not connect to JMAP server endpoint for {}. Is your server url setting correct? (i.e. \"jmap.mailserver.org\") (Note: only session resource discovery via /.well-known/jmap is supported. DNS SRV records are not suppported.)\nError connecting to server: {}", &self.server_conf.server_url, &err)).set_source(Some(Arc::new(err))); |
1841 | + let mut req = self |
1842 | + .client |
1843 | + .get_async(&jmap_session_resource_url) |
1844 | + .await |
1845 | + .map_err(|err| { |
1846 | + let err = Error::new(format!( |
1847 | + "Could not connect to JMAP server endpoint for {}. Is your server url setting \ |
1848 | + correct? (i.e. \"jmap.mailserver.org\") (Note: only session resource \ |
1849 | + discovery via /.well-known/jmap is supported. DNS SRV records are not \ |
1850 | + suppported.)\nError connecting to server: {}", |
1851 | + &self.server_conf.server_url, &err |
1852 | + )) |
1853 | + .set_source(Some(Arc::new(err))); |
1854 | //*self.store.online_status.lock().await = (Instant::now(), Err(err.clone())); |
1855 | err |
1856 | - })?; |
1857 | + })?; |
1858 | |
1859 | if !req.status().is_success() { |
1860 | let kind: crate::error::NetworkErrorKind = req.status().into(); |
1861 | @@ -95,7 +108,14 @@ impl JmapConnection { |
1862 | |
1863 | let session: JmapSession = match serde_json::from_str(&res_text) { |
1864 | Err(err) => { |
1865 | - let err = Error::new(format!("Could not connect to JMAP server endpoint for {}. Is your server url setting correct? (i.e. \"jmap.mailserver.org\") (Note: only session resource discovery via /.well-known/jmap is supported. DNS SRV records are not suppported.)\nReply from server: {}", &self.server_conf.server_url, &res_text)).set_source(Some(Arc::new(err))); |
1866 | + let err = Error::new(format!( |
1867 | + "Could not connect to JMAP server endpoint for {}. Is your server url setting \ |
1868 | + correct? (i.e. \"jmap.mailserver.org\") (Note: only session resource \ |
1869 | + discovery via /.well-known/jmap is supported. DNS SRV records are not \ |
1870 | + suppported.)\nReply from server: {}", |
1871 | + &self.server_conf.server_url, &res_text |
1872 | + )) |
1873 | + .set_source(Some(Arc::new(err))); |
1874 | *self.store.online_status.lock().await = (Instant::now(), Err(err.clone())); |
1875 | return Err(err); |
1876 | } |
1877 | @@ -105,7 +125,17 @@ impl JmapConnection { |
1878 | .capabilities |
1879 | .contains_key("urn:ietf:params:jmap:core") |
1880 | { |
1881 | - let err = Error::new(format!("Server {} did not return JMAP Core capability (urn:ietf:params:jmap:core). Returned capabilities were: {}", &self.server_conf.server_url, session.capabilities.keys().map(String::as_str).collect::<Vec<&str>>().join(", "))); |
1882 | + let err = Error::new(format!( |
1883 | + "Server {} did not return JMAP Core capability (urn:ietf:params:jmap:core). \ |
1884 | + Returned capabilities were: {}", |
1885 | + &self.server_conf.server_url, |
1886 | + session |
1887 | + .capabilities |
1888 | + .keys() |
1889 | + .map(String::as_str) |
1890 | + .collect::<Vec<&str>>() |
1891 | + .join(", ") |
1892 | + )); |
1893 | *self.store.online_status.lock().await = (Instant::now(), Err(err.clone())); |
1894 | return Err(err); |
1895 | } |
1896 | @@ -113,7 +143,17 @@ impl JmapConnection { |
1897 | .capabilities |
1898 | .contains_key("urn:ietf:params:jmap:mail") |
1899 | { |
1900 | - let err = Error::new(format!("Server {} does not support JMAP Mail capability (urn:ietf:params:jmap:mail). Returned capabilities were: {}", &self.server_conf.server_url, session.capabilities.keys().map(String::as_str).collect::<Vec<&str>>().join(", "))); |
1901 | + let err = Error::new(format!( |
1902 | + "Server {} does not support JMAP Mail capability (urn:ietf:params:jmap:mail). \ |
1903 | + Returned capabilities were: {}", |
1904 | + &self.server_conf.server_url, |
1905 | + session |
1906 | + .capabilities |
1907 | + .keys() |
1908 | + .map(String::as_str) |
1909 | + .collect::<Vec<&str>>() |
1910 | + .join(", ") |
1911 | + )); |
1912 | *self.store.online_status.lock().await = (Instant::now(), Err(err.clone())); |
1913 | return Err(err); |
1914 | } |
1915 | @@ -207,7 +247,13 @@ impl JmapConnection { |
1916 | debug!(&res_text); |
1917 | let mut v: MethodResponse = match serde_json::from_str(&res_text) { |
1918 | Err(err) => { |
1919 | - let err = Error::new(format!("BUG: Could not deserialize {} server JSON response properly, please report this!\nReply from server: {}", &self.server_conf.server_url, &res_text)).set_source(Some(Arc::new(err))).set_kind(ErrorKind::Bug); |
1920 | + let err = Error::new(format!( |
1921 | + "BUG: Could not deserialize {} server JSON response properly, please \ |
1922 | + report this!\nReply from server: {}", |
1923 | + &self.server_conf.server_url, &res_text |
1924 | + )) |
1925 | + .set_source(Some(Arc::new(err))) |
1926 | + .set_kind(ErrorKind::Bug); |
1927 | *self.store.online_status.lock().await = (Instant::now(), Err(err.clone())); |
1928 | return Err(err); |
1929 | } |
1930 | diff --git a/melib/src/backends/jmap/mailbox.rs b/melib/src/backends/jmap/mailbox.rs |
1931 | index 023fb1d..54aed08 100644 |
1932 | --- a/melib/src/backends/jmap/mailbox.rs |
1933 | +++ b/melib/src/backends/jmap/mailbox.rs |
1934 | @@ -19,9 +19,10 @@ |
1935 | * along with meli. If not, see <http://www.gnu.org/licenses/>. |
1936 | */ |
1937 | |
1938 | + use std::sync::{Arc, Mutex, RwLock}; |
1939 | + |
1940 | use super::*; |
1941 | use crate::backends::{LazyCountSet, MailboxPermissions, SpecialUsageMailbox}; |
1942 | - use std::sync::{Arc, Mutex, RwLock}; |
1943 | |
1944 | #[derive(Debug, Clone)] |
1945 | pub struct JmapMailbox { |
1946 | diff --git a/melib/src/backends/jmap/objects/email.rs b/melib/src/backends/jmap/objects/email.rs |
1947 | index 461ce48..64e050a 100644 |
1948 | --- a/melib/src/backends/jmap/objects/email.rs |
1949 | +++ b/melib/src/backends/jmap/objects/email.rs |
1950 | @@ -19,15 +19,18 @@ |
1951 | * along with meli. If not, see <http://www.gnu.org/licenses/>. |
1952 | */ |
1953 | |
1954 | - use super::*; |
1955 | - use crate::backends::jmap::rfc8620::bool_false; |
1956 | - use crate::email::address::{Address, MailboxAddress}; |
1957 | use core::marker::PhantomData; |
1958 | - use serde::de::{Deserialize, Deserializer}; |
1959 | - use serde_json::value::RawValue; |
1960 | - use serde_json::Value; |
1961 | use std::collections::HashMap; |
1962 | |
1963 | + use serde::de::{Deserialize, Deserializer}; |
1964 | + use serde_json::{value::RawValue, Value}; |
1965 | + |
1966 | + use super::*; |
1967 | + use crate::{ |
1968 | + backends::jmap::rfc8620::bool_false, |
1969 | + email::address::{Address, MailboxAddress}, |
1970 | + }; |
1971 | + |
1972 | mod import; |
1973 | pub use import::*; |
1974 | |
1975 | @@ -83,14 +86,13 @@ impl Id<EmailObject> { |
1976 | // first character changed from "\" in IMAP to "$" in JMAP and have |
1977 | // particular semantic meaning: |
1978 | // |
1979 | - // * "$draft": The Email is a draft the user is composing. |
1980 | + // * "$draft": The Email is a draft the user is composing. |
1981 | // |
1982 | - // * "$seen": The Email has been read. |
1983 | + // * "$seen": The Email has been read. |
1984 | // |
1985 | - // * "$flagged": The Email has been flagged for urgent/special |
1986 | - // attention. |
1987 | + // * "$flagged": The Email has been flagged for urgent/special attention. |
1988 | // |
1989 | - // * "$answered": The Email has been replied to. |
1990 | + // * "$answered": The Email has been replied to. |
1991 | // |
1992 | // The IMAP "\Recent" keyword is not exposed via JMAP. The IMAP |
1993 | // "\Deleted" keyword is also not present: IMAP uses a delete+expunge |
1994 | @@ -115,19 +117,19 @@ impl Id<EmailObject> { |
1995 | // keywords in common use. New keywords may be established here in |
1996 | // the future. In particular, note: |
1997 | // |
1998 | - // * "$forwarded": The Email has been forwarded. |
1999 | + // * "$forwarded": The Email has been forwarded. |
2000 | // |
2001 | - // * "$phishing": The Email is highly likely to be phishing. |
2002 | - // Clients SHOULD warn users to take care when viewing this Email |
2003 | - // and disable links and attachments. |
2004 | + // * "$phishing": The Email is highly likely to be phishing. Clients SHOULD |
2005 | + // warn users to take care when viewing this Email and disable links and |
2006 | + // attachments. |
2007 | // |
2008 | - // * "$junk": The Email is definitely spam. Clients SHOULD set this |
2009 | - // flag when users report spam to help train automated spam- |
2010 | - // detection systems. |
2011 | + // * "$junk": The Email is definitely spam. Clients SHOULD set this flag |
2012 | + // when users report spam to help train automated spam- detection |
2013 | + // systems. |
2014 | // |
2015 | - // * "$notjunk": The Email is definitely not spam. Clients SHOULD |
2016 | - // set this flag when users indicate an Email is legitimate, to |
2017 | - // help train automated spam-detection systems. |
2018 | + // * "$notjunk": The Email is definitely not spam. Clients SHOULD set this |
2019 | + // flag when users indicate an Email is legitimate, to help train |
2020 | + // automated spam-detection systems. |
2021 | // |
2022 | // o size: "UnsignedInt" (immutable; server-set) |
2023 | // |
2024 | @@ -586,8 +588,10 @@ impl From<crate::search::Query> for Filter<EmailFilterCondition, EmailObject> { |
2025 | fn from(val: crate::search::Query) -> Self { |
2026 | let mut ret = Filter::Condition(EmailFilterCondition::new().into()); |
2027 | fn rec(q: &crate::search::Query, f: &mut Filter<EmailFilterCondition, EmailObject>) { |
2028 | - use crate::datetime::{timestamp_to_string, RFC3339_FMT}; |
2029 | - use crate::search::Query::*; |
2030 | + use crate::{ |
2031 | + datetime::{timestamp_to_string, RFC3339_FMT}, |
2032 | + search::Query::*, |
2033 | + }; |
2034 | match q { |
2035 | Subject(t) => { |
2036 | *f = Filter::Condition(EmailFilterCondition::new().subject(t.clone()).into()); |
2037 | @@ -849,8 +853,16 @@ pub struct EmailQueryChangesResponse { |
2038 | impl std::convert::TryFrom<&RawValue> for EmailQueryChangesResponse { |
2039 | type Error = crate::error::Error; |
2040 | fn try_from(t: &RawValue) -> Result<EmailQueryChangesResponse> { |
2041 | - let res: (String, EmailQueryChangesResponse, String) = |
2042 | - serde_json::from_str(t.get()).map_err(|err| crate::error::Error::new(format!("BUG: Could not deserialize server JSON response properly, please report this!\nReply from server: {}", &t)).set_source(Some(Arc::new(err))).set_kind(ErrorKind::Bug))?; |
2043 | + let res: (String, EmailQueryChangesResponse, String) = serde_json::from_str(t.get()) |
2044 | + .map_err(|err| { |
2045 | + crate::error::Error::new(format!( |
2046 | + "BUG: Could not deserialize server JSON response properly, please report \ |
2047 | + this!\nReply from server: {}", |
2048 | + &t |
2049 | + )) |
2050 | + .set_source(Some(Arc::new(err))) |
2051 | + .set_kind(ErrorKind::Bug) |
2052 | + })?; |
2053 | assert_eq!(&res.0, "Email/queryChanges"); |
2054 | Ok(res.1) |
2055 | } |
2056 | diff --git a/melib/src/backends/jmap/objects/email/import.rs b/melib/src/backends/jmap/objects/email/import.rs |
2057 | index dffff92..475b9d3 100644 |
2058 | --- a/melib/src/backends/jmap/objects/email/import.rs |
2059 | +++ b/melib/src/backends/jmap/objects/email/import.rs |
2060 | @@ -19,9 +19,10 @@ |
2061 | * along with meli. If not, see <http://www.gnu.org/licenses/>. |
2062 | */ |
2063 | |
2064 | - use super::*; |
2065 | use serde_json::value::RawValue; |
2066 | |
2067 | + use super::*; |
2068 | + |
2069 | /// #`import` |
2070 | /// |
2071 | /// Objects of type `Foo` are imported via a call to `Foo/import`. |
2072 | @@ -31,7 +32,6 @@ use serde_json::value::RawValue; |
2073 | /// - `account_id`: "Id" |
2074 | /// |
2075 | /// The id of the account to use. |
2076 | - /// |
2077 | #[derive(Deserialize, Serialize, Debug)] |
2078 | #[serde(rename_all = "camelCase")] |
2079 | pub struct ImportCall { |
2080 | @@ -81,10 +81,9 @@ impl ImportCall { |
2081 | } |
2082 | |
2083 | _impl!( |
2084 | - /// - accountId: "Id" |
2085 | + /// - accountId: "Id" |
2086 | /// |
2087 | /// The id of the account to use. |
2088 | - /// |
2089 | account_id: Id<Account> |
2090 | ); |
2091 | _impl!(if_in_state: Option<State<EmailObject>>); |
2092 | @@ -123,9 +122,10 @@ pub enum ImportError { |
2093 | AlreadyExists { |
2094 | description: Option<String>, |
2095 | /// An "existingId" property of type "Id" MUST be included on |
2096 | - ///the SetError object with the id of the existing Email. If duplicates |
2097 | - ///are allowed, the newly created Email object MUST have a separate id |
2098 | - ///and independent mutable properties to the existing object. |
2099 | + ///the SetError object with the id of the existing Email. If |
2100 | + /// duplicates are allowed, the newly created Email object MUST |
2101 | + /// have a separate id and independent mutable properties to the |
2102 | + /// existing object. |
2103 | existing_id: Id<EmailObject>, |
2104 | }, |
2105 | ///If the "blobId", "mailboxIds", or "keywords" properties are invalid |
2106 | @@ -146,7 +146,8 @@ pub enum ImportError { |
2107 | ///different to the "blobId" on the EmailImport object. Alternatively, |
2108 | ///the server MAY reject the import with an "invalidEmail" SetError. |
2109 | InvalidEmail { description: Option<String> }, |
2110 | - ///An "ifInState" argument was supplied, and it does not match the current state. |
2111 | + ///An "ifInState" argument was supplied, and it does not match the current |
2112 | + /// state. |
2113 | StateMismatch, |
2114 | } |
2115 | |
2116 | @@ -185,7 +186,15 @@ impl std::convert::TryFrom<&RawValue> for ImportResponse { |
2117 | type Error = crate::error::Error; |
2118 | fn try_from(t: &RawValue) -> Result<ImportResponse> { |
2119 | let res: (String, ImportResponse, String) = |
2120 | - serde_json::from_str(t.get()).map_err(|err| crate::error::Error::new(format!("BUG: Could not deserialize server JSON response properly, please report this!\nReply from server: {}", &t)).set_source(Some(Arc::new(err))).set_kind(ErrorKind::Bug))?; |
2121 | + serde_json::from_str(t.get()).map_err(|err| { |
2122 | + crate::error::Error::new(format!( |
2123 | + "BUG: Could not deserialize server JSON response properly, please report \ |
2124 | + this!\nReply from server: {}", |
2125 | + &t |
2126 | + )) |
2127 | + .set_source(Some(Arc::new(err))) |
2128 | + .set_kind(ErrorKind::Bug) |
2129 | + })?; |
2130 | assert_eq!(&res.0, &ImportCall::NAME); |
2131 | Ok(res.1) |
2132 | } |
2133 | diff --git a/melib/src/backends/jmap/operations.rs b/melib/src/backends/jmap/operations.rs |
2134 | index ffe739c..b0fb0f3 100644 |
2135 | --- a/melib/src/backends/jmap/operations.rs |
2136 | +++ b/melib/src/backends/jmap/operations.rs |
2137 | @@ -19,9 +19,10 @@ |
2138 | * along with meli. If not, see <http://www.gnu.org/licenses/>. |
2139 | */ |
2140 | |
2141 | - use super::*; |
2142 | use std::sync::Arc; |
2143 | |
2144 | + use super::*; |
2145 | + |
2146 | /// `BackendOp` implementor for Imap |
2147 | #[derive(Debug, Clone)] |
2148 | pub struct JmapOp { |
2149 | diff --git a/melib/src/backends/jmap/protocol.rs b/melib/src/backends/jmap/protocol.rs |
2150 | index 264ce63..e8c2709 100644 |
2151 | --- a/melib/src/backends/jmap/protocol.rs |
2152 | +++ b/melib/src/backends/jmap/protocol.rs |
2153 | @@ -19,11 +19,12 @@ |
2154 | * along with meli. If not, see <http://www.gnu.org/licenses/>. |
2155 | */ |
2156 | |
2157 | - use super::mailbox::JmapMailbox; |
2158 | - use super::*; |
2159 | + use std::convert::{TryFrom, TryInto}; |
2160 | + |
2161 | use serde::Serialize; |
2162 | use serde_json::{json, Value}; |
2163 | - use std::convert::{TryFrom, TryInto}; |
2164 | + |
2165 | + use super::{mailbox::JmapMailbox, *}; |
2166 | |
2167 | pub type UtcDate = String; |
2168 | |
2169 | @@ -97,7 +98,13 @@ pub async fn get_mailboxes(conn: &JmapConnection) -> Result<HashMap<MailboxHash, |
2170 | let res_text = res.text().await?; |
2171 | let mut v: MethodResponse = match serde_json::from_str(&res_text) { |
2172 | Err(err) => { |
2173 | - let err = Error::new(format!("BUG: Could not deserialize {} server JSON response properly, please report this!\nReply from server: {}", &conn.server_conf.server_url, &res_text)).set_source(Some(Arc::new(err))).set_kind(ErrorKind::Bug); |
2174 | + let err = Error::new(format!( |
2175 | + "BUG: Could not deserialize {} server JSON response properly, please report \ |
2176 | + this!\nReply from server: {}", |
2177 | + &conn.server_conf.server_url, &res_text |
2178 | + )) |
2179 | + .set_source(Some(Arc::new(err))) |
2180 | + .set_kind(ErrorKind::Bug); |
2181 | *conn.store.online_status.lock().await = (Instant::now(), Err(err.clone())); |
2182 | return Err(err); |
2183 | } |
2184 | @@ -108,8 +115,9 @@ pub async fn get_mailboxes(conn: &JmapConnection) -> Result<HashMap<MailboxHash, |
2185 | let GetResponse::<MailboxObject> { |
2186 | list, account_id, .. |
2187 | } = m; |
2188 | - // Is account set as `personal`? (`isPersonal` property). Then, even if `isSubscribed` is false |
2189 | - // on a mailbox, it should be regarded as subscribed. |
2190 | + // Is account set as `personal`? (`isPersonal` property). Then, even if |
2191 | + // `isSubscribed` is false on a mailbox, it should be regarded as |
2192 | + // subscribed. |
2193 | let is_personal: bool = { |
2194 | let session = conn.session_guard(); |
2195 | session |
2196 | @@ -204,7 +212,13 @@ pub async fn get_message_list( |
2197 | let res_text = res.text().await?; |
2198 | let mut v: MethodResponse = match serde_json::from_str(&res_text) { |
2199 | Err(err) => { |
2200 | - let err = Error::new(format!("BUG: Could not deserialize {} server JSON response properly, please report this!\nReply from server: {}", &conn.server_conf.server_url, &res_text)).set_source(Some(Arc::new(err))).set_kind(ErrorKind::Bug); |
2201 | + let err = Error::new(format!( |
2202 | + "BUG: Could not deserialize {} server JSON response properly, please report \ |
2203 | + this!\nReply from server: {}", |
2204 | + &conn.server_conf.server_url, &res_text |
2205 | + )) |
2206 | + .set_source(Some(Arc::new(err))) |
2207 | + .set_kind(ErrorKind::Bug); |
2208 | *conn.store.online_status.lock().await = (Instant::now(), Err(err.clone())); |
2209 | return Err(err); |
2210 | } |
2211 | @@ -284,7 +298,13 @@ pub async fn fetch( |
2212 | |
2213 | let mut v: MethodResponse = match serde_json::from_str(&res_text) { |
2214 | Err(err) => { |
2215 | - let err = Error::new(format!("BUG: Could not deserialize {} server JSON response properly, please report this!\nReply from server: {}", &conn.server_conf.server_url, &res_text)).set_source(Some(Arc::new(err))).set_kind(ErrorKind::Bug); |
2216 | + let err = Error::new(format!( |
2217 | + "BUG: Could not deserialize {} server JSON response properly, please report \ |
2218 | + this!\nReply from server: {}", |
2219 | + &conn.server_conf.server_url, &res_text |
2220 | + )) |
2221 | + .set_source(Some(Arc::new(err))) |
2222 | + .set_kind(ErrorKind::Bug); |
2223 | *conn.store.online_status.lock().await = (Instant::now(), Err(err.clone())); |
2224 | return Err(err); |
2225 | } |
2226 | diff --git a/melib/src/backends/jmap/rfc8620.rs b/melib/src/backends/jmap/rfc8620.rs |
2227 | index bc394f5..fb55c5f 100644 |
2228 | --- a/melib/src/backends/jmap/rfc8620.rs |
2229 | +++ b/melib/src/backends/jmap/rfc8620.rs |
2230 | @@ -19,23 +19,30 @@ |
2231 | * along with meli. If not, see <http://www.gnu.org/licenses/>. |
2232 | */ |
2233 | |
2234 | - use crate::email::parser::BytesExt; |
2235 | use core::marker::PhantomData; |
2236 | - use serde::de::DeserializeOwned; |
2237 | - use serde::ser::{Serialize, SerializeStruct, Serializer}; |
2238 | + use std::{ |
2239 | + hash::{Hash, Hasher}, |
2240 | + sync::Arc, |
2241 | + }; |
2242 | + |
2243 | + use serde::{ |
2244 | + de::DeserializeOwned, |
2245 | + ser::{Serialize, SerializeStruct, Serializer}, |
2246 | + }; |
2247 | use serde_json::{value::RawValue, Value}; |
2248 | - use std::hash::{Hash, Hasher}; |
2249 | - use std::sync::Arc; |
2250 | + |
2251 | + use crate::email::parser::BytesExt; |
2252 | |
2253 | mod filters; |
2254 | pub use filters::*; |
2255 | mod comparator; |
2256 | pub use comparator::*; |
2257 | mod argument; |
2258 | + use std::collections::HashMap; |
2259 | + |
2260 | pub use argument::*; |
2261 | |
2262 | use super::protocol::Method; |
2263 | - use std::collections::HashMap; |
2264 | pub trait Object { |
2265 | const NAME: &'static str; |
2266 | } |
2267 | @@ -275,7 +282,6 @@ impl Object for BlobObject { |
2268 | /// - `account_id`: "Id" |
2269 | /// |
2270 | /// The id of the account to use. |
2271 | - /// |
2272 | #[derive(Deserialize, Debug)] |
2273 | #[serde(rename_all = "camelCase")] |
2274 | pub struct Get<OBJ: Object> |
2275 | @@ -305,31 +311,30 @@ where |
2276 | } |
2277 | } |
2278 | _impl!( |
2279 | - /// - accountId: "Id" |
2280 | + /// - accountId: "Id" |
2281 | /// |
2282 | /// The id of the account to use. |
2283 | - /// |
2284 | account_id: Id<Account> |
2285 | ); |
2286 | _impl!( |
2287 | - /// - ids: `Option<JmapArgument<Vec<String>>>` |
2288 | - /// |
2289 | - /// The ids of the Foo objects to return. If `None`, then *all* records |
2290 | - /// of the data type are returned, if this is supported for that data |
2291 | - /// type and the number of records does not exceed the |
2292 | - /// "max_objects_in_get" limit. |
2293 | + /// - ids: `Option<JmapArgument<Vec<String>>>` |
2294 | /// |
2295 | + /// The ids of the Foo objects to return. If `None`, then *all* |
2296 | + /// records of the data type are returned, if this is |
2297 | + /// supported for that data type and the number of records |
2298 | + /// does not exceed the "max_objects_in_get" limit. |
2299 | ids: Option<JmapArgument<Vec<Id<OBJ>>>> |
2300 | ); |
2301 | _impl!( |
2302 | - /// - properties: Option<Vec<String>> |
2303 | + /// - properties: Option<Vec<String>> |
2304 | /// |
2305 | - /// If supplied, only the properties listed in the array are returned |
2306 | - /// for each `Foo` object. If `None`, all properties of the object are |
2307 | - /// returned. The `id` property of the object is *always* returned, |
2308 | - /// even if not explicitly requested. If an invalid property is |
2309 | - /// requested, the call WILL be rejected with an "invalid_arguments" |
2310 | - /// error. |
2311 | + /// If supplied, only the properties listed in the array are |
2312 | + /// returned for each `Foo` object. If `None`, all |
2313 | + /// properties of the object are returned. The `id` |
2314 | + /// property of the object is *always* returned, even if |
2315 | + /// not explicitly requested. If an invalid property is |
2316 | + /// requested, the call WILL be rejected with an |
2317 | + /// "invalid_arguments" error. |
2318 | properties: Option<Vec<String>> |
2319 | ); |
2320 | } |
2321 | @@ -414,7 +419,15 @@ impl<OBJ: Object + DeserializeOwned> std::convert::TryFrom<&RawValue> for GetRes |
2322 | type Error = crate::error::Error; |
2323 | fn try_from(t: &RawValue) -> Result<GetResponse<OBJ>, crate::error::Error> { |
2324 | let res: (String, GetResponse<OBJ>, String) = |
2325 | - serde_json::from_str(t.get()).map_err(|err| crate::error::Error::new(format!("BUG: Could not deserialize server JSON response properly, please report this!\nReply from server: {}", &t)).set_source(Some(Arc::new(err))).set_kind(crate::error::ErrorKind::Bug))?; |
2326 | + serde_json::from_str(t.get()).map_err(|err| { |
2327 | + crate::error::Error::new(format!( |
2328 | + "BUG: Could not deserialize server JSON response properly, please report \ |
2329 | + this!\nReply from server: {}", |
2330 | + &t |
2331 | + )) |
2332 | + .set_source(Some(Arc::new(err))) |
2333 | + .set_kind(crate::error::ErrorKind::Bug) |
2334 | + })?; |
2335 | assert_eq!(&res.0, &format!("{}/get", OBJ::NAME)); |
2336 | Ok(res.1) |
2337 | } |
2338 | @@ -519,7 +532,15 @@ impl<OBJ: Object + DeserializeOwned> std::convert::TryFrom<&RawValue> for QueryR |
2339 | type Error = crate::error::Error; |
2340 | fn try_from(t: &RawValue) -> Result<QueryResponse<OBJ>, crate::error::Error> { |
2341 | let res: (String, QueryResponse<OBJ>, String) = |
2342 | - serde_json::from_str(t.get()).map_err(|err| crate::error::Error::new(format!("BUG: Could not deserialize server JSON response properly, please report this!\nReply from server: {}", &t)).set_source(Some(Arc::new(err))).set_kind(crate::error::ErrorKind::Bug))?; |
2343 | + serde_json::from_str(t.get()).map_err(|err| { |
2344 | + crate::error::Error::new(format!( |
2345 | + "BUG: Could not deserialize server JSON response properly, please report \ |
2346 | + this!\nReply from server: {}", |
2347 | + &t |
2348 | + )) |
2349 | + .set_source(Some(Arc::new(err))) |
2350 | + .set_kind(crate::error::ErrorKind::Bug) |
2351 | + })?; |
2352 | assert_eq!(&res.0, &format!("{}/query", OBJ::NAME)); |
2353 | Ok(res.1) |
2354 | } |
2355 | @@ -543,8 +564,8 @@ impl<M: Method<OBJ>, OBJ: Object> ResultField<M, OBJ> { |
2356 | } |
2357 | } |
2358 | |
2359 | - // error[E0723]: trait bounds other than `Sized` on const fn parameters are unstable |
2360 | - // --> melib/src/backends/jmap/rfc8620.rs:626:6 |
2361 | + // error[E0723]: trait bounds other than `Sized` on const fn parameters are |
2362 | + // unstable --> melib/src/backends/jmap/rfc8620.rs:626:6 |
2363 | // | |
2364 | // 626 | impl<M: Method<OBJ>, OBJ: Object> ResultField<M, OBJ> { |
2365 | // | ^ |
2366 | @@ -562,8 +583,9 @@ impl<M: Method<OBJ>, OBJ: Object> ResultField<M, OBJ> { |
2367 | |
2368 | /// #`changes` |
2369 | /// |
2370 | - /// The "Foo/changes" method allows a client to efficiently update the state of its Foo cache |
2371 | - /// to match the new state on the server. It takes the following arguments: |
2372 | + /// The "Foo/changes" method allows a client to efficiently update the state |
2373 | + /// of its Foo cache to match the new state on the server. It takes the |
2374 | + /// following arguments: |
2375 | /// |
2376 | /// - accountId: "Id" The id of the account to use. |
2377 | /// - sinceState: "String" |
2378 | @@ -579,7 +601,6 @@ impl<M: Method<OBJ>, OBJ: Object> ResultField<M, OBJ> { |
2379 | /// to return. If supplied by the client, the value MUST be a |
2380 | /// positive integer greater than 0. If a value outside of this range |
2381 | /// is given, the server MUST re |
2382 | - /// |
2383 | #[derive(Deserialize, Serialize, Debug)] |
2384 | #[serde(rename_all = "camelCase")] |
2385 | /* ch-ch-ch-ch-ch-Changes */ |
2386 | @@ -608,10 +629,9 @@ where |
2387 | } |
2388 | } |
2389 | _impl!( |
2390 | - /// - accountId: "Id" |
2391 | + /// - accountId: "Id" |
2392 | /// |
2393 | /// The id of the account to use. |
2394 | - /// |
2395 | account_id: Id<Account> |
2396 | ); |
2397 | _impl!( |
2398 | @@ -620,8 +640,6 @@ where |
2399 | /// returned as the "state" argument in the "Foo/get" response. The |
2400 | /// server will return the changes that have occurred since this |
2401 | /// state. |
2402 | - /// |
2403 | - /// |
2404 | since_state: State<OBJ> |
2405 | ); |
2406 | _impl!( |
2407 | @@ -630,8 +648,8 @@ where |
2408 | /// MAY choose to return fewer than this value but MUST NOT return |
2409 | /// more. If not given by the client, the server may choose how many |
2410 | /// to return. If supplied by the client, the value MUST be a |
2411 | - /// positive integer greater than 0. If a value outside of this range |
2412 | - /// is given, the server MUST re |
2413 | + /// positive integer greater than 0. If a value outside of this |
2414 | + /// range is given, the server MUST re |
2415 | max_changes: Option<u64> |
2416 | ); |
2417 | } |
2418 | @@ -654,7 +672,15 @@ impl<OBJ: Object + DeserializeOwned> std::convert::TryFrom<&RawValue> for Change |
2419 | type Error = crate::error::Error; |
2420 | fn try_from(t: &RawValue) -> Result<ChangesResponse<OBJ>, crate::error::Error> { |
2421 | let res: (String, ChangesResponse<OBJ>, String) = |
2422 | - serde_json::from_str(t.get()).map_err(|err| crate::error::Error::new(format!("BUG: Could not deserialize server JSON response properly, please report this!\nReply from server: {}", &t)).set_source(Some(Arc::new(err))).set_kind(crate::error::ErrorKind::Bug))?; |
2423 | + serde_json::from_str(t.get()).map_err(|err| { |
2424 | + crate::error::Error::new(format!( |
2425 | + "BUG: Could not deserialize server JSON response properly, please report \ |
2426 | + this!\nReply from server: {}", |
2427 | + &t |
2428 | + )) |
2429 | + .set_source(Some(Arc::new(err))) |
2430 | + .set_kind(crate::error::ErrorKind::Bug) |
2431 | + })?; |
2432 | assert_eq!(&res.0, &format!("{}/changes", OBJ::NAME)); |
2433 | Ok(res.1) |
2434 | } |
2435 | @@ -707,7 +733,6 @@ where |
2436 | /// |
2437 | /// The client MUST omit any properties that may only be set by the |
2438 | /// server (for example, the "id" property on most object types). |
2439 | - /// |
2440 | pub create: Option<HashMap<Id<OBJ>, OBJ>>, |
2441 | ///o update: "Id[PatchObject]|null" |
2442 | /// |
2443 | @@ -722,26 +747,26 @@ where |
2444 | /// All paths MUST also conform to the following restrictions; if |
2445 | /// there is any violation, the update MUST be rejected with an |
2446 | /// "invalidPatch" error: |
2447 | - /// * The pointer MUST NOT reference inside an array (i.e., you MUST |
2448 | - /// NOT insert/delete from an array; the array MUST be replaced in |
2449 | - /// its entirety instead). |
2450 | + /// * The pointer MUST NOT reference inside an array (i.e., you MUST NOT |
2451 | + /// insert/delete from an array; the array MUST be replaced in its |
2452 | + /// entirety instead). |
2453 | /// |
2454 | - /// * All parts prior to the last (i.e., the value after the final |
2455 | - /// slash) MUST already exist on the object being patched. |
2456 | + /// * All parts prior to the last (i.e., the value after the final slash) |
2457 | + /// MUST already exist on the object being patched. |
2458 | /// |
2459 | - /// * There MUST NOT be two patches in the PatchObject where the |
2460 | - /// pointer of one is the prefix of the pointer of the other, e.g., |
2461 | - /// "alerts/1/offset" and "alerts". |
2462 | + /// * There MUST NOT be two patches in the PatchObject where the pointer |
2463 | + /// of one is the prefix of the pointer of the other, e.g., |
2464 | + /// "alerts/1/offset" and "alerts". |
2465 | /// |
2466 | /// The value associated with each pointer determines how to apply |
2467 | /// that patch: |
2468 | /// |
2469 | - /// * If null, set to the default value if specified for this |
2470 | - /// property; otherwise, remove the property from the patched |
2471 | - /// object. If the key is not present in the parent, this a no-op. |
2472 | + /// * If null, set to the default value if specified for this property; |
2473 | + /// otherwise, remove the property from the patched object. If the key |
2474 | + /// is not present in the parent, this a no-op. |
2475 | /// |
2476 | - /// * Anything else: The value to set for this property (this may be |
2477 | - /// a replacement or addition to the object being patched). |
2478 | + /// * Anything else: The value to set for this property (this may be a |
2479 | + /// replacement or addition to the object being patched). |
2480 | /// |
2481 | /// Any server-set properties MAY be included in the patch if their |
2482 | /// value is identical to the current server value (before applying |
2483 | @@ -853,7 +878,15 @@ impl<OBJ: Object + DeserializeOwned> std::convert::TryFrom<&RawValue> for SetRes |
2484 | type Error = crate::error::Error; |
2485 | fn try_from(t: &RawValue) -> Result<SetResponse<OBJ>, crate::error::Error> { |
2486 | let res: (String, SetResponse<OBJ>, String) = |
2487 | - serde_json::from_str(t.get()).map_err(|err| crate::error::Error::new(format!("BUG: Could not deserialize server JSON response properly, please report this!\nReply from server: {}", &t)).set_source(Some(Arc::new(err))).set_kind(crate::error::ErrorKind::Bug))?; |
2488 | + serde_json::from_str(t.get()).map_err(|err| { |
2489 | + crate::error::Error::new(format!( |
2490 | + "BUG: Could not deserialize server JSON response properly, please report \ |
2491 | + this!\nReply from server: {}", |
2492 | + &t |
2493 | + )) |
2494 | + .set_source(Some(Arc::new(err))) |
2495 | + .set_kind(crate::error::ErrorKind::Bug) |
2496 | + })?; |
2497 | assert_eq!(&res.0, &format!("{}/set", OBJ::NAME)); |
2498 | Ok(res.1) |
2499 | } |
2500 | @@ -863,31 +896,41 @@ impl<OBJ: Object + DeserializeOwned> std::convert::TryFrom<&RawValue> for SetRes |
2501 | #[serde(rename_all = "camelCase")] |
2502 | #[serde(tag = "type", content = "description")] |
2503 | pub enum SetError { |
2504 | - ///(create; update; destroy). The create/update/destroy would violate an ACL or other permissions policy. |
2505 | + ///(create; update; destroy). The create/update/destroy would violate an |
2506 | + /// ACL or other permissions policy. |
2507 | Forbidden(Option<String>), |
2508 | - ///(create; update). The create would exceed a server- defined limit on the number or total size of objects of this type. |
2509 | + ///(create; update). The create would exceed a server- defined limit on |
2510 | + /// the number or total size of objects of this type. |
2511 | OverQuota(Option<String>), |
2512 | |
2513 | - ///(create; update). The create/update would result in an object that exceeds a server-defined limit for the maximum size of a single object of this type. |
2514 | + ///(create; update). The create/update would result in an object that |
2515 | + /// exceeds a server-defined limit for the maximum size of a single object |
2516 | + /// of this type. |
2517 | TooLarge(Option<String>), |
2518 | |
2519 | - ///(create). Too many objects of this type have been created recently, and a server-defined rate limit has been reached. It may work if tried again later. |
2520 | + ///(create). Too many objects of this type have been created recently, and |
2521 | + /// a server-defined rate limit has been reached. It may work if tried |
2522 | + /// again later. |
2523 | RateLimit(Option<String>), |
2524 | |
2525 | ///(update; destroy). The id given to update/destroy cannot be found. |
2526 | NotFound(Option<String>), |
2527 | |
2528 | - ///(update). The PatchObject given to update the record was not a valid patch (see the patch description). |
2529 | + ///(update). The PatchObject given to update the record was not a valid |
2530 | + /// patch (see the patch description). |
2531 | InvalidPatch(Option<String>), |
2532 | |
2533 | - ///(update). The client requested that an object be both updated and destroyed in the same /set request, and the server has decided to therefore ignore the update. |
2534 | + ///(update). The client requested that an object be both updated and |
2535 | + /// destroyed in the same /set request, and the server has decided to |
2536 | + /// therefore ignore the update. |
2537 | WillDestroy(Option<String>), |
2538 | ///(create; update). The record given is invalid in some way. |
2539 | InvalidProperties { |
2540 | description: Option<String>, |
2541 | properties: Vec<String>, |
2542 | }, |
2543 | - ///(create; destroy). This is a singleton type, so you cannot create another one or destroy the existing one. |
2544 | + ///(create; destroy). This is a singleton type, so you cannot create |
2545 | + /// another one or destroy the existing one. |
2546 | Singleton(Option<String>), |
2547 | RequestTooLarge(Option<String>), |
2548 | StateMismatch(Option<String>), |
2549 | @@ -1001,8 +1044,9 @@ pub struct UploadResponse { |
2550 | pub account_id: Id<Account>, |
2551 | ///o blobId: "Id" |
2552 | /// |
2553 | - ///The id representing the binary data uploaded. The data for this id is immutable. |
2554 | - ///The id *only* refers to the binary data, not any metadata. |
2555 | + ///The id representing the binary data uploaded. The data for this id is |
2556 | + /// immutable. The id *only* refers to the binary data, not any |
2557 | + /// metadata. |
2558 | pub blob_id: Id<BlobObject>, |
2559 | ///o type: "String" |
2560 | /// |
2561 | @@ -1098,11 +1142,15 @@ where |
2562 | pub struct QueryChangesResponse<OBJ: Object> { |
2563 | /// The id of the account used for the call. |
2564 | pub account_id: Id<Account>, |
2565 | - /// This is the "sinceQueryState" argument echoed back; that is, the state from which the server is returning changes. |
2566 | + /// This is the "sinceQueryState" argument echoed back; that is, the state |
2567 | + /// from which the server is returning changes. |
2568 | pub old_query_state: String, |
2569 | - ///This is the state the query will be in after applying the set of changes to the old state. |
2570 | + ///This is the state the query will be in after applying the set of changes |
2571 | + /// to the old state. |
2572 | pub new_query_state: String, |
2573 | - /// The total number of Foos in the results (given the "filter"). This argument MUST be omitted if the "calculateTotal" request argument is not true. |
2574 | + /// The total number of Foos in the results (given the "filter"). This |
2575 | + /// argument MUST be omitted if the "calculateTotal" request argument is not |
2576 | + /// true. |
2577 | #[serde(default)] |
2578 | pub total: Option<usize>, |
2579 | ///The "id" for every Foo that was in the query results in the old |
2580 | @@ -1139,9 +1187,9 @@ pub struct QueryChangesResponse<OBJ: Object> { |
2581 | |
2582 | ///An *AddedItem* object has the following properties: |
2583 | |
2584 | - ///* id: "Id" |
2585 | + /// * id: "Id" |
2586 | |
2587 | - ///* index: "UnsignedInt" |
2588 | + /// * index: "UnsignedInt" |
2589 | |
2590 | ///The result of this is that if the client has a cached sparse array of |
2591 | ///Foo ids corresponding to the results in the old state, then: |
2592 | diff --git a/melib/src/backends/jmap/rfc8620/argument.rs b/melib/src/backends/jmap/rfc8620/argument.rs |
2593 | index 1410d0b..932579b 100644 |
2594 | --- a/melib/src/backends/jmap/rfc8620/argument.rs |
2595 | +++ b/melib/src/backends/jmap/rfc8620/argument.rs |
2596 | @@ -19,9 +19,10 @@ |
2597 | * along with meli. If not, see <http://www.gnu.org/licenses/>. |
2598 | */ |
2599 | |
2600 | - use crate::backends::jmap::protocol::Method; |
2601 | - use crate::backends::jmap::rfc8620::Object; |
2602 | - use crate::backends::jmap::rfc8620::ResultField; |
2603 | + use crate::backends::jmap::{ |
2604 | + protocol::Method, |
2605 | + rfc8620::{Object, ResultField}, |
2606 | + }; |
2607 | |
2608 | #[derive(Deserialize, Serialize, Debug)] |
2609 | #[serde(rename_all = "camelCase")] |
2610 | diff --git a/melib/src/backends/maildir.rs b/melib/src/backends/maildir.rs |
2611 | index dbfd57f..97b4aaf 100644 |
2612 | --- a/melib/src/backends/maildir.rs |
2613 | +++ b/melib/src/backends/maildir.rs |
2614 | @@ -24,19 +24,24 @@ mod backend; |
2615 | pub use self::backend::*; |
2616 | |
2617 | mod stream; |
2618 | - pub use stream::*; |
2619 | + use std::{ |
2620 | + collections::hash_map::DefaultHasher, |
2621 | + fs, |
2622 | + hash::{Hash, Hasher}, |
2623 | + io::{BufReader, Read}, |
2624 | + path::{Path, PathBuf}, |
2625 | + sync::{Arc, Mutex}, |
2626 | + }; |
2627 | |
2628 | - use crate::backends::*; |
2629 | - use crate::email::Flag; |
2630 | - use crate::error::{Error, Result}; |
2631 | - use crate::shellexpand::ShellExpandTrait; |
2632 | use futures::stream::Stream; |
2633 | - use std::collections::hash_map::DefaultHasher; |
2634 | - use std::fs; |
2635 | - use std::hash::{Hash, Hasher}; |
2636 | - use std::io::{BufReader, Read}; |
2637 | - use std::path::{Path, PathBuf}; |
2638 | - use std::sync::{Arc, Mutex}; |
2639 | + pub use stream::*; |
2640 | + |
2641 | + use crate::{ |
2642 | + backends::*, |
2643 | + email::Flag, |
2644 | + error::{Error, Result}, |
2645 | + shellexpand::ShellExpandTrait, |
2646 | + }; |
2647 | |
2648 | /// `BackendOp` implementor for Maildir |
2649 | #[derive(Debug)] |
2650 | @@ -96,7 +101,7 @@ impl<'a> BackendOp for MaildirOp { |
2651 | let file = std::fs::OpenOptions::new() |
2652 | .read(true) |
2653 | .write(false) |
2654 | - .open(&self.path()?)?; |
2655 | + .open(self.path()?)?; |
2656 | let mut buf_reader = BufReader::new(file); |
2657 | let mut contents = Vec::new(); |
2658 | buf_reader.read_to_end(&mut contents)?; |
2659 | @@ -141,8 +146,8 @@ impl MaildirMailbox { |
2660 | let mut h = DefaultHasher::new(); |
2661 | pathbuf.hash(&mut h); |
2662 | |
2663 | - /* Check if mailbox path (Eg `INBOX/Lists/luddites`) is included in the subscribed |
2664 | - * mailboxes in user configuration */ |
2665 | + /* Check if mailbox path (Eg `INBOX/Lists/luddites`) is included in the |
2666 | + * subscribed mailboxes in user configuration */ |
2667 | let fname = pathbuf |
2668 | .strip_prefix( |
2669 | PathBuf::from(&settings.root_mailbox) |
2670 | @@ -279,7 +284,11 @@ impl MaildirPathTrait for Path { |
2671 | 'S' => flag |= Flag::SEEN, |
2672 | 'T' => flag |= Flag::TRASHED, |
2673 | _ => { |
2674 | - debug!("DEBUG: in MaildirPathTrait::flags(), encountered unknown flag marker {:?}, path is {}", f, path); |
2675 | + debug!( |
2676 | + "DEBUG: in MaildirPathTrait::flags(), encountered unknown flag marker \ |
2677 | + {:?}, path is {}", |
2678 | + f, path |
2679 | + ); |
2680 | } |
2681 | } |
2682 | } |
2683 | diff --git a/melib/src/backends/maildir/backend.rs b/melib/src/backends/maildir/backend.rs |
2684 | index 0ca01fc..620d3c0 100644 |
2685 | --- a/melib/src/backends/maildir/backend.rs |
2686 | +++ b/melib/src/backends/maildir/backend.rs |
2687 | @@ -21,32 +21,36 @@ |
2688 | |
2689 | //! # Maildir Backend |
2690 | //! |
2691 | - //! This module implements a maildir backend according to the maildir specification. |
2692 | - //! <https://cr.yp.to/proto/maildir.html> |
2693 | + //! This module implements a maildir backend according to the maildir |
2694 | + //! specification. <https://cr.yp.to/proto/maildir.html> |
2695 | |
2696 | - use super::{MaildirMailbox, MaildirOp, MaildirPathTrait}; |
2697 | - use crate::backends::{RefreshEventKind::*, *}; |
2698 | - use crate::conf::AccountSettings; |
2699 | - use crate::email::{Envelope, EnvelopeHash, Flag}; |
2700 | - use crate::error::{Error, ErrorKind, Result}; |
2701 | - use crate::shellexpand::ShellExpandTrait; |
2702 | - use crate::Collection; |
2703 | use futures::prelude::Stream; |
2704 | |
2705 | + use super::{MaildirMailbox, MaildirOp, MaildirPathTrait}; |
2706 | + use crate::{ |
2707 | + backends::{RefreshEventKind::*, *}, |
2708 | + conf::AccountSettings, |
2709 | + email::{Envelope, EnvelopeHash, Flag}, |
2710 | + error::{Error, ErrorKind, Result}, |
2711 | + shellexpand::ShellExpandTrait, |
2712 | + Collection, |
2713 | + }; |
2714 | + |
2715 | extern crate notify; |
2716 | + use std::{ |
2717 | + collections::{hash_map::DefaultHasher, HashMap, HashSet}, |
2718 | + ffi::OsStr, |
2719 | + fs, |
2720 | + hash::{Hash, Hasher}, |
2721 | + io::{self, Read, Write}, |
2722 | + ops::{Deref, DerefMut}, |
2723 | + os::unix::fs::PermissionsExt, |
2724 | + path::{Component, Path, PathBuf}, |
2725 | + sync::{mpsc::channel, Arc, Mutex}, |
2726 | + time::Duration, |
2727 | + }; |
2728 | + |
2729 | use self::notify::{watcher, DebouncedEvent, RecursiveMode, Watcher}; |
2730 | - use std::time::Duration; |
2731 | - |
2732 | - use std::collections::{hash_map::DefaultHasher, HashMap, HashSet}; |
2733 | - use std::ffi::OsStr; |
2734 | - use std::fs; |
2735 | - use std::hash::{Hash, Hasher}; |
2736 | - use std::io::{self, Read, Write}; |
2737 | - use std::ops::{Deref, DerefMut}; |
2738 | - use std::os::unix::fs::PermissionsExt; |
2739 | - use std::path::{Component, Path, PathBuf}; |
2740 | - use std::sync::mpsc::channel; |
2741 | - use std::sync::{Arc, Mutex}; |
2742 | |
2743 | #[derive(Clone, Debug, PartialEq)] |
2744 | pub(super) enum PathMod { |
2745 | @@ -669,7 +673,10 @@ impl MailBackend for MaildirType { |
2746 | e.modified = Some(PathMod::Hash(new_hash)); |
2747 | e.removed = false; |
2748 | }); |
2749 | - debug!("contains_old_key, key was marked as removed (by external source)"); |
2750 | + debug!( |
2751 | + "contains_old_key, key was marked as removed (by external \ |
2752 | + source)" |
2753 | + ); |
2754 | } else { |
2755 | debug!("not contains_new_key"); |
2756 | } |
2757 | @@ -893,7 +900,7 @@ impl MailBackend for MaildirType { |
2758 | Some(PathMod::Path(new_name.clone())); |
2759 | |
2760 | debug!("renaming {:?} to {:?}", path, new_name); |
2761 | - fs::rename(&path, &new_name)?; |
2762 | + fs::rename(path, &new_name)?; |
2763 | debug!("success in rename"); |
2764 | } |
2765 | Ok(()) |
2766 | @@ -996,12 +1003,16 @@ impl MailBackend for MaildirType { |
2767 | let mut path = self.path.clone(); |
2768 | path.push(&new_path); |
2769 | if !path.starts_with(&self.path) { |
2770 | - return Err(Error::new(format!("Path given (`{}`) is absolute. Please provide a path relative to the account's root mailbox.", &new_path))); |
2771 | + return Err(Error::new(format!( |
2772 | + "Path given (`{}`) is absolute. Please provide a path relative to the account's \ |
2773 | + root mailbox.", |
2774 | + &new_path |
2775 | + ))); |
2776 | } |
2777 | |
2778 | std::fs::create_dir(&path)?; |
2779 | - /* create_dir does not create intermediate directories (like `mkdir -p`), so the parent must be a valid |
2780 | - * mailbox at this point. */ |
2781 | + /* create_dir does not create intermediate directories (like `mkdir -p`), so |
2782 | + * the parent must be a valid mailbox at this point. */ |
2783 | |
2784 | let parent = path.parent().and_then(|p| { |
2785 | self.mailboxes |
2786 | @@ -1143,8 +1154,9 @@ impl MaildirType { |
2787 | children.push(f.hash); |
2788 | mailboxes.insert(f.hash, f); |
2789 | } else { |
2790 | - /* If directory is invalid (i.e. has no {cur,new,tmp} subfolders), |
2791 | - * accept it ONLY if it contains subdirs of any depth that are |
2792 | + /* If directory is invalid (i.e. has no {cur,new,tmp} |
2793 | + * subfolders), accept it ONLY if |
2794 | + * it contains subdirs of any depth that are |
2795 | * valid maildir paths |
2796 | */ |
2797 | let subdirs = recurse_mailboxes(mailboxes, settings, &path)?; |
2798 | @@ -1379,7 +1391,7 @@ fn add_path_to_index( |
2799 | map.len() |
2800 | ); |
2801 | } |
2802 | - let mut reader = io::BufReader::new(fs::File::open(&path)?); |
2803 | + let mut reader = io::BufReader::new(fs::File::open(path)?); |
2804 | buf.clear(); |
2805 | reader.read_to_end(buf)?; |
2806 | let mut env = Envelope::from_bytes(buf.as_slice(), Some(path.flags()))?; |
2807 | diff --git a/melib/src/backends/maildir/stream.rs b/melib/src/backends/maildir/stream.rs |
2808 | index adc408f..c0bc57c 100644 |
2809 | --- a/melib/src/backends/maildir/stream.rs |
2810 | +++ b/melib/src/backends/maildir/stream.rs |
2811 | @@ -19,17 +19,22 @@ |
2812 | * along with meli. If not, see <http://www.gnu.org/licenses/>. |
2813 | */ |
2814 | |
2815 | + use core::{future::Future, pin::Pin}; |
2816 | + use std::{ |
2817 | + io::{self, Read}, |
2818 | + os::unix::fs::PermissionsExt, |
2819 | + path::PathBuf, |
2820 | + result, |
2821 | + sync::{Arc, Mutex}, |
2822 | + }; |
2823 | + |
2824 | + use futures::{ |
2825 | + stream::{FuturesUnordered, StreamExt}, |
2826 | + task::{Context, Poll}, |
2827 | + }; |
2828 | + |
2829 | use super::*; |
2830 | use crate::backends::maildir::backend::move_to_cur; |
2831 | - use core::future::Future; |
2832 | - use core::pin::Pin; |
2833 | - use futures::stream::{FuturesUnordered, StreamExt}; |
2834 | - use futures::task::{Context, Poll}; |
2835 | - use std::io::{self, Read}; |
2836 | - use std::os::unix::fs::PermissionsExt; |
2837 | - use std::path::PathBuf; |
2838 | - use std::result; |
2839 | - use std::sync::{Arc, Mutex}; |
2840 | |
2841 | pub struct MaildirStream { |
2842 | payloads: Pin< |
2843 | @@ -66,7 +71,7 @@ impl MaildirStream { |
2844 | files |
2845 | .chunks(chunk_size) |
2846 | .map(|chunk| { |
2847 | - let cache_dir = xdg::BaseDirectories::with_profile("meli", &name).unwrap(); |
2848 | + let cache_dir = xdg::BaseDirectories::with_profile("meli", name).unwrap(); |
2849 | Box::pin(Self::chunk( |
2850 | SmallVec::from(chunk), |
2851 | cache_dir, |
2852 | diff --git a/melib/src/backends/mbox.rs b/melib/src/backends/mbox.rs |
2853 | index 3f8a1a8..0304a95 100644 |
2854 | --- a/melib/src/backends/mbox.rs |
2855 | +++ b/melib/src/backends/mbox.rs |
2856 | @@ -31,36 +31,44 @@ |
2857 | //! |
2858 | //! `mbox` describes a family of incompatible legacy formats. |
2859 | //! |
2860 | - //! "All of the 'mbox' formats store all of the messages in the mailbox in a single file. Delivery appends new messages to the end of the file." [^0] |
2861 | + //! "All of the 'mbox' formats store all of the messages in the mailbox in a |
2862 | + //! single file. Delivery appends new messages to the end of the file." [^0] |
2863 | //! |
2864 | - //! "Each message is preceded by a From_ line and followed by a blank line. A From_ line is a line that begins with the five characters 'F', 'r', 'o', 'm', and ' '." [^0] |
2865 | + //! "Each message is preceded by a From_ line and followed by a blank line. A |
2866 | + //! From_ line is a line that begins with the five characters 'F', 'r', 'o', |
2867 | + //! 'm', and ' '." [^0] |
2868 | //! |
2869 | //! ## `From ` / postmark line |
2870 | //! |
2871 | - //! "An mbox is a text file containing an arbitrary number of e-mail messages. Each message |
2872 | - //! consists of a postmark, followed by an e-mail message formatted according to RFC822, RFC2822. |
2873 | - //! The file format is line-oriented. Lines are separated by line feed characters (ASCII 10). |
2874 | + //! "An mbox is a text file containing an arbitrary number of e-mail messages. |
2875 | + //! Each message consists of a postmark, followed by an e-mail message formatted |
2876 | + //! according to RFC822, RFC2822. The file format is line-oriented. Lines are |
2877 | + //! separated by line feed characters (ASCII 10). |
2878 | //! |
2879 | - //! "A postmark line consists of the four characters 'From', followed by a space character, |
2880 | - //! followed by the message's envelope sender address, followed by whitespace, and followed by a |
2881 | - //! time stamp. This line is often called From_ line. |
2882 | + //! "A postmark line consists of the four characters 'From', followed by a space |
2883 | + //! character, followed by the message's envelope sender address, followed by |
2884 | + //! whitespace, and followed by a time stamp. This line is often called From_ |
2885 | + //! line. |
2886 | //! |
2887 | - //! "The sender address is expected to be addr-spec as defined in RFC2822 3.4.1. The date is expected |
2888 | - //! to be date-time as output by asctime(3). For compatibility reasons with legacy software, |
2889 | - //! two-digit years greater than or equal to 70 should be interpreted as the years 1970+, while |
2890 | - //! two-digit years less than 70 should be interpreted as the years 2000-2069. Software reading |
2891 | - //! files in this format should also be prepared to accept non-numeric timezone information such as |
2892 | - //! 'CET DST' for Central European Time, daylight saving time. |
2893 | + //! "The sender address is expected to be addr-spec as defined in RFC2822 3.4.1. |
2894 | + //! The date is expected to be date-time as output by asctime(3). For |
2895 | + //! compatibility reasons with legacy software, two-digit years greater than or |
2896 | + //! equal to 70 should be interpreted as the years 1970+, while two-digit years |
2897 | + //! less than 70 should be interpreted as the years 2000-2069. Software reading |
2898 | + //! files in this format should also be prepared to accept non-numeric timezone |
2899 | + //! information such as 'CET DST' for Central European Time, daylight saving |
2900 | + //! time. |
2901 | //! |
2902 | //! "Example: |
2903 | //! |
2904 | //!```text |
2905 | - //!From example@example.com Fri Jun 23 02:56:55 2000 |
2906 | - //!``` |
2907 | + //! From example@example.com Fri Jun 23 02:56:55 2000 |
2908 | + //! ``` |
2909 | //! |
2910 | - //! "In order to avoid misinterpretation of lines in message bodies which begin with the four |
2911 | - //! characters 'From', followed by a space character, the mail delivery agent must quote |
2912 | - //! any occurrence of 'From ' at the start of a body line." [^2] |
2913 | + //! "In order to avoid misinterpretation of lines in message bodies which begin |
2914 | + //! with the four characters 'From', followed by a space character, the mail |
2915 | + //! delivery agent must quote any occurrence of 'From ' at the start of a body |
2916 | + //! line." [^2] |
2917 | //! |
2918 | //! ## Metadata |
2919 | //! |
2920 | @@ -77,7 +85,8 @@ |
2921 | //! # use std::collections::HashMap; |
2922 | //! # use std::sync::{Arc, Mutex}; |
2923 | //! let file_contents = vec![]; // Replace with actual mbox file contents |
2924 | - //! let index: Arc<Mutex<HashMap<EnvelopeHash, (Offset, Length)>>> = Arc::new(Mutex::new(HashMap::default())); |
2925 | + //! let index: Arc<Mutex<HashMap<EnvelopeHash, (Offset, Length)>>> = |
2926 | + //! Arc::new(Mutex::new(HashMap::default())); |
2927 | //! let mut message_iter = MessageIterator { |
2928 | //! index: index.clone(), |
2929 | //! input: &file_contents.as_slice(), |
2930 | @@ -100,9 +109,9 @@ |
2931 | //! format.append( |
2932 | //! &mut file, |
2933 | //! mbox_1, |
2934 | - //! None, // Envelope From |
2935 | + //! None, // Envelope From |
2936 | //! Some(melib::datetime::now()), // Delivered date |
2937 | - //! Default::default(), // Flags and tags |
2938 | + //! Default::default(), // Flags and tags |
2939 | //! MboxMetadata::None, |
2940 | //! true, |
2941 | //! false, |
2942 | @@ -121,29 +130,37 @@ |
2943 | //! # Ok::<(), melib::Error>(()) |
2944 | //! ``` |
2945 | |
2946 | - use crate::backends::*; |
2947 | - use crate::collection::Collection; |
2948 | - use crate::conf::AccountSettings; |
2949 | - use crate::email::parser::BytesExt; |
2950 | - use crate::email::*; |
2951 | - use crate::error::{Error, ErrorKind, Result}; |
2952 | - use crate::get_path_hash; |
2953 | - use crate::shellexpand::ShellExpandTrait; |
2954 | - use nom::bytes::complete::tag; |
2955 | - use nom::character::complete::digit1; |
2956 | - use nom::combinator::map_res; |
2957 | - use nom::{self, error::Error as NomError, error::ErrorKind as NomErrorKind, IResult}; |
2958 | + use nom::{ |
2959 | + self, |
2960 | + bytes::complete::tag, |
2961 | + character::complete::digit1, |
2962 | + combinator::map_res, |
2963 | + error::{Error as NomError, ErrorKind as NomErrorKind}, |
2964 | + IResult, |
2965 | + }; |
2966 | + |
2967 | + use crate::{ |
2968 | + backends::*, |
2969 | + collection::Collection, |
2970 | + conf::AccountSettings, |
2971 | + email::{parser::BytesExt, *}, |
2972 | + error::{Error, ErrorKind, Result}, |
2973 | + get_path_hash, |
2974 | + shellexpand::ShellExpandTrait, |
2975 | + }; |
2976 | |
2977 | extern crate notify; |
2978 | + use std::{ |
2979 | + collections::hash_map::HashMap, |
2980 | + fs::File, |
2981 | + io::{BufReader, Read}, |
2982 | + os::unix::io::AsRawFd, |
2983 | + path::{Path, PathBuf}, |
2984 | + str::FromStr, |
2985 | + sync::{mpsc::channel, Arc, Mutex, RwLock}, |
2986 | + }; |
2987 | + |
2988 | use self::notify::{watcher, DebouncedEvent, RecursiveMode, Watcher}; |
2989 | - use std::collections::hash_map::HashMap; |
2990 | - use std::fs::File; |
2991 | - use std::io::{BufReader, Read}; |
2992 | - use std::os::unix::io::AsRawFd; |
2993 | - use std::path::{Path, PathBuf}; |
2994 | - use std::str::FromStr; |
2995 | - use std::sync::mpsc::channel; |
2996 | - use std::sync::{Arc, Mutex, RwLock}; |
2997 | |
2998 | pub mod write; |
2999 | |
3000 | @@ -163,7 +180,8 @@ fn get_rw_lock_blocking(f: &File, path: &Path) -> Result<()> { |
3001 | l_start: 0, |
3002 | l_len: 0, /* "Specifying 0 for l_len has the special meaning: lock all bytes starting at the location |
3003 | specified by l_whence and l_start through to the end of file, no matter how large the file grows." */ |
3004 | - l_pid: 0, /* "By contrast with traditional record locks, the l_pid field of that structure must be set to zero when using the commands described below." */ |
3005 | + l_pid: 0, /* "By contrast with traditional record locks, the l_pid field of that |
3006 | + * structure must be set to zero when using the commands described below." */ |
3007 | #[cfg(target_os = "freebsd")] |
3008 | l_sysid: 0, |
3009 | }; |
3010 | @@ -368,9 +386,12 @@ impl BackendOp for MboxOp { |
3011 | |
3012 | #[derive(Debug, Clone, Copy)] |
3013 | pub enum MboxMetadata { |
3014 | - /// Dovecot uses C-Client (ie. UW-IMAP, Pine) compatible headers in mbox messages to store me |
3015 | - /// - X-IMAPbase: Contains UIDVALIDITY, last used UID and list of used keywords |
3016 | - /// - X-IMAP: Same as X-IMAPbase but also specifies that the message is a “pseudo message” |
3017 | + /// Dovecot uses C-Client (ie. UW-IMAP, Pine) compatible headers in mbox |
3018 | + /// messages to store me |
3019 | + /// - X-IMAPbase: Contains UIDVALIDITY, last used UID and list of used |
3020 | + /// keywords |
3021 | + /// - X-IMAP: Same as X-IMAPbase but also specifies that the message is a |
3022 | + /// “pseudo message” |
3023 | /// - X-UID: Message’s allocated UID |
3024 | /// - Status: R (Seen) and O (non-Recent) flags |
3025 | /// - X-Status: A (Answered), F (Flagged), T (Draft) and D (Deleted) flags |
3026 | @@ -380,8 +401,8 @@ pub enum MboxMetadata { |
3027 | None, |
3028 | } |
3029 | |
3030 | - /// Choose between "mboxo", "mboxrd", "mboxcl", "mboxcl2". For new mailboxes, prefer "mboxcl2" |
3031 | - /// which does not alter the mail body. |
3032 | + /// Choose between "mboxo", "mboxrd", "mboxcl", "mboxcl2". For new mailboxes, |
3033 | + /// prefer "mboxcl2" which does not alter the mail body. |
3034 | #[derive(Debug, Clone, Copy)] |
3035 | pub enum MboxFormat { |
3036 | MboxO, |
3037 | @@ -1406,7 +1427,8 @@ impl MboxType { |
3038 | ); |
3039 | } else { |
3040 | return Err(Error::new(format!( |
3041 | - "mbox mailbox configuration entry \"{}\" should have a \"path\" value set pointing to an mbox file.", |
3042 | + "mbox mailbox configuration entry \"{}\" should have a \"path\" value set \ |
3043 | + pointing to an mbox file.", |
3044 | k |
3045 | ))); |
3046 | } |
3047 | diff --git a/melib/src/backends/nntp.rs b/melib/src/backends/nntp.rs |
3048 | index 4615bc9..a6d96f2 100644 |
3049 | --- a/melib/src/backends/nntp.rs |
3050 | +++ b/melib/src/backends/nntp.rs |
3051 | @@ -21,14 +21,14 @@ |
3052 | |
3053 | //! # NNTP backend / client |
3054 | //! |
3055 | - //! Implements an NNTP client as specified by [RFC 3977: Network News Transfer Protocol |
3056 | - //! (NNTP)](https://datatracker.ietf.org/doc/html/rfc3977). Also implements [RFC 6048: Network News |
3057 | + //! Implements an NNTP client as specified by [RFC 3977: Network News Transfer |
3058 | + //! Protocol (NNTP)](https://datatracker.ietf.org/doc/html/rfc3977). Also implements [RFC 6048: Network News |
3059 | //! Transfer Protocol (NNTP) Additions to LIST |
3060 | //! Command](https://datatracker.ietf.org/doc/html/rfc6048). |
3061 | |
3062 | - use crate::get_conf_val; |
3063 | - use crate::get_path_hash; |
3064 | use smallvec::SmallVec; |
3065 | + |
3066 | + use crate::{get_conf_val, get_path_hash}; |
3067 | #[macro_use] |
3068 | mod protocol_parser; |
3069 | pub use protocol_parser::*; |
3070 | @@ -37,21 +37,26 @@ pub use mailbox::*; |
3071 | mod operations; |
3072 | pub use operations::*; |
3073 | mod connection; |
3074 | - pub use connection::*; |
3075 | + use std::{ |
3076 | + collections::{hash_map::DefaultHasher, BTreeSet, HashMap, HashSet}, |
3077 | + hash::Hasher, |
3078 | + pin::Pin, |
3079 | + str::FromStr, |
3080 | + sync::{Arc, Mutex}, |
3081 | + time::{Duration, Instant}, |
3082 | + }; |
3083 | |
3084 | - use crate::conf::AccountSettings; |
3085 | - use crate::connections::timeout; |
3086 | - use crate::email::*; |
3087 | - use crate::error::{Error, Result, ResultIntoError}; |
3088 | - use crate::{backends::*, Collection}; |
3089 | - use futures::lock::Mutex as FutureMutex; |
3090 | - use futures::stream::Stream; |
3091 | - use std::collections::{hash_map::DefaultHasher, BTreeSet, HashMap, HashSet}; |
3092 | - use std::hash::Hasher; |
3093 | - use std::pin::Pin; |
3094 | - use std::str::FromStr; |
3095 | - use std::sync::{Arc, Mutex}; |
3096 | - use std::time::{Duration, Instant}; |
3097 | + pub use connection::*; |
3098 | + use futures::{lock::Mutex as FutureMutex, stream::Stream}; |
3099 | + |
3100 | + use crate::{ |
3101 | + backends::*, |
3102 | + conf::AccountSettings, |
3103 | + connections::timeout, |
3104 | + email::*, |
3105 | + error::{Error, Result, ResultIntoError}, |
3106 | + Collection, |
3107 | + }; |
3108 | pub type UID = usize; |
3109 | |
3110 | macro_rules! get_conf_val { |
3111 | @@ -253,9 +258,21 @@ impl MailBackend for NntpType { |
3112 | let uid_store = self.uid_store.clone(); |
3113 | let connection = self.connection.clone(); |
3114 | Ok(Box::pin(async move { |
3115 | - /* To get updates, either issue NEWNEWS if it's supported by the server, and fallback |
3116 | - * to OVER otherwise */ |
3117 | - let mbox: NntpMailbox = uid_store.mailboxes.lock().await.get(&mailbox_hash).map(std::clone::Clone::clone).ok_or_else(|| Error::new(format!("Mailbox with hash {} not found in NNTP connection, this could possibly be a bug or it was deleted.", mailbox_hash)))?; |
3118 | + /* To get updates, either issue NEWNEWS if it's supported by the server, and |
3119 | + * fallback to OVER otherwise */ |
3120 | + let mbox: NntpMailbox = uid_store |
3121 | + .mailboxes |
3122 | + .lock() |
3123 | + .await |
3124 | + .get(&mailbox_hash) |
3125 | + .map(std::clone::Clone::clone) |
3126 | + .ok_or_else(|| { |
3127 | + Error::new(format!( |
3128 | + "Mailbox with hash {} not found in NNTP connection, this could possibly \ |
3129 | + be a bug or it was deleted.", |
3130 | + mailbox_hash |
3131 | + )) |
3132 | + })?; |
3133 | let latest_article: Option<crate::UnixTimestamp> = *mbox.latest_article.lock().unwrap(); |
3134 | let (over_msgid_support, newnews_support): (bool, bool) = { |
3135 | let caps = uid_store.capabilities.lock().unwrap(); |
3136 | @@ -374,15 +391,15 @@ impl MailBackend for NntpType { |
3137 | } |
3138 | |
3139 | fn operation(&self, env_hash: EnvelopeHash) -> Result<Box<dyn BackendOp>> { |
3140 | - let (uid, mailbox_hash) = if let Some(v) = |
3141 | - self.uid_store.hash_index.lock().unwrap().get(&env_hash) |
3142 | - { |
3143 | - *v |
3144 | - } else { |
3145 | - return Err(Error::new( |
3146 | - "Message not found in local cache, it might have been deleted before you requested it." |
3147 | + let (uid, mailbox_hash) = |
3148 | + if let Some(v) = self.uid_store.hash_index.lock().unwrap().get(&env_hash) { |
3149 | + *v |
3150 | + } else { |
3151 | + return Err(Error::new( |
3152 | + "Message not found in local cache, it might have been deleted before you \ |
3153 | + requested it.", |
3154 | )); |
3155 | - }; |
3156 | + }; |
3157 | Ok(Box::new(NntpOp::new( |
3158 | uid, |
3159 | mailbox_hash, |
3160 | @@ -671,34 +688,35 @@ impl NntpType { |
3161 | pub fn validate_config(s: &mut AccountSettings) -> Result<()> { |
3162 | let mut keys: HashSet<&'static str> = Default::default(); |
3163 | macro_rules! get_conf_val { |
3164 | - ($s:ident[$var:literal]) => {{ |
3165 | - keys.insert($var); |
3166 | - $s.extra.remove($var).ok_or_else(|| { |
3167 | - Error::new(format!( |
3168 | - "Configuration error ({}): NNTP connection requires the field `{}` set", |
3169 | - $s.name.as_str(), |
3170 | - $var |
3171 | - )) |
3172 | - }) |
3173 | - }}; |
3174 | - ($s:ident[$var:literal], $default:expr) => {{ |
3175 | - keys.insert($var); |
3176 | - $s.extra |
3177 | - .remove($var) |
3178 | - .map(|v| { |
3179 | - <_>::from_str(&v).map_err(|e| { |
3180 | + ($s:ident[$var:literal]) => {{ |
3181 | + keys.insert($var); |
3182 | + $s.extra.remove($var).ok_or_else(|| { |
3183 | Error::new(format!( |
3184 | - "Configuration error ({}) NNTP: Invalid value for field `{}`: {}\n{}", |
3185 | + "Configuration error ({}): NNTP connection requires the field `{}` set", |
3186 | $s.name.as_str(), |
3187 | - $var, |
3188 | - v, |
3189 | - e |
3190 | + $var |
3191 | )) |
3192 | }) |
3193 | - }) |
3194 | - .unwrap_or_else(|| Ok($default)) |
3195 | - }}; |
3196 | - } |
3197 | + }}; |
3198 | + ($s:ident[$var:literal], $default:expr) => {{ |
3199 | + keys.insert($var); |
3200 | + $s.extra |
3201 | + .remove($var) |
3202 | + .map(|v| { |
3203 | + <_>::from_str(&v).map_err(|e| { |
3204 | + Error::new(format!( |
3205 | + "Configuration error ({}) NNTP: Invalid value for field `{}`: \ |
3206 | + {}\n{}", |
3207 | + $s.name.as_str(), |
3208 | + $var, |
3209 | + v, |
3210 | + e |
3211 | + )) |
3212 | + }) |
3213 | + }) |
3214 | + .unwrap_or_else(|| Ok($default)) |
3215 | + }}; |
3216 | + } |
3217 | get_conf_val!(s["require_auth"], false)?; |
3218 | get_conf_val!(s["server_hostname"])?; |
3219 | get_conf_val!(s["server_username"], String::new())?; |
3220 | @@ -706,7 +724,8 @@ impl NntpType { |
3221 | get_conf_val!(s["server_password"], String::new())?; |
3222 | } else if s.extra.contains_key("server_password") { |
3223 | return Err(Error::new(format!( |
3224 | - "Configuration error ({}): both server_password and server_password_command are set, cannot choose", |
3225 | + "Configuration error ({}): both server_password and server_password_command are \ |
3226 | + set, cannot choose", |
3227 | s.name.as_str(), |
3228 | ))); |
3229 | } |
3230 | @@ -716,7 +735,8 @@ impl NntpType { |
3231 | let use_starttls = get_conf_val!(s["use_starttls"], server_port != 563)?; |
3232 | if !use_tls && use_starttls { |
3233 | return Err(Error::new(format!( |
3234 | - "Configuration error ({}): incompatible use_tls and use_starttls values: use_tls = false, use_starttls = true", |
3235 | + "Configuration error ({}): incompatible use_tls and use_starttls values: use_tls \ |
3236 | + = false, use_starttls = true", |
3237 | s.name.as_str(), |
3238 | ))); |
3239 | } |
3240 | @@ -725,7 +745,8 @@ impl NntpType { |
3241 | #[cfg(not(feature = "deflate_compression"))] |
3242 | if s.extra.contains_key("use_deflate") { |
3243 | return Err(Error::new(format!( |
3244 | - "Configuration error ({}): setting `use_deflate` is set but this version of meli isn't compiled with DEFLATE support.", |
3245 | + "Configuration error ({}): setting `use_deflate` is set but this version of meli \ |
3246 | + isn't compiled with DEFLATE support.", |
3247 | s.name.as_str(), |
3248 | ))); |
3249 | } |
3250 | @@ -738,8 +759,10 @@ impl NntpType { |
3251 | let diff = extra_keys.difference(&keys).collect::<Vec<&&str>>(); |
3252 | if !diff.is_empty() { |
3253 | return Err(Error::new(format!( |
3254 | - "Configuration error ({}) NNTP: the following flags are set but are not recognized: {:?}.", |
3255 | - s.name.as_str(), diff |
3256 | + "Configuration error ({}) NNTP: the following flags are set but are not \ |
3257 | + recognized: {:?}.", |
3258 | + s.name.as_str(), |
3259 | + diff |
3260 | ))); |
3261 | } |
3262 | Ok(()) |
3263 | diff --git a/melib/src/backends/nntp/connection.rs b/melib/src/backends/nntp/connection.rs |
3264 | index 21d10fd..6eafefe 100644 |
3265 | --- a/melib/src/backends/nntp/connection.rs |
3266 | +++ b/melib/src/backends/nntp/connection.rs |
3267 | @@ -19,19 +19,18 @@ |
3268 | * along with meli. If not, see <http://www.gnu.org/licenses/>. |
3269 | */ |
3270 | |
3271 | - use crate::backends::{BackendMailbox, MailboxHash}; |
3272 | - use crate::connections::{lookup_ipv4, Connection}; |
3273 | - use crate::email::parser::BytesExt; |
3274 | - use crate::error::*; |
3275 | + use crate::{ |
3276 | + backends::{BackendMailbox, MailboxHash}, |
3277 | + connections::{lookup_ipv4, Connection}, |
3278 | + email::parser::BytesExt, |
3279 | + error::*, |
3280 | + }; |
3281 | extern crate native_tls; |
3282 | + use std::{collections::HashSet, future::Future, pin::Pin, sync::Arc, time::Instant}; |
3283 | + |
3284 | use futures::io::{AsyncReadExt, AsyncWriteExt}; |
3285 | use native_tls::TlsConnector; |
3286 | pub use smol::Async as AsyncWrapper; |
3287 | - use std::collections::HashSet; |
3288 | - use std::future::Future; |
3289 | - use std::pin::Pin; |
3290 | - use std::sync::Arc; |
3291 | - use std::time::Instant; |
3292 | |
3293 | use super::{Capabilities, NntpServerConf, UIDStore}; |
3294 | |
3295 | diff --git a/melib/src/backends/nntp/mailbox.rs b/melib/src/backends/nntp/mailbox.rs |
3296 | index 67b976e..7cb0d08 100644 |
3297 | --- a/melib/src/backends/nntp/mailbox.rs |
3298 | +++ b/melib/src/backends/nntp/mailbox.rs |
3299 | @@ -19,13 +19,16 @@ |
3300 | * along with meli. If not, see <http://www.gnu.org/licenses/>. |
3301 | */ |
3302 | |
3303 | - use crate::backends::{ |
3304 | - BackendMailbox, LazyCountSet, Mailbox, MailboxHash, MailboxPermissions, SpecialUsageMailbox, |
3305 | - }; |
3306 | - use crate::error::*; |
3307 | - use crate::UnixTimestamp; |
3308 | use std::sync::{Arc, Mutex}; |
3309 | |
3310 | + use crate::{ |
3311 | + backends::{ |
3312 | + BackendMailbox, LazyCountSet, Mailbox, MailboxHash, MailboxPermissions, SpecialUsageMailbox, |
3313 | + }, |
3314 | + error::*, |
3315 | + UnixTimestamp, |
3316 | + }; |
3317 | + |
3318 | #[derive(Debug, Default, Clone)] |
3319 | pub struct NntpMailbox { |
3320 | pub(super) hash: MailboxHash, |
3321 | diff --git a/melib/src/backends/nntp/operations.rs b/melib/src/backends/nntp/operations.rs |
3322 | index 6bff363..6ea5e6b 100644 |
3323 | --- a/melib/src/backends/nntp/operations.rs |
3324 | +++ b/melib/src/backends/nntp/operations.rs |
3325 | @@ -19,13 +19,11 @@ |
3326 | * along with meli. If not, see <http://www.gnu.org/licenses/>. |
3327 | */ |
3328 | |
3329 | - use super::*; |
3330 | - |
3331 | - use crate::backends::*; |
3332 | - use crate::email::*; |
3333 | - use crate::error::Error; |
3334 | use std::sync::Arc; |
3335 | |
3336 | + use super::*; |
3337 | + use crate::{backends::*, email::*, error::Error}; |
3338 | + |
3339 | /// `BackendOp` implementor for Nntp |
3340 | #[derive(Debug, Clone)] |
3341 | pub struct NntpOp { |
3342 | diff --git a/melib/src/backends/nntp/protocol_parser.rs b/melib/src/backends/nntp/protocol_parser.rs |
3343 | index 2501288..1f61929 100644 |
3344 | --- a/melib/src/backends/nntp/protocol_parser.rs |
3345 | +++ b/melib/src/backends/nntp/protocol_parser.rs |
3346 | @@ -19,13 +19,15 @@ |
3347 | * along with meli. If not, see <http://www.gnu.org/licenses/>. |
3348 | */ |
3349 | |
3350 | - use super::*; |
3351 | - use crate::email::parser::IResult; |
3352 | + use std::str::FromStr; |
3353 | + |
3354 | use nom::{ |
3355 | bytes::complete::{is_not, tag}, |
3356 | combinator::opt, |
3357 | }; |
3358 | - use std::str::FromStr; |
3359 | + |
3360 | + use super::*; |
3361 | + use crate::email::parser::IResult; |
3362 | |
3363 | pub struct NntpLineIterator<'a> { |
3364 | slice: &'a str, |
3365 | diff --git a/melib/src/backends/notmuch.rs b/melib/src/backends/notmuch.rs |
3366 | index 8c7cca0..4a582cc 100644 |
3367 | --- a/melib/src/backends/notmuch.rs |
3368 | +++ b/melib/src/backends/notmuch.rs |
3369 | @@ -19,18 +19,25 @@ |
3370 | * along with meli. If not, see <http://www.gnu.org/licenses/>. |
3371 | */ |
3372 | |
3373 | - use crate::conf::AccountSettings; |
3374 | - use crate::email::{Envelope, EnvelopeHash, Flag}; |
3375 | - use crate::error::{Error, Result}; |
3376 | - use crate::shellexpand::ShellExpandTrait; |
3377 | - use crate::{backends::*, Collection}; |
3378 | + use std::{ |
3379 | + collections::{hash_map::HashMap, BTreeMap}, |
3380 | + ffi::{CStr, CString, OsStr}, |
3381 | + io::Read, |
3382 | + os::unix::ffi::OsStrExt, |
3383 | + path::{Path, PathBuf}, |
3384 | + sync::{Arc, Mutex, RwLock}, |
3385 | + }; |
3386 | + |
3387 | use smallvec::SmallVec; |
3388 | - use std::collections::{hash_map::HashMap, BTreeMap}; |
3389 | - use std::ffi::{CStr, CString, OsStr}; |
3390 | - use std::io::Read; |
3391 | - use std::os::unix::ffi::OsStrExt; |
3392 | - use std::path::{Path, PathBuf}; |
3393 | - use std::sync::{Arc, Mutex, RwLock}; |
3394 | + |
3395 | + use crate::{ |
3396 | + backends::*, |
3397 | + conf::AccountSettings, |
3398 | + email::{Envelope, EnvelopeHash, Flag}, |
3399 | + error::{Error, Result}, |
3400 | + shellexpand::ShellExpandTrait, |
3401 | + Collection, |
3402 | + }; |
3403 | |
3404 | macro_rules! call { |
3405 | ($lib:expr, $func:ty) => {{ |
3406 | @@ -316,9 +323,14 @@ impl NotmuchDb { |
3407 | Ok(l) => l, |
3408 | Err(err) => { |
3409 | if custom_dlpath { |
3410 | - return Err(Error::new(format!("Notmuch `library_file_path` setting value `{}` for account {} does not exist or is a directory or not a valid library file.",dlpath, s.name())) |
3411 | - .set_kind(ErrorKind::Configuration) |
3412 | - .set_source(Some(Arc::new(err)))); |
3413 | + return Err(Error::new(format!( |
3414 | + "Notmuch `library_file_path` setting value `{}` for account {} does \ |
3415 | + not exist or is a directory or not a valid library file.", |
3416 | + dlpath, |
3417 | + s.name() |
3418 | + )) |
3419 | + .set_kind(ErrorKind::Configuration) |
3420 | + .set_source(Some(Arc::new(err)))); |
3421 | } else { |
3422 | return Err(Error::new("Could not load libnotmuch!") |
3423 | .set_details(super::NOTMUCH_ERROR_DETAILS) |
3424 | @@ -347,10 +359,12 @@ impl NotmuchDb { |
3425 | path.push(".notmuch"); |
3426 | if !path.exists() || !path.is_dir() { |
3427 | return Err(Error::new(format!( |
3428 | - "Notmuch `root_mailbox` {} for account {} does not contain a `.notmuch` subdirectory.", |
3429 | + "Notmuch `root_mailbox` {} for account {} does not contain a `.notmuch` \ |
3430 | + subdirectory.", |
3431 | s.root_mailbox.as_str(), |
3432 | s.name() |
3433 | - )).set_kind(ErrorKind::Configuration)); |
3434 | + )) |
3435 | + .set_kind(ErrorKind::Configuration)); |
3436 | } |
3437 | path.pop(); |
3438 | |
3439 | @@ -378,7 +392,8 @@ impl NotmuchDb { |
3440 | ); |
3441 | } else { |
3442 | return Err(Error::new(format!( |
3443 | - "notmuch mailbox configuration entry `{}` for account {} should have a `query` value set.", |
3444 | + "notmuch mailbox configuration entry `{}` for account {} should have a \ |
3445 | + `query` value set.", |
3446 | k, |
3447 | s.name(), |
3448 | )) |
3449 | @@ -399,7 +414,8 @@ impl NotmuchDb { |
3450 | mailboxes.entry(hash).or_default().parent = Some(parent_hash); |
3451 | } else { |
3452 | return Err(Error::new(format!( |
3453 | - "Mailbox configuration for `{}` defines its parent mailbox as `{}` but no mailbox exists with this exact name.", |
3454 | + "Mailbox configuration for `{}` defines its parent mailbox as `{}` but no \ |
3455 | + mailbox exists with this exact name.", |
3456 | mailboxes[&hash].name(), |
3457 | parent |
3458 | )) |
3459 | @@ -445,10 +461,12 @@ impl NotmuchDb { |
3460 | path.push(".notmuch"); |
3461 | if !path.exists() || !path.is_dir() { |
3462 | return Err(Error::new(format!( |
3463 | - "Notmuch `root_mailbox` {} for account {} does not contain a `.notmuch` subdirectory.", |
3464 | + "Notmuch `root_mailbox` {} for account {} does not contain a `.notmuch` \ |
3465 | + subdirectory.", |
3466 | s.root_mailbox.as_str(), |
3467 | s.name() |
3468 | - )).set_kind(ErrorKind::Configuration)); |
3469 | + )) |
3470 | + .set_kind(ErrorKind::Configuration)); |
3471 | } |
3472 | path.pop(); |
3473 | |
3474 | @@ -456,19 +474,21 @@ impl NotmuchDb { |
3475 | if let Some(lib_path) = s.extra.remove("library_file_path") { |
3476 | if !Path::new(&lib_path).exists() || Path::new(&lib_path).is_dir() { |
3477 | return Err(Error::new(format!( |
3478 | - "Notmuch `library_file_path` setting value `{}` for account {} does not exist or is a directory.", |
3479 | - &lib_path, |
3480 | - s.name() |
3481 | - )).set_kind(ErrorKind::Configuration)); |
3482 | + "Notmuch `library_file_path` setting value `{}` for account {} does not exist \ |
3483 | + or is a directory.", |
3484 | + &lib_path, |
3485 | + s.name() |
3486 | + )) |
3487 | + .set_kind(ErrorKind::Configuration)); |
3488 | } |
3489 | } |
3490 | let mut parents: Vec<(String, String)> = Vec::with_capacity(s.mailboxes.len()); |
3491 | for (k, f) in s.mailboxes.iter_mut() { |
3492 | if f.extra.remove("query").is_none() { |
3493 | return Err(Error::new(format!( |
3494 | - "notmuch mailbox configuration entry `{}` for account {} should have a `query` value set.", |
3495 | - k, |
3496 | - account_name, |
3497 | + "notmuch mailbox configuration entry `{}` for account {} should have a \ |
3498 | + `query` value set.", |
3499 | + k, account_name, |
3500 | )) |
3501 | .set_kind(ErrorKind::Configuration)); |
3502 | } |
3503 | @@ -480,9 +500,9 @@ impl NotmuchDb { |
3504 | for (mbox, parent) in parents.iter() { |
3505 | if !s.mailboxes.contains_key(parent) { |
3506 | return Err(Error::new(format!( |
3507 | - "Mailbox configuration for `{}` defines its parent mailbox as `{}` but no mailbox exists with this exact name.", |
3508 | - mbox, |
3509 | - parent |
3510 | + "Mailbox configuration for `{}` defines its parent mailbox as `{}` but no \ |
3511 | + mailbox exists with this exact name.", |
3512 | + mbox, parent |
3513 | )) |
3514 | .set_kind(ErrorKind::Configuration)); |
3515 | } |
3516 | diff --git a/melib/src/backends/notmuch/bindings.rs b/melib/src/backends/notmuch/bindings.rs |
3517 | index 8841e97..acb4257 100644 |
3518 | --- a/melib/src/backends/notmuch/bindings.rs |
3519 | +++ b/melib/src/backends/notmuch/bindings.rs |
3520 | @@ -244,7 +244,6 @@ pub type notmuch_database_open_verbose = unsafe extern "C" fn( |
3521 | ) -> notmuch_status_t; |
3522 | |
3523 | /// Retrieve last status string for given database. |
3524 | - /// |
3525 | pub type notmuch_database_status_string = |
3526 | unsafe extern "C" fn(notmuch: *const notmuch_database_t) -> *const ::std::os::raw::c_char; |
3527 | |
3528 | @@ -509,7 +508,6 @@ extern "C" { |
3529 | /// @deprecated Deprecated as of libnotmuch 5.1 (notmuch 0.26). Please |
3530 | /// use notmuch_database_index_file instead. |
3531 | /// ``` |
3532 | - /// |
3533 | pub fn notmuch_database_add_message( |
3534 | database: *mut notmuch_database_t, |
3535 | filename: *const ::std::os::raw::c_char, |
3536 | @@ -751,7 +749,7 @@ pub type notmuch_query_add_tag_exclude = unsafe extern "C" fn( |
3537 | /// } |
3538 | /// |
3539 | /// notmuch_query_destroy (query); |
3540 | - ///``` |
3541 | + /// ``` |
3542 | /// |
3543 | /// Note: If you are finished with a thread before its containing |
3544 | /// query, you can call notmuch_thread_destroy to clean up some memory |
3545 | @@ -779,7 +777,6 @@ pub type notmuch_query_search_threads = unsafe extern "C" fn( |
3546 | /// @deprecated Deprecated as of libnotmuch 5 (notmuch 0.25). Please |
3547 | /// ``` |
3548 | /// use notmuch_query_search_threads instead. |
3549 | - /// |
3550 | pub type notmuch_query_search_threads_st = unsafe extern "C" fn( |
3551 | query: *mut notmuch_query_t, |
3552 | out: *mut *mut notmuch_threads_t, |
3553 | @@ -809,7 +806,7 @@ pub type notmuch_query_search_threads_st = unsafe extern "C" fn( |
3554 | /// } |
3555 | /// |
3556 | /// notmuch_query_destroy (query); |
3557 | - ///``` |
3558 | + /// ``` |
3559 | /// |
3560 | /// Note: If you are finished with a message before its containing |
3561 | /// query, you can call notmuch_message_destroy to clean up some memory |
3562 | @@ -839,7 +836,6 @@ pub type notmuch_query_search_messages = unsafe extern "C" fn( |
3563 | /// @deprecated Deprecated as of libnotmuch 5 (notmuch 0.25). Please use |
3564 | /// ``` |
3565 | /// notmuch_query_search_messages instead. |
3566 | - /// |
3567 | pub type notmuch_query_search_messages_st = unsafe extern "C" fn( |
3568 | query: *mut notmuch_query_t, |
3569 | out: *mut *mut notmuch_messages_t, |
3570 | @@ -1091,7 +1087,7 @@ pub type notmuch_thread_get_newest_date = |
3571 | /// } |
3572 | /// |
3573 | /// notmuch_thread_destroy (thread); |
3574 | - ///``` |
3575 | + /// ``` |
3576 | /// |
3577 | /// Note that there's no explicit destructor needed for the |
3578 | /// notmuch_tags_t object. (For consistency, we do provide a |
3579 | @@ -1250,7 +1246,8 @@ pub type notmuch_message_get_filename = |
3580 | pub type notmuch_message_get_filenames = |
3581 | unsafe extern "C" fn(message: *mut notmuch_message_t) -> *mut notmuch_filenames_t; |
3582 | |
3583 | - /// Re-index the e-mail corresponding to 'message' using the supplied index options |
3584 | + /// Re-index the e-mail corresponding to 'message' using the supplied index |
3585 | + /// options |
3586 | /// |
3587 | /// Returns the status of the re-index operation. (see the return |
3588 | /// codes documented in notmuch_database_index_file) |
3589 | @@ -1333,7 +1330,7 @@ pub type notmuch_message_get_header = unsafe extern "C" fn( |
3590 | /// } |
3591 | /// |
3592 | /// notmuch_message_destroy (message); |
3593 | - ///``` |
3594 | + /// ``` |
3595 | /// |
3596 | /// Note that there's no explicit destructor needed for the |
3597 | /// notmuch_tags_t object. (For consistency, we do provide a |
3598 | @@ -1423,7 +1420,6 @@ pub type notmuch_message_maildir_flags_to_tags = |
3599 | |
3600 | /// return TRUE if any filename of 'message' has maildir flag 'flag', |
3601 | /// FALSE otherwise. |
3602 | - /// |
3603 | pub type notmuch_message_has_maildir_flag = unsafe extern "C" fn( |
3604 | message: *mut notmuch_message_t, |
3605 | flag: ::std::os::raw::c_char, |
3606 | @@ -1673,7 +1669,7 @@ extern "C" { |
3607 | /// } |
3608 | /// |
3609 | /// notmuch_message_properties_destroy (list); |
3610 | - ///``` |
3611 | + /// ``` |
3612 | /// |
3613 | /// Note that there's no explicit destructor needed for the |
3614 | /// notmuch_message_properties_t object. (For consistency, we do |
3615 | @@ -1689,7 +1685,8 @@ extern "C" { |
3616 | exact: notmuch_bool_t, |
3617 | ) -> *mut notmuch_message_properties_t; |
3618 | } |
3619 | - /// Return the number of properties named "key" belonging to the specific message. |
3620 | + /// Return the number of properties named "key" belonging to the specific |
3621 | + /// message. |
3622 | /// |
3623 | /// ```text |
3624 | /// @param[in] message The message to examine |
3625 | @@ -1970,7 +1967,8 @@ pub type notmuch_database_get_config_list = unsafe extern "C" fn( |
3626 | out: *mut *mut notmuch_config_list_t, |
3627 | ) -> notmuch_status_t; |
3628 | |
3629 | - /// Is 'config_list' iterator valid (i.e. _key, _value, _move_to_next can be called). |
3630 | + /// Is 'config_list' iterator valid (i.e. _key, _value, _move_to_next can be |
3631 | + /// called). |
3632 | /// |
3633 | /// ```text |
3634 | /// @since libnotmuch 4.4 (notmuch 0.23) |
3635 | diff --git a/melib/src/backends/utf7.rs b/melib/src/backends/utf7.rs |
3636 | index 12218d8..d8ef008 100644 |
3637 | --- a/melib/src/backends/utf7.rs |
3638 | +++ b/melib/src/backends/utf7.rs |
3639 | @@ -3,23 +3,23 @@ |
3640 | * |
3641 | * Copyright (c) 2021 Ilya Medvedev |
3642 | * |
3643 | - * Permission is hereby granted, free of charge, to any person obtaining a copy |
3644 | - * of this software and associated documentation files (the "Software"), to deal |
3645 | - * in the Software without restriction, including without limitation the rights |
3646 | - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
3647 | - * copies of the Software, and to permit persons to whom the Software is |
3648 | - * furnished to do so, subject to the following conditions: |
3649 | + * Permission is hereby granted, free of charge, to any person obtaining a |
3650 | + * copy of this software and associated documentation files (the "Software"), |
3651 | + * to deal in the Software without restriction, including without limitation |
3652 | + * the rights to use, copy, modify, merge, publish, distribute, sublicense, |
3653 | + * and/or sell copies of the Software, and to permit persons to whom the |
3654 | + * Software is furnished to do so, subject to the following conditions: |
3655 | * |
3656 | - * The above copyright notice and this permission notice shall be included in all |
3657 | - * copies or substantial portions of the Software. |
3658 | + * The above copyright notice and this permission notice shall be included in |
3659 | + * all copies or substantial portions of the Software. |
3660 | * |
3661 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
3662 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
3663 | - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
3664 | - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
3665 | - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
3666 | - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE |
3667 | - * SOFTWARE. |
3668 | + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL |
3669 | + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
3670 | + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING |
3671 | + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
3672 | + * DEALINGS IN THE SOFTWARE. |
3673 | */ |
3674 | |
3675 | /* Code from <https://github.com/iam-medvedev/rust-utf7-imap> */ |
3676 | @@ -111,7 +111,7 @@ fn encode_modified_utf7(text: &str) -> String { |
3677 | /// <https://datatracker.ietf.org/doc/html/rfc3501#section-5.1.3> |
3678 | pub fn decode_utf7_imap(text: &str) -> String { |
3679 | let pattern = Regex::new(r"&([^-]*)-").unwrap(); |
3680 | - pattern.replace_all(&text, expand).to_string() |
3681 | + pattern.replace_all(text, expand).to_string() |
3682 | } |
3683 | |
3684 | fn expand(cap: &Captures) -> String { |
3685 | diff --git a/melib/src/collection.rs b/melib/src/collection.rs |
3686 | index 7320ab6..3fed758 100644 |
3687 | --- a/melib/src/collection.rs |
3688 | +++ b/melib/src/collection.rs |
3689 | @@ -19,13 +19,16 @@ |
3690 | * along with meli. If not, see <http://www.gnu.org/licenses/>. |
3691 | */ |
3692 | |
3693 | - use super::*; |
3694 | - use crate::backends::{MailboxHash, TagHash}; |
3695 | + use std::{ |
3696 | + collections::{BTreeMap, HashMap, HashSet}, |
3697 | + ops::{Deref, DerefMut}, |
3698 | + sync::{Arc, RwLock, RwLockReadGuard, RwLockWriteGuard}, |
3699 | + }; |
3700 | + |
3701 | use smallvec::SmallVec; |
3702 | - use std::ops::{Deref, DerefMut}; |
3703 | - use std::sync::{Arc, RwLock, RwLockReadGuard, RwLockWriteGuard}; |
3704 | |
3705 | - use std::collections::{BTreeMap, HashMap, HashSet}; |
3706 | + use super::*; |
3707 | + use crate::backends::{MailboxHash, TagHash}; |
3708 | |
3709 | pub type EnvelopeRef<'g> = RwRef<'g, EnvelopeHash, Envelope>; |
3710 | pub type EnvelopeRefMut<'g> = RwRefMut<'g, EnvelopeHash, Envelope>; |
3711 | diff --git a/melib/src/conf.rs b/melib/src/conf.rs |
3712 | index 9f7c1f4..ae182b7 100644 |
3713 | --- a/melib/src/conf.rs |
3714 | +++ b/melib/src/conf.rs |
3715 | @@ -19,13 +19,18 @@ |
3716 | * along with meli. If not, see <http://www.gnu.org/licenses/>. |
3717 | */ |
3718 | |
3719 | - //! Basic mail account configuration to use with [`backends`](./backends/index.html) |
3720 | - use crate::backends::SpecialUsageMailbox; |
3721 | - use crate::error::{Error, Result}; |
3722 | - pub use crate::{SortField, SortOrder}; |
3723 | - use serde::{Deserialize, Deserializer, Serialize, Serializer}; |
3724 | + //! Basic mail account configuration to use with |
3725 | + //! [`backends`](./backends/index.html) |
3726 | use std::collections::HashMap; |
3727 | |
3728 | + use serde::{Deserialize, Deserializer, Serialize, Serializer}; |
3729 | + |
3730 | + use crate::{ |
3731 | + backends::SpecialUsageMailbox, |
3732 | + error::{Error, Result}, |
3733 | + }; |
3734 | + pub use crate::{SortField, SortOrder}; |
3735 | + |
3736 | #[derive(Debug, Serialize, Default, Clone)] |
3737 | pub struct AccountSettings { |
3738 | pub name: String, |
3739 | @@ -87,7 +92,7 @@ impl AccountSettings { |
3740 | pub fn server_password(&self) -> Result<String> { |
3741 | if let Some(cmd) = self.extra.get("server_password_command") { |
3742 | let output = std::process::Command::new("sh") |
3743 | - .args(&["-c", cmd]) |
3744 | + .args(["-c", cmd]) |
3745 | .stdin(std::process::Stdio::piped()) |
3746 | .stdout(std::process::Stdio::piped()) |
3747 | .stderr(std::process::Stdio::piped()) |
3748 | @@ -107,7 +112,10 @@ impl AccountSettings { |
3749 | } else if let Some(pass) = self.extra.get("server_password") { |
3750 | Ok(pass.to_owned()) |
3751 | } else { |
3752 | - Err(Error::new(format!("Configuration error: connection requires either server_password or server_password_command"))) |
3753 | + Err(Error::new(format!( |
3754 | + "Configuration error: connection requires either server_password or \ |
3755 | + server_password_command" |
3756 | + ))) |
3757 | } |
3758 | } |
3759 | } |
3760 | diff --git a/melib/src/connections.rs b/melib/src/connections.rs |
3761 | index 5db98c9..f7674a3 100644 |
3762 | --- a/melib/src/connections.rs |
3763 | +++ b/melib/src/connections.rs |
3764 | @@ -20,6 +20,8 @@ |
3765 | */ |
3766 | |
3767 | //! Connections layers (TCP/fd/TLS/Deflate) to use with remote backends. |
3768 | + use std::{os::unix::io::AsRawFd, time::Duration}; |
3769 | + |
3770 | #[cfg(feature = "deflate_compression")] |
3771 | use flate2::{read::DeflateDecoder, write::DeflateEncoder, Compression}; |
3772 | #[cfg(any(target_os = "openbsd", target_os = "netbsd", target_os = "haiku"))] |
3773 | @@ -35,8 +37,6 @@ use libc::TCP_KEEPALIVE as KEEPALIVE_OPTION; |
3774 | )))] |
3775 | use libc::TCP_KEEPIDLE as KEEPALIVE_OPTION; |
3776 | use libc::{self, c_int, c_void}; |
3777 | - use std::os::unix::io::AsRawFd; |
3778 | - use std::time::Duration; |
3779 | |
3780 | #[derive(Debug)] |
3781 | pub enum Connection { |
3782 | diff --git a/melib/src/datetime.rs b/melib/src/datetime.rs |
3783 | index 73a3ae9..3084bae 100644 |
3784 | --- a/melib/src/datetime.rs |
3785 | +++ b/melib/src/datetime.rs |
3786 | @@ -37,11 +37,14 @@ |
3787 | //! let s = timestamp_to_string(timestamp, Some("%Y-%m-%d"), true); |
3788 | //! assert_eq!(s, "2020-01-08"); |
3789 | //! ``` |
3790 | + use std::{ |
3791 | + borrow::Cow, |
3792 | + convert::TryInto, |
3793 | + ffi::{CStr, CString}, |
3794 | + os::raw::c_int, |
3795 | + }; |
3796 | + |
3797 | use crate::error::{Result, ResultIntoError}; |
3798 | - use std::borrow::Cow; |
3799 | - use std::convert::TryInto; |
3800 | - use std::ffi::{CStr, CString}; |
3801 | - use std::os::raw::c_int; |
3802 | |
3803 | pub type UnixTimestamp = u64; |
3804 | pub const RFC3339_FMT_WITH_TIME: &str = "%Y-%m-%dT%H:%M:%S\0"; |
3805 | @@ -122,7 +125,8 @@ impl Drop for Locale { |
3806 | } |
3807 | } |
3808 | |
3809 | - // How to unit test this? Test machine is not guaranteed to have non-english locales. |
3810 | + // How to unit test this? Test machine is not guaranteed to have non-english |
3811 | + // locales. |
3812 | impl Locale { |
3813 | #[cfg(not(target_os = "netbsd"))] |
3814 | fn new( |
3815 | diff --git a/melib/src/email.rs b/melib/src/email.rs |
3816 | index 23b2d8d..37a6554 100644 |
3817 | --- a/melib/src/email.rs |
3818 | +++ b/melib/src/email.rs |
3819 | @@ -24,8 +24,9 @@ |
3820 | * |
3821 | * # Parsing bytes into an `Envelope` |
3822 | * |
3823 | - * An [`Envelope`](Envelope) represents the information you can get from an email's headers and body |
3824 | - * structure. Addresses in `To`, `From` fields etc are parsed into [`Address`](crate::email::Address) types. |
3825 | + * An [`Envelope`](Envelope) represents the information you can get from an |
3826 | + * email's headers and body structure. Addresses in `To`, `From` fields etc |
3827 | + * are parsed into [`Address`](crate::email::Address) types. |
3828 | * |
3829 | * ``` |
3830 | * use melib::{Attachment, Envelope}; |
3831 | @@ -75,7 +76,10 @@ |
3832 | * |
3833 | * let envelope = Envelope::from_bytes(raw_mail.as_bytes(), None).expect("Could not parse mail"); |
3834 | * assert_eq!(envelope.subject().as_ref(), "gratuitously encoded subject"); |
3835 | - * assert_eq!(envelope.message_id_display().as_ref(), "<h2g7f.z0gy2pgaen5m@example.com>"); |
3836 | + * assert_eq!( |
3837 | + * envelope.message_id_display().as_ref(), |
3838 | + * "<h2g7f.z0gy2pgaen5m@example.com>" |
3839 | + * ); |
3840 | * |
3841 | * let body = envelope.body_bytes(raw_mail.as_bytes()); |
3842 | * assert_eq!(body.content_type().to_string().as_str(), "multipart/mixed"); |
3843 | @@ -85,7 +89,10 @@ |
3844 | * |
3845 | * let subattachments: Vec<Attachment> = body.attachments(); |
3846 | * assert_eq!(subattachments.len(), 3); |
3847 | - * assert_eq!(subattachments[2].content_type().name().unwrap(), "test_image.gif"); |
3848 | + * assert_eq!( |
3849 | + * subattachments[2].content_type().name().unwrap(), |
3850 | + * "test_image.gif" |
3851 | + * ); |
3852 | * ``` |
3853 | */ |
3854 | |
3855 | @@ -99,22 +106,22 @@ pub mod mailto; |
3856 | pub mod parser; |
3857 | pub mod pgp; |
3858 | |
3859 | + use std::{borrow::Cow, convert::TryInto, ops::Deref}; |
3860 | + |
3861 | pub use address::{Address, MessageID, References, StrBuild, StrBuilder}; |
3862 | pub use attachments::{Attachment, AttachmentBuilder}; |
3863 | pub use compose::{attachment_from_file, Draft}; |
3864 | pub use headers::*; |
3865 | pub use mailto::*; |
3866 | - |
3867 | - use crate::datetime::UnixTimestamp; |
3868 | - use crate::error::{Error, Result}; |
3869 | - use crate::parser::BytesExt; |
3870 | - use crate::thread::ThreadNodeHash; |
3871 | - use crate::TagHash; |
3872 | - |
3873 | use smallvec::SmallVec; |
3874 | - use std::borrow::Cow; |
3875 | - use std::convert::TryInto; |
3876 | - use std::ops::Deref; |
3877 | + |
3878 | + use crate::{ |
3879 | + datetime::UnixTimestamp, |
3880 | + error::{Error, Result}, |
3881 | + parser::BytesExt, |
3882 | + thread::ThreadNodeHash, |
3883 | + TagHash, |
3884 | + }; |
3885 | |
3886 | bitflags! { |
3887 | #[derive(Default, Serialize, Deserialize)] |
3888 | @@ -159,9 +166,10 @@ impl Flag { |
3889 | flag_impl!(fn is_flagged, Flag::FLAGGED); |
3890 | } |
3891 | |
3892 | - ///`Mail` holds both the envelope info of an email in its `envelope` field and the raw bytes that |
3893 | - ///describe the email in `bytes`. Its body as an `melib::email::Attachment` can be parsed on demand |
3894 | - ///with the `melib::email::Mail::body` method. |
3895 | + ///`Mail` holds both the envelope info of an email in its `envelope` field and |
3896 | + /// the raw bytes that describe the email in `bytes`. Its body as an |
3897 | + /// `melib::email::Attachment` can be parsed on demand |
3898 | + /// with the `melib::email::Mail::body` method. |
3899 | #[derive(Debug, Clone, Default)] |
3900 | pub struct Mail { |
3901 | pub envelope: Envelope, |
3902 | @@ -199,12 +207,13 @@ impl Mail { |
3903 | |
3904 | crate::declare_u64_hash!(EnvelopeHash); |
3905 | |
3906 | - /// `Envelope` represents all the header and structure data of an email we need to know. |
3907 | + /// `Envelope` represents all the header and structure data of an email we need |
3908 | + /// to know. |
3909 | /// |
3910 | /// Attachments (the email's body) is parsed on demand with `body` method. |
3911 | /// |
3912 | - ///To access the email attachments, you need to parse them from the raw email bytes into an |
3913 | - ///`Attachment` object. |
3914 | + ///To access the email attachments, you need to parse them from the raw email |
3915 | + /// bytes into an `Attachment` object. |
3916 | #[derive(Clone, Serialize, Deserialize)] |
3917 | pub struct Envelope { |
3918 | pub hash: EnvelopeHash, |
3919 | @@ -364,7 +373,11 @@ impl Envelope { |
3920 | self.has_attachments = |
3921 | Attachment::check_if_has_attachments_quick(body, boundary); |
3922 | } else { |
3923 | - debug!("{:?} has no boundary field set in multipart/mixed content-type field.", &self); |
3924 | + debug!( |
3925 | + "{:?} has no boundary field set in multipart/mixed content-type \ |
3926 | + field.", |
3927 | + &self |
3928 | + ); |
3929 | } |
3930 | } |
3931 | _ => {} |
3932 | diff --git a/melib/src/email/address.rs b/melib/src/email/address.rs |
3933 | index 4c22c43..37d8bb9 100644 |
3934 | --- a/melib/src/email/address.rs |
3935 | +++ b/melib/src/email/address.rs |
3936 | @@ -19,11 +19,15 @@ |
3937 | * along with meli. If not, see <http://www.gnu.org/licenses/>. |
3938 | */ |
3939 | |
3940 | - //! Email addresses. Parsing functions are in [melib::email::parser::address](../parser/address/index.html). |
3941 | + //! Email addresses. Parsing functions are in |
3942 | + //! [melib::email::parser::address](../parser/address/index.html). |
3943 | + use std::{ |
3944 | + collections::HashSet, |
3945 | + convert::TryFrom, |
3946 | + hash::{Hash, Hasher}, |
3947 | + }; |
3948 | + |
3949 | use super::*; |
3950 | - use std::collections::HashSet; |
3951 | - use std::convert::TryFrom; |
3952 | - use std::hash::{Hash, Hasher}; |
3953 | |
3954 | #[derive(Clone, Debug, Serialize, Deserialize)] |
3955 | pub struct GroupAddress { |
3956 | @@ -53,7 +57,7 @@ pub struct GroupAddress { |
3957 | * > display_name │ |
3958 | * > │ |
3959 | * > address_spec |
3960 | - *``` |
3961 | + * ``` |
3962 | */ |
3963 | pub struct MailboxAddress { |
3964 | pub raw: Vec<u8>, |
3965 | @@ -78,14 +82,20 @@ impl PartialEq for MailboxAddress { |
3966 | /// |
3967 | /// ```rust |
3968 | /// # use melib::email::Address; |
3969 | - /// let addr = Address::new(Some("Jörg Doe".to_string()), "joerg@example.com".to_string()); |
3970 | + /// let addr = Address::new( |
3971 | + /// Some("Jörg Doe".to_string()), |
3972 | + /// "joerg@example.com".to_string(), |
3973 | + /// ); |
3974 | /// assert_eq!(addr.to_string().as_str(), "Jörg Doe <joerg@example.com>"); |
3975 | /// ``` |
3976 | /// |
3977 | /// or parse it from a raw value: |
3978 | /// |
3979 | /// ```rust |
3980 | - /// let (rest_bytes, addr) = melib::email::parser::address::address("=?utf-8?q?J=C3=B6rg_Doe?= <joerg@example.com>".as_bytes()).unwrap(); |
3981 | + /// let (rest_bytes, addr) = melib::email::parser::address::address( |
3982 | + /// "=?utf-8?q?J=C3=B6rg_Doe?= <joerg@example.com>".as_bytes(), |
3983 | + /// ) |
3984 | + /// .unwrap(); |
3985 | /// assert!(rest_bytes.is_empty()); |
3986 | /// assert_eq!(addr.get_display_name(), Some("Jörg Doe".to_string())); |
3987 | /// assert_eq!(addr.get_email(), "joerg@example.com".to_string()); |
3988 | @@ -154,8 +164,8 @@ impl Address { |
3989 | |
3990 | /// Get the display name of this address. |
3991 | /// |
3992 | - /// If it's a group, it's the name of the group. Otherwise it's the `display_name` part of |
3993 | - /// the mailbox: |
3994 | + /// If it's a group, it's the name of the group. Otherwise it's the |
3995 | + /// `display_name` part of the mailbox: |
3996 | /// |
3997 | /// |
3998 | /// ```text |
3999 | @@ -166,7 +176,7 @@ impl Address { |
4000 | /// display_name │ display_name │ |
4001 | /// │ │ |
4002 | /// address_spec address_spec |
4003 | - ///``` |
4004 | + /// ``` |
4005 | pub fn get_display_name(&self) -> Option<String> { |
4006 | let ret = match self { |
4007 | Address::Mailbox(m) => m.display_name.display(&m.raw), |
4008 | @@ -179,7 +189,8 @@ impl Address { |
4009 | } |
4010 | } |
4011 | |
4012 | - /// Get the address spec part of this address. A group returns an empty `String`. |
4013 | + /// Get the address spec part of this address. A group returns an empty |
4014 | + /// `String`. |
4015 | pub fn get_email(&self) -> String { |
4016 | match self { |
4017 | Address::Mailbox(m) => m.address_spec.display(&m.raw), |
4018 | @@ -238,8 +249,8 @@ impl Address { |
4019 | |
4020 | /// Get subaddress out of an address (e.g. `ken+subaddress@example.org`). |
4021 | /// |
4022 | - /// Subaddresses are commonly text following a "+" character in an email address's local part |
4023 | - /// . They are defined in [RFC5233 `Sieve Email Filtering: Subaddress Extension`](https://tools.ietf.org/html/rfc5233.html) |
4024 | + /// Subaddresses are commonly text following a "+" character in an email |
4025 | + /// address's local part . They are defined in [RFC5233 `Sieve Email Filtering: Subaddress Extension`](https://tools.ietf.org/html/rfc5233.html) |
4026 | /// |
4027 | /// # Examples |
4028 | /// |
4029 | diff --git a/melib/src/email/attachment_types.rs b/melib/src/email/attachment_types.rs |
4030 | index b00f5a3..a758e79 100644 |
4031 | --- a/melib/src/email/attachment_types.rs |
4032 | +++ b/melib/src/email/attachment_types.rs |
4033 | @@ -18,11 +18,15 @@ |
4034 | * You should have received a copy of the GNU General Public License |
4035 | * along with meli. If not, see <http://www.gnu.org/licenses/>. |
4036 | */ |
4037 | - use crate::email::attachments::{Attachment, AttachmentBuilder}; |
4038 | - use crate::email::parser::BytesExt; |
4039 | + use std::{ |
4040 | + fmt::{Display, Formatter, Result as FmtResult}, |
4041 | + str, |
4042 | + }; |
4043 | |
4044 | - use std::fmt::{Display, Formatter, Result as FmtResult}; |
4045 | - use std::str; |
4046 | + use crate::email::{ |
4047 | + attachments::{Attachment, AttachmentBuilder}, |
4048 | + parser::BytesExt, |
4049 | + }; |
4050 | |
4051 | #[derive(Clone, Copy, Debug, PartialEq, Eq, Serialize, Deserialize)] |
4052 | pub enum Charset { |
4053 | @@ -421,9 +425,10 @@ impl ContentType { |
4054 | |
4055 | boundary.push_str(&random_boundary); |
4056 | /* rfc134 |
4057 | - * "The only mandatory parameter for the multipart Content-Type is the boundary parameter, |
4058 | - * which consists of 1 to 70 characters from a set of characters known to be very robust |
4059 | - * through email gateways, and NOT ending with white space"*/ |
4060 | + * "The only mandatory parameter for the multipart Content-Type is the |
4061 | + * boundary parameter, which consists of 1 to 70 characters from a |
4062 | + * set of characters known to be very robust through email gateways, |
4063 | + * and NOT ending with white space" */ |
4064 | boundary.truncate(70); |
4065 | boundary |
4066 | } |
4067 | diff --git a/melib/src/email/attachments.rs b/melib/src/email/attachments.rs |
4068 | index 0be3963..2485535 100644 |
4069 | --- a/melib/src/email/attachments.rs |
4070 | +++ b/melib/src/email/attachments.rs |
4071 | @@ -20,17 +20,17 @@ |
4072 | */ |
4073 | |
4074 | /*! Encoding/decoding of attachments */ |
4075 | + use core::{fmt, str}; |
4076 | + |
4077 | + use data_encoding::BASE64_MIME; |
4078 | + use smallvec::SmallVec; |
4079 | + |
4080 | use crate::email::{ |
4081 | address::StrBuilder, |
4082 | + attachment_types::*, |
4083 | parser::{self, BytesExt}, |
4084 | Mail, |
4085 | }; |
4086 | - use core::fmt; |
4087 | - use core::str; |
4088 | - use data_encoding::BASE64_MIME; |
4089 | - use smallvec::SmallVec; |
4090 | - |
4091 | - use crate::email::attachment_types::*; |
4092 | |
4093 | pub type Filter<'a> = Box<dyn FnMut(&Attachment, &mut Vec<u8>) + 'a>; |
4094 | |
4095 | @@ -117,8 +117,9 @@ impl AttachmentBuilder { |
4096 | self |
4097 | } |
4098 | |
4099 | - /// Set body to the entire raw contents, use this if raw contains only data and no headers |
4100 | - /// If raw contains data and headers pass it through AttachmentBuilder::new(). |
4101 | + /// Set body to the entire raw contents, use this if raw contains only data |
4102 | + /// and no headers If raw contains data and headers pass it through |
4103 | + /// AttachmentBuilder::new(). |
4104 | pub fn set_body_to_raw(&mut self) -> &mut Self { |
4105 | self.body = StrBuilder { |
4106 | offset: 0, |
4107 | @@ -515,8 +516,8 @@ impl Attachment { |
4108 | } |
4109 | } |
4110 | |
4111 | - /* Call on the body of a multipart/mixed Envelope to check if there are attachments without |
4112 | - * completely parsing them */ |
4113 | + /* Call on the body of a multipart/mixed Envelope to check if there are |
4114 | + * attachments without completely parsing them */ |
4115 | pub fn check_if_has_attachments_quick(bytes: &[u8], boundary: &[u8]) -> bool { |
4116 | if bytes.is_empty() { |
4117 | return false; |
4118 | diff --git a/melib/src/email/compose.rs b/melib/src/email/compose.rs |
4119 | index 924431b..40cf515 100644 |
4120 | --- a/melib/src/email/compose.rs |
4121 | +++ b/melib/src/email/compose.rs |
4122 | @@ -20,19 +20,25 @@ |
4123 | */ |
4124 | |
4125 | /*! Compose a `Draft`, with MIME and attachment support */ |
4126 | - use super::*; |
4127 | - use crate::email::attachment_types::{ |
4128 | - Charset, ContentTransferEncoding, ContentType, MultipartType, |
4129 | + use std::{ |
4130 | + ffi::OsStr, |
4131 | + io::Read, |
4132 | + path::{Path, PathBuf}, |
4133 | + str::FromStr, |
4134 | }; |
4135 | - use crate::email::attachments::AttachmentBuilder; |
4136 | - use crate::shellexpand::ShellExpandTrait; |
4137 | + |
4138 | use data_encoding::BASE64_MIME; |
4139 | - use std::ffi::OsStr; |
4140 | - use std::io::Read; |
4141 | - use std::path::{Path, PathBuf}; |
4142 | - use std::str::FromStr; |
4143 | use xdg_utils::query_mime_info; |
4144 | |
4145 | + use super::*; |
4146 | + use crate::{ |
4147 | + email::{ |
4148 | + attachment_types::{Charset, ContentTransferEncoding, ContentType, MultipartType}, |
4149 | + attachments::AttachmentBuilder, |
4150 | + }, |
4151 | + shellexpand::ShellExpandTrait, |
4152 | + }; |
4153 | + |
4154 | pub mod mime; |
4155 | pub mod random; |
4156 | |
4157 | @@ -370,7 +376,10 @@ fn build_multipart( |
4158 | } |
4159 | ret.push_str("\r\n\r\n"); |
4160 | /* rfc1341 */ |
4161 | - ret.push_str("This is a MIME formatted message with attachments. Use a MIME-compliant client to view it properly.\r\n"); |
4162 | + ret.push_str( |
4163 | + "This is a MIME formatted message with attachments. Use a MIME-compliant client to view \ |
4164 | + it properly.\r\n", |
4165 | + ); |
4166 | for sub in parts { |
4167 | ret.push_str("--"); |
4168 | ret.push_str(&boundary); |
4169 | @@ -484,9 +493,10 @@ fn print_attachment(ret: &mut String, a: AttachmentBuilder) { |
4170 | |
4171 | #[cfg(test)] |
4172 | mod tests { |
4173 | - use super::*; |
4174 | use std::str::FromStr; |
4175 | |
4176 | + use super::*; |
4177 | + |
4178 | #[test] |
4179 | fn test_new_draft() { |
4180 | let mut default = Draft::default(); |
4181 | @@ -508,21 +518,33 @@ mod tests { |
4182 | |
4183 | let original = default.clone(); |
4184 | let s = default.to_edit_string(); |
4185 | - assert_eq!(s, "<!--\nDate: Sun, 16 Jun 2013 17:56:45 +0200\nFrom: \nTo: \nCc: \nBcc: \nSubject: test_update()\n-->\n\nαδφαφσαφασ"); |
4186 | + assert_eq!( |
4187 | + s, |
4188 | + "<!--\nDate: Sun, 16 Jun 2013 17:56:45 +0200\nFrom: \nTo: \nCc: \nBcc: \nSubject: \ |
4189 | + test_update()\n-->\n\nαδφαφσαφασ" |
4190 | + ); |
4191 | assert!(!default.update(&s).unwrap()); |
4192 | assert_eq!(&original, &default); |
4193 | |
4194 | default.set_wrap_header_preamble(Some(("".to_string(), "".to_string()))); |
4195 | let original = default.clone(); |
4196 | let s = default.to_edit_string(); |
4197 | - assert_eq!(s, "Date: Sun, 16 Jun 2013 17:56:45 +0200\nFrom: \nTo: \nCc: \nBcc: \nSubject: test_update()\n\nαδφαφσαφασ"); |
4198 | + assert_eq!( |
4199 | + s, |
4200 | + "Date: Sun, 16 Jun 2013 17:56:45 +0200\nFrom: \nTo: \nCc: \nBcc: \nSubject: \ |
4201 | + test_update()\n\nαδφαφσαφασ" |
4202 | + ); |
4203 | assert!(!default.update(&s).unwrap()); |
4204 | assert_eq!(&original, &default); |
4205 | |
4206 | default.set_wrap_header_preamble(None); |
4207 | let original = default.clone(); |
4208 | let s = default.to_edit_string(); |
4209 | - assert_eq!(s, "Date: Sun, 16 Jun 2013 17:56:45 +0200\nFrom: \nTo: \nCc: \nBcc: \nSubject: test_update()\n\nαδφαφσαφασ"); |
4210 | + assert_eq!( |
4211 | + s, |
4212 | + "Date: Sun, 16 Jun 2013 17:56:45 +0200\nFrom: \nTo: \nCc: \nBcc: \nSubject: \ |
4213 | + test_update()\n\nαδφαφσαφασ" |
4214 | + ); |
4215 | assert!(!default.update(&s).unwrap()); |
4216 | assert_eq!(&original, &default); |
4217 | |
4218 | @@ -532,7 +554,11 @@ mod tests { |
4219 | ))); |
4220 | let original = default.clone(); |
4221 | let s = default.to_edit_string(); |
4222 | - assert_eq!(s, "{-\n\n\n===========\nDate: Sun, 16 Jun 2013 17:56:45 +0200\nFrom: \nTo: \nCc: \nBcc: \nSubject: test_update()\n</mixed>\n\nαδφαφσαφασ"); |
4223 | + assert_eq!( |
4224 | + s, |
4225 | + "{-\n\n\n===========\nDate: Sun, 16 Jun 2013 17:56:45 +0200\nFrom: \nTo: \nCc: \nBcc: \ |
4226 | + \nSubject: test_update()\n</mixed>\n\nαδφαφσαφασ" |
4227 | + ); |
4228 | assert!(!default.update(&s).unwrap()); |
4229 | assert_eq!(&original, &default); |
4230 | |
4231 | @@ -543,7 +569,11 @@ mod tests { |
4232 | .set_wrap_header_preamble(Some(("<!--".to_string(), "-->".to_string()))); |
4233 | let original = default.clone(); |
4234 | let s = default.to_edit_string(); |
4235 | - assert_eq!(s, "<!--\nDate: Sun, 16 Jun 2013 17:56:45 +0200\nFrom: \nTo: \nCc: \nBcc: \nSubject: test_update()\n-->\n\nhellohello<!--\n<!--\n<--hellohello\nhellohello-->\n-->\n-->hello\n"); |
4236 | + assert_eq!( |
4237 | + s, |
4238 | + "<!--\nDate: Sun, 16 Jun 2013 17:56:45 +0200\nFrom: \nTo: \nCc: \nBcc: \nSubject: \ |
4239 | + test_update()\n-->\n\nhellohello<!--\n<!--\n<--hellohello\nhellohello-->\n-->\n-->hello\n" |
4240 | + ); |
4241 | assert!(!default.update(&s).unwrap()); |
4242 | assert_eq!(&original, &default); |
4243 | } |
4244 | @@ -572,7 +602,8 @@ mod tests { |
4245 | */ |
4246 | } |
4247 | |
4248 | - /// Reads file from given path, and returns an 'application/octet-stream' AttachmentBuilder object |
4249 | + /// Reads file from given path, and returns an 'application/octet-stream' |
4250 | + /// AttachmentBuilder object |
4251 | pub fn attachment_from_file<I>(path: &I) -> Result<AttachmentBuilder> |
4252 | where |
4253 | I: AsRef<OsStr>, |
4254 | diff --git a/melib/src/email/compose/mime.rs b/melib/src/email/compose/mime.rs |
4255 | index ef466ee..f47e1b1 100644 |
4256 | --- a/melib/src/email/compose/mime.rs |
4257 | +++ b/melib/src/email/compose/mime.rs |
4258 | @@ -20,7 +20,6 @@ |
4259 | */ |
4260 | |
4261 | use super::*; |
4262 | - |
4263 | #[cfg(feature = "unicode_algorithms")] |
4264 | use crate::text_processing::grapheme_clusters::TextProcessing; |
4265 | |
4266 | @@ -61,9 +60,9 @@ pub fn encode_header(value: &str) -> String { |
4267 | is_current_window_ascii = false; |
4268 | } |
4269 | /* RFC2047 recommends: |
4270 | - * 'While there is no limit to the length of a multiple-line header field, each line of |
4271 | - * a header field that contains one or more 'encoded-word's is limited to 76 |
4272 | - * characters.' |
4273 | + * 'While there is no limit to the length of a multiple-line header field, each |
4274 | + * line of a header field that contains one or more |
4275 | + * 'encoded-word's is limited to 76 characters.' |
4276 | * This is a rough compliance. |
4277 | */ |
4278 | (false, false) if (((4 * (idx - current_window_start) / 3) + 3) & !3) > 33 => { |
4279 | @@ -84,8 +83,8 @@ pub fn encode_header(value: &str) -> String { |
4280 | } |
4281 | #[cfg(not(feature = "unicode_algorithms"))] |
4282 | { |
4283 | - /* TODO: test this. If it works as fine as the one above, there's no need to keep the above |
4284 | - * implementation.*/ |
4285 | + /* TODO: test this. If it works as fine as the one above, there's no need to |
4286 | + * keep the above implementation. */ |
4287 | for (i, g) in value.char_indices() { |
4288 | match (g.is_ascii(), is_current_window_ascii) { |
4289 | (true, true) => { |
4290 | @@ -116,9 +115,9 @@ pub fn encode_header(value: &str) -> String { |
4291 | is_current_window_ascii = false; |
4292 | } |
4293 | /* RFC2047 recommends: |
4294 | - * 'While there is no limit to the length of a multiple-line header field, each line of |
4295 | - * a header field that contains one or more 'encoded-word's is limited to 76 |
4296 | - * characters.' |
4297 | + * 'While there is no limit to the length of a multiple-line header field, each |
4298 | + * line of a header field that contains one or more |
4299 | + * 'encoded-word's is limited to 76 characters.' |
4300 | * This is a rough compliance. |
4301 | */ |
4302 | (false, false) |
4303 | @@ -139,8 +138,8 @@ pub fn encode_header(value: &str) -> String { |
4304 | } |
4305 | } |
4306 | } |
4307 | - /* If the last part of the header value is encoded, it won't be pushed inside the previous for |
4308 | - * block */ |
4309 | + /* If the last part of the header value is encoded, it won't be pushed inside |
4310 | + * the previous for block */ |
4311 | if !is_current_window_ascii { |
4312 | ret.push_str(&format!( |
4313 | "=?UTF-8?B?{}?=", |
4314 | @@ -156,35 +155,39 @@ fn test_encode_header() { |
4315 | let words = "compilers/2020a σε Rust"; |
4316 | assert_eq!( |
4317 | "compilers/2020a =?UTF-8?B?z4POtSA=?=Rust", |
4318 | - &encode_header(&words), |
4319 | + &encode_header(words), |
4320 | ); |
4321 | assert_eq!( |
4322 | &std::str::from_utf8( |
4323 | - &crate::email::parser::encodings::phrase(encode_header(&words).as_bytes(), false) |
4324 | + &crate::email::parser::encodings::phrase(encode_header(words).as_bytes(), false) |
4325 | .unwrap() |
4326 | .1 |
4327 | ) |
4328 | .unwrap(), |
4329 | &words, |
4330 | ); |
4331 | - let words = "[internal] =?UTF-8?B?zp3Orc6/z4Igzp/OtM63zrPPjM+CIM6jz4U=?= =?UTF-8?B?zrPOs8+BzrHPhs6uz4I=?="; |
4332 | + let words = "[internal] =?UTF-8?B?zp3Orc6/z4Igzp/OtM63zrPPjM+CIM6jz4U=?= \ |
4333 | + =?UTF-8?B?zrPOs8+BzrHPhs6uz4I=?="; |
4334 | let words_enc = r#"[internal] Νέος Οδηγός Συγγραφής"#; |
4335 | - assert_eq!(words, &encode_header(&words_enc),); |
4336 | + assert_eq!(words, &encode_header(words_enc),); |
4337 | assert_eq!( |
4338 | r#"[internal] Νέος Οδηγός Συγγραφής"#, |
4339 | std::str::from_utf8( |
4340 | - &crate::email::parser::encodings::phrase(encode_header(&words_enc).as_bytes(), false) |
4341 | + &crate::email::parser::encodings::phrase(encode_header(words_enc).as_bytes(), false) |
4342 | .unwrap() |
4343 | .1 |
4344 | ) |
4345 | .unwrap(), |
4346 | ); |
4347 | - //let words = "[Advcomparch] =?utf-8?b?zqPPhc68z4DOtc+BzrnPhs6/z4HOrCDPg861IGZs?=\n\t=?utf-8?b?dXNoIM67z4zOs8+JIG1pc3ByZWRpY3Rpb24gzrrOsc+Ezqwgz4TOt869?=\n\t=?utf-8?b?IM61zrrPhM6tzrvOtc+Dzrcgc3RvcmU=?="; |
4348 | + //let words = "[Advcomparch] |
4349 | + // =?utf-8?b?zqPPhc68z4DOtc+BzrnPhs6/z4HOrCDPg861IGZs?=\n\t=?utf-8?b? |
4350 | + // dXNoIM67z4zOs8+JIG1pc3ByZWRpY3Rpb24gzrrOsc+Ezqwgz4TOt869?=\n\t=?utf-8?b? |
4351 | + // IM61zrrPhM6tzrvOtc+Dzrcgc3RvcmU=?="; |
4352 | let words_enc = "[Advcomparch] Συμπεριφορά σε flush λόγω misprediction κατά την εκτέλεση store"; |
4353 | assert_eq!( |
4354 | "[Advcomparch] Συμπεριφορά σε flush λόγω misprediction κατά την εκτέλεση store", |
4355 | std::str::from_utf8( |
4356 | - &crate::email::parser::encodings::phrase(encode_header(&words_enc).as_bytes(), false) |
4357 | + &crate::email::parser::encodings::phrase(encode_header(words_enc).as_bytes(), false) |
4358 | .unwrap() |
4359 | .1 |
4360 | ) |
4361 | diff --git a/melib/src/email/compose/random.rs b/melib/src/email/compose/random.rs |
4362 | index 6e5cbe3..67fba6c 100644 |
4363 | --- a/melib/src/email/compose/random.rs |
4364 | +++ b/melib/src/email/compose/random.rs |
4365 | @@ -19,10 +19,7 @@ |
4366 | * along with meli. If not, see <http://www.gnu.org/licenses/>. |
4367 | */ |
4368 | |
4369 | - use std::char; |
4370 | - use std::fs::File; |
4371 | - use std::io::prelude::*; |
4372 | - use std::time::SystemTime; |
4373 | + use std::{char, fs::File, io::prelude::*, time::SystemTime}; |
4374 | |
4375 | fn random_u64() -> u64 { |
4376 | let mut f = File::open("/dev/urandom").unwrap(); |
4377 | diff --git a/melib/src/email/headers.rs b/melib/src/email/headers.rs |
4378 | index f748669..2be6bd5 100644 |
4379 | --- a/melib/src/email/headers.rs |
4380 | +++ b/melib/src/email/headers.rs |
4381 | @@ -20,20 +20,25 @@ |
4382 | */ |
4383 | |
4384 | /*! Wrapper type `HeaderName` for case-insensitive comparisons */ |
4385 | - use crate::error::Error; |
4386 | + use std::{ |
4387 | + borrow::Borrow, |
4388 | + cmp::{Eq, PartialEq}, |
4389 | + convert::TryFrom, |
4390 | + fmt, |
4391 | + hash::{Hash, Hasher}, |
4392 | + ops::{Deref, DerefMut}, |
4393 | + }; |
4394 | + |
4395 | use indexmap::IndexMap; |
4396 | use smallvec::SmallVec; |
4397 | - use std::borrow::Borrow; |
4398 | - use std::cmp::{Eq, PartialEq}; |
4399 | - use std::convert::TryFrom; |
4400 | - use std::fmt; |
4401 | - use std::hash::{Hash, Hasher}; |
4402 | - use std::ops::{Deref, DerefMut}; |
4403 | + |
4404 | + use crate::error::Error; |
4405 | |
4406 | #[derive(Clone, Copy, Serialize, Deserialize)] |
4407 | pub struct HeaderNameType<S>(S); |
4408 | |
4409 | - ///Case insensitive wrapper for a header name. As of `RFC5322` it's guaranteened to be ASCII. |
4410 | + /// Case insensitive wrapper for a header name. As of `RFC5322` it's |
4411 | + /// guaranteed to be ASCII. |
4412 | pub type HeaderName = HeaderNameType<SmallVec<[u8; 32]>>; |
4413 | |
4414 | impl HeaderName { |
4415 | @@ -148,7 +153,7 @@ impl<'a> Borrow<dyn HeaderKey + 'a> for HeaderName { |
4416 | |
4417 | impl<S: AsRef<[u8]>> HeaderNameType<S> { |
4418 | pub fn as_str(&self) -> &str { |
4419 | - //HeadersType are ascii so valid utf8 |
4420 | + // HeadersType are ascii so valid utf8 |
4421 | unsafe { std::str::from_utf8_unchecked(self.0.as_ref()) } |
4422 | } |
4423 | |
4424 | diff --git a/melib/src/email/list_management.rs b/melib/src/email/list_management.rs |
4425 | index b0e07d8..5129480 100644 |
4426 | --- a/melib/src/email/list_management.rs |
4427 | +++ b/melib/src/email/list_management.rs |
4428 | @@ -20,11 +20,12 @@ |
4429 | */ |
4430 | |
4431 | /*! Parsing of rfc2369/rfc2919 `List-*` headers */ |
4432 | - use super::parser; |
4433 | - use super::Envelope; |
4434 | - use smallvec::SmallVec; |
4435 | use std::convert::From; |
4436 | |
4437 | + use smallvec::SmallVec; |
4438 | + |
4439 | + use super::{parser, Envelope}; |
4440 | + |
4441 | #[derive(Debug, PartialEq, Eq, Clone, Copy)] |
4442 | pub enum ListAction<'a> { |
4443 | Url(&'a [u8]), |
4444 | @@ -43,8 +44,8 @@ impl<'a> From<&'a [u8]> for ListAction<'a> { |
4445 | } else if value.starts_with(b"NO") { |
4446 | ListAction::No |
4447 | } else { |
4448 | - /* Otherwise treat it as url. There's no foolproof way to check if this is valid, so |
4449 | - * postpone it until we try an HTTP request. |
4450 | + /* Otherwise treat it as url. There's no foolproof way to check if this is |
4451 | + * valid, so postpone it until we try an HTTP request. |
4452 | */ |
4453 | ListAction::Url(value) |
4454 | } |
4455 | @@ -55,8 +56,8 @@ impl<'a> ListAction<'a> { |
4456 | pub fn parse_options_list(input: &'a [u8]) -> Option<SmallVec<[ListAction<'a>; 4]>> { |
4457 | parser::mailing_lists::rfc_2369_list_headers_action_list(input) |
4458 | .map(|(_, mut vec)| { |
4459 | - /* Prefer email options first, since this _is_ a mail client after all and it's |
4460 | - * more automated */ |
4461 | + /* Prefer email options first, since this _is_ a mail client after all and |
4462 | + * it's more automated */ |
4463 | vec.sort_unstable_by(|a, b| { |
4464 | match (a.starts_with(b"mailto:"), b.starts_with(b"mailto:")) { |
4465 | (true, false) => std::cmp::Ordering::Less, |
4466 | diff --git a/melib/src/email/mailto.rs b/melib/src/email/mailto.rs |
4467 | index f41167f..998b4a2 100644 |
4468 | --- a/melib/src/email/mailto.rs |
4469 | +++ b/melib/src/email/mailto.rs |
4470 | @@ -20,9 +20,10 @@ |
4471 | */ |
4472 | |
4473 | /*! Parsing of `mailto` addresses */ |
4474 | - use super::*; |
4475 | use std::convert::TryFrom; |
4476 | |
4477 | + use super::*; |
4478 | + |
4479 | #[derive(Debug, Clone)] |
4480 | pub struct Mailto { |
4481 | pub address: Address, |
4482 | diff --git a/melib/src/email/parser.rs b/melib/src/email/parser.rs |
4483 | index efb66fa..c1bd25b 100644 |
4484 | --- a/melib/src/email/parser.rs |
4485 | +++ b/melib/src/email/parser.rs |
4486 | @@ -20,20 +20,21 @@ |
4487 | */ |
4488 | |
4489 | /*! Parsers for email. See submodules */ |
4490 | - use crate::error::{Error, Result, ResultIntoError}; |
4491 | + use std::borrow::Cow; |
4492 | + |
4493 | use nom::{ |
4494 | branch::alt, |
4495 | bytes::complete::{is_a, is_not, tag, take, take_until, take_while, take_while1}, |
4496 | character::{is_alphabetic, is_digit, is_hex_digit}, |
4497 | - combinator::peek, |
4498 | - combinator::{map, opt}, |
4499 | + combinator::{map, opt, peek}, |
4500 | error::{context, ErrorKind}, |
4501 | multi::{many0, many1, separated_list1}, |
4502 | number::complete::le_u8, |
4503 | sequence::{delimited, pair, preceded, separated_pair, terminated}, |
4504 | }; |
4505 | use smallvec::SmallVec; |
4506 | - use std::borrow::Cow; |
4507 | + |
4508 | + use crate::error::{Error, Result, ResultIntoError}; |
4509 | |
4510 | macro_rules! to_str { |
4511 | ($l:expr) => {{ |
4512 | @@ -318,8 +319,7 @@ pub fn mail(input: &[u8]) -> Result<(Vec<(&[u8], &[u8])>, &[u8])> { |
4513 | |
4514 | pub mod dates { |
4515 | /*! Date values in headers */ |
4516 | - use super::generic::*; |
4517 | - use super::*; |
4518 | + use super::{generic::*, *}; |
4519 | use crate::datetime::UnixTimestamp; |
4520 | |
4521 | fn take_n_digits(n: usize) -> impl Fn(&[u8]) -> IResult<&[u8], &[u8]> { |
4522 | @@ -451,15 +451,15 @@ pub mod dates { |
4523 | |
4524 | ///e.g Wed Sep 9 00:27:54 2020 |
4525 | ///```text |
4526 | - ///day-of-week month day time year |
4527 | - ///date-time = [ day-of-week "," ] date time [CFWS] |
4528 | - ///date = day month year |
4529 | - ///time = time-of-day zone |
4530 | - ///time-of-day = hour ":" minute [ ":" second ] |
4531 | - ///hour = 2DIGIT / obs-hour |
4532 | - ///minute = 2DIGIT / obs-minute |
4533 | - ///second = 2DIGIT / obs-second |
4534 | - ///``` |
4535 | + /// day-of-week month day time year |
4536 | + /// date-time = [ day-of-week "," ] date time [CFWS] |
4537 | + /// date = day month year |
4538 | + /// time = time-of-day zone |
4539 | + /// time-of-day = hour ":" minute [ ":" second ] |
4540 | + /// hour = 2DIGIT / obs-hour |
4541 | + /// minute = 2DIGIT / obs-minute |
4542 | + /// second = 2DIGIT / obs-second |
4543 | + /// ``` |
4544 | pub fn mbox_date_time(input: &[u8]) -> IResult<&[u8], UnixTimestamp> { |
4545 | let orig_input = input; |
4546 | let mut accum: SmallVec<[u8; 32]> = SmallVec::new(); |
4547 | @@ -656,7 +656,8 @@ pub mod generic { |
4548 | let (rest, _) = utf8_tail(rest)?; |
4549 | Ok((rest, &input[0..2])) |
4550 | } |
4551 | - /// UTF8-3 = %xE0 %xA0-BF UTF8-tail / %xE1-EC 2( UTF8-tail ) / %xED %x80-9F UTF8-tail / %xEE-EF 2( UTF8-tail ) |
4552 | + /// UTF8-3 = %xE0 %xA0-BF UTF8-tail / %xE1-EC 2( UTF8-tail ) / %xED |
4553 | + /// %x80-9F UTF8-tail / %xEE-EF 2( UTF8-tail ) |
4554 | fn utf8_3<'a>(input: &'a [u8]) -> IResult<&'a [u8], &'a [u8]> { |
4555 | alt(( |
4556 | |input: &'a [u8]| -> IResult<&'a [u8], &'a [u8]> { |
4557 | @@ -685,7 +686,8 @@ pub mod generic { |
4558 | }, |
4559 | ))(input) |
4560 | } |
4561 | - /// UTF8-4 = %xF0 %x90-BF 2( UTF8-tail ) / %xF1-F3 3( UTF8-tail ) / %xF4 %x80-8F 2( UTF8-tail ) |
4562 | + /// UTF8-4 = %xF0 %x90-BF 2( UTF8-tail ) / %xF1-F3 3( UTF8-tail ) / |
4563 | + /// %xF4 %x80-8F 2( UTF8-tail ) |
4564 | fn utf8_4<'a>(input: &'a [u8]) -> IResult<&'a [u8], &'a [u8]> { |
4565 | alt(( |
4566 | |input: &'a [u8]| -> IResult<&'a [u8], &'a [u8]> { |
4567 | @@ -741,11 +743,11 @@ pub mod generic { |
4568 | } |
4569 | |
4570 | ///```text |
4571 | - ///ctext = %d33-39 / ; Printable US-ASCII |
4572 | + /// ctext = %d33-39 / ; Printable US-ASCII |
4573 | /// %d42-91 / ; characters not including |
4574 | /// %d93-126 / ; "(", ")", or "\" |
4575 | /// obs-ctext |
4576 | - ///``` |
4577 | + /// ``` |
4578 | fn ctext(input: &[u8]) -> IResult<&[u8], ()> { |
4579 | alt(( |
4580 | map( |
4581 | @@ -761,13 +763,13 @@ pub mod generic { |
4582 | } |
4583 | |
4584 | ///```text |
4585 | - ///ctext = %d33-39 / ; Printable US-ASCII |
4586 | + /// ctext = %d33-39 / ; Printable US-ASCII |
4587 | /// %d42-91 / ; characters not including |
4588 | /// %d93-126 / ; "(", ")", or "\" |
4589 | /// obs-ctext |
4590 | - ///ccontent = ctext / quoted-pair / comment |
4591 | - ///comment = "(" *([FWS] ccontent) [FWS] ")" |
4592 | - ///``` |
4593 | + /// ccontent = ctext / quoted-pair / comment |
4594 | + /// comment = "(" *([FWS] ccontent) [FWS] ")" |
4595 | + /// ``` |
4596 | pub fn comment(input: &[u8]) -> IResult<&[u8], ()> { |
4597 | if !input.starts_with(b"(") { |
4598 | return Err(nom::Err::Error( |
4599 | @@ -911,8 +913,7 @@ pub mod generic { |
4600 | } |
4601 | } |
4602 | |
4603 | - use crate::email::address::Address; |
4604 | - use crate::email::mailto::Mailto; |
4605 | + use crate::email::{address::Address, mailto::Mailto}; |
4606 | pub fn mailto(mut input: &[u8]) -> IResult<&[u8], Mailto> { |
4607 | if !input.starts_with(b"mailto:") { |
4608 | return Err(nom::Err::Error( |
4609 | @@ -1081,7 +1082,8 @@ pub mod generic { |
4610 | Ok((rest, ret)) |
4611 | } |
4612 | |
4613 | - ///`quoted-string = [CFWS] DQUOTE *([FWS] qcontent) [FWS] DQUOTE [CFWS]` |
4614 | + ///`quoted-string = [CFWS] DQUOTE *([FWS] qcontent) [FWS] DQUOTE |
4615 | + /// [CFWS]` |
4616 | pub fn quoted_string(input: &[u8]) -> IResult<&[u8], Cow<'_, [u8]>> { |
4617 | let (input, opt_space) = opt(cfws)(input)?; |
4618 | if !input.starts_with(b"\"") { |
4619 | @@ -1213,7 +1215,10 @@ pub mod generic { |
4620 | Ok((input, ret.into())) |
4621 | } |
4622 | |
4623 | - ///`atext = ALPHA / DIGIT / ; Printable US-ASCII "!" / "#" / ; characters not including "$" / "%" / ; specials. Used for atoms. "&" / "'" / "*" / "+" / "-" / "/" / "=" / "?" / "^" / "_" / "`" / "{" / "|" / "}" / "~"` |
4624 | + ///`atext = ALPHA / DIGIT / ; Printable US-ASCII "!" / "#" / |
4625 | + /// ; characters not including "$" / "%" / ; specials. Used for |
4626 | + /// atoms. "&" / "'" / "*" / "+" / "-" / "/" / "=" / "?" / "^" / "_" / "`" |
4627 | + /// / "{" / "|" / "}" / "~"` |
4628 | pub fn atext_ascii(input: &[u8]) -> IResult<&[u8], Cow<'_, [u8]>> { |
4629 | if input.is_empty() { |
4630 | return Err(nom::Err::Error((input, "atext(): empty input").into())); |
4631 | @@ -1244,10 +1249,10 @@ pub mod generic { |
4632 | } |
4633 | |
4634 | ///```text |
4635 | - ///dtext = %d33-90 / ; Printable US-ASCII |
4636 | + /// dtext = %d33-90 / ; Printable US-ASCII |
4637 | /// %d94-126 / ; characters not including |
4638 | /// obs-dtext ; "[", "]", or "\" |
4639 | - ///``` |
4640 | + /// ``` |
4641 | pub fn dtext(input: &[u8]) -> IResult<&[u8], u8> { |
4642 | alt((byte_in_range(33, 90), byte_in_range(94, 125)))(input) |
4643 | } |
4644 | @@ -1259,11 +1264,13 @@ pub mod mailing_lists { |
4645 | //! Implemented RFCs: |
4646 | //! |
4647 | //! - [RFC2369 "The Use of URLs as Meta-Syntax for Core Mail List Commands and their Transport through Message Header Fields"](https://tools.ietf.org/html/rfc2369) |
4648 | - use super::*; |
4649 | use generic::cfws; |
4650 | |
4651 | - ///Parse the value of headers defined in RFC2369 "The Use of URLs as Meta-Syntax for Core |
4652 | - ///Mail List Commands and their Transport through Message Header Fields" |
4653 | + use super::*; |
4654 | + |
4655 | + ///Parse the value of headers defined in RFC2369 "The Use of URLs as |
4656 | + /// Meta-Syntax for Core Mail List Commands and their Transport through |
4657 | + /// Message Header Fields" |
4658 | pub fn rfc_2369_list_headers_action_list(input: &[u8]) -> IResult<&[u8], Vec<&[u8]>> { |
4659 | let (input, _) = opt(cfws)(input)?; |
4660 | let (input, ret) = alt(( |
4661 | @@ -1458,9 +1465,9 @@ pub mod headers { |
4662 | /* A header can span multiple lines, eg: |
4663 | * |
4664 | * Received: from -------------------- (-------------------------) |
4665 | - * by --------------------- (--------------------- [------------------]) (-----------------------) |
4666 | - * with ESMTP id ------------ for <------------------->; |
4667 | - * Tue, 5 Jan 2016 21:30:44 +0100 (CET) |
4668 | + * by --------------------- (--------------------- [------------------]) |
4669 | + * (-----------------------) with ESMTP id ------------ for |
4670 | + * <------------------->; Tue, 5 Jan 2016 21:30:44 +0100 (CET) |
4671 | */ |
4672 | |
4673 | pub fn header_value(input: &[u8]) -> IResult<&[u8], &[u8]> { |
4674 | @@ -1580,8 +1587,10 @@ pub mod headers { |
4675 | pub mod attachments { |
4676 | /*! Email attachments */ |
4677 | use super::*; |
4678 | - use crate::email::address::*; |
4679 | - use crate::email::attachment_types::{ContentDisposition, ContentDispositionKind}; |
4680 | + use crate::email::{ |
4681 | + address::*, |
4682 | + attachment_types::{ContentDisposition, ContentDispositionKind}, |
4683 | + }; |
4684 | pub fn attachment(input: &[u8]) -> IResult<&[u8], (std::vec::Vec<(&[u8], &[u8])>, &[u8])> { |
4685 | alt(( |
4686 | separated_pair( |
4687 | @@ -1807,7 +1816,8 @@ pub mod attachments { |
4688 | pub fn content_disposition(input: &[u8]) -> IResult<&[u8], ContentDisposition> { |
4689 | let (input, kind) = alt((take_until(";"), take_while(|_| true)))(input.trim())?; |
4690 | let mut ret = ContentDisposition { |
4691 | - /* RFC2183 Content-Disposition: "Unrecognized disposition types should be treated as `attachment'." */ |
4692 | + /* RFC2183 Content-Disposition: "Unrecognized disposition types should be treated as |
4693 | + * `attachment'." */ |
4694 | kind: if kind.trim().eq_ignore_ascii_case(b"inline") { |
4695 | ContentDispositionKind::Inline |
4696 | } else { |
4697 | @@ -1846,11 +1856,11 @@ pub mod attachments { |
4698 | |
4699 | pub mod encodings { |
4700 | /*! Email encodings (quoted printable, MIME) */ |
4701 | + use data_encoding::BASE64_MIME; |
4702 | + use encoding::{all::*, DecoderTrap, Encoding}; |
4703 | + |
4704 | use super::*; |
4705 | use crate::email::attachment_types::Charset; |
4706 | - use data_encoding::BASE64_MIME; |
4707 | - use encoding::all::*; |
4708 | - use encoding::{DecoderTrap, Encoding}; |
4709 | pub fn quoted_printable_byte(input: &[u8]) -> IResult<&[u8], u8> { |
4710 | if input.len() < 3 { |
4711 | Err(nom::Err::Error( |
4712 | @@ -2023,7 +2033,8 @@ pub mod encodings { |
4713 | if input.starts_with(b"=\n") { |
4714 | Ok((&input[2..], input[1])) // `=\n` is an escaped space character. |
4715 | } else if input.starts_with(b"=\r\n") { |
4716 | - Ok((&input[3..], input[2])) // `=\r\n` is an escaped space character. |
4717 | + Ok((&input[3..], input[2])) // `=\r\n` is an escaped space |
4718 | + // character. |
4719 | } else { |
4720 | Err(nom::Err::Error( |
4721 | (input, "quoted_printable_soft_break(): invalid input").into(), |
4722 | @@ -2036,8 +2047,9 @@ pub mod encodings { |
4723 | Ok((rest, 0x20)) |
4724 | } |
4725 | |
4726 | - // With MIME, headers in quoted printable format can contain underscores that represent spaces. |
4727 | - // In non-header context, an underscore is just a plain underscore. |
4728 | + // With MIME, headers in quoted printable format can contain underscores that |
4729 | + // represent spaces. In non-header context, an underscore is just a plain |
4730 | + // underscore. |
4731 | pub fn quoted_printable_bytes_header(input: &[u8]) -> IResult<&[u8], Vec<u8>> { |
4732 | many0(alt((quoted_printable_byte, qp_underscore_header, le_u8)))(input) |
4733 | } |
4734 | @@ -2173,9 +2185,9 @@ pub mod address { |
4735 | //! - [RFC6532 "Internationalized Email Headers"](https://tools.ietf.org/html/rfc6532) |
4736 | //! - [RFC2047 "MIME Part Three: Message Header Extensions for Non-ASCII Text"](https://tools.ietf.org/html/rfc2047) |
4737 | use super::*; |
4738 | - use crate::email::address::*; |
4739 | - use crate::email::parser::generic::{ |
4740 | - atom, cfws, dot_atom, dot_atom_text, dtext, phrase2, quoted_string, |
4741 | + use crate::email::{ |
4742 | + address::*, |
4743 | + parser::generic::{atom, cfws, dot_atom, dot_atom_text, dtext, phrase2, quoted_string}, |
4744 | }; |
4745 | pub fn display_addr(input: &[u8]) -> IResult<&[u8], Address> { |
4746 | if input.is_empty() || input.len() < 3 { |
4747 | @@ -2447,8 +2459,8 @@ pub mod address { |
4748 | } |
4749 | |
4750 | ///```text |
4751 | - ///address = mailbox / group |
4752 | - ///``` |
4753 | + /// address = mailbox / group |
4754 | + /// ``` |
4755 | pub fn address(input: &[u8]) -> IResult<&[u8], Address> { |
4756 | alt((mailbox, group))(input) |
4757 | } |
4758 | @@ -2599,15 +2611,18 @@ pub mod address { |
4759 | #[cfg(test)] |
4760 | mod tests { |
4761 | use super::{address::*, encodings::*, *}; |
4762 | - use crate::email::address::*; |
4763 | - use crate::make_address; |
4764 | + use crate::{email::address::*, make_address}; |
4765 | |
4766 | #[test] |
4767 | fn test_phrase() { |
4768 | let words = b"=?iso-8859-7?B?W215Y291cnNlcy5udHVhLmdyIC0gyvXs4fTp6t4g6uHpIMri4e306ere?= |
4769 | =?iso-8859-7?B?INb18+nq3l0gzd3hIMHt4erv3+358+c6IMzF0c/TIMHQz9TFy8XTzMHU?= |
4770 | =?iso-8859-7?B?2c0gwiDUzC4gysHNLiDFzsXUwdPH0yAyMDE3LTE4OiDTx8zFydnTxw==?="; |
4771 | - assert_eq!("[mycourses.ntua.gr - Κυματική και Κβαντική Φυσική] Νέα Ανακοίνωση: ΜΕΡΟΣ ΑΠΟΤΕΛΕΣΜΑΤΩΝ Β ΤΜ. ΚΑΝ. ΕΞΕΤΑΣΗΣ 2017-18: ΣΗΜΕΙΩΣΗ" , std::str::from_utf8(&phrase(words.trim(), false).unwrap().1).unwrap()); |
4772 | + assert_eq!( |
4773 | + "[mycourses.ntua.gr - Κυματική και Κβαντική Φυσική] Νέα Ανακοίνωση: ΜΕΡΟΣ \ |
4774 | + ΑΠΟΤΕΛΕΣΜΑΤΩΝ Β ΤΜ. ΚΑΝ. ΕΞΕΤΑΣΗΣ 2017-18: ΣΗΜΕΙΩΣΗ", |
4775 | + std::str::from_utf8(&phrase(words.trim(), false).unwrap().1).unwrap() |
4776 | + ); |
4777 | let words = b"=?UTF-8?Q?=CE=A0=CF=81=CF=8C=CF=83=CE=B8=CE=B5?= =?UTF-8?Q?=CF=84=CE=B7_=CE=B5=CE=BE=CE=B5=CF=84?= =?UTF-8?Q?=CE=B1=CF=83=CF=84=CE=B9=CE=BA=CE=AE?="; |
4778 | assert_eq!( |
4779 | "Πρόσθετη εξεταστική", |
4780 | @@ -2929,12 +2944,16 @@ mod tests { |
4781 | "=?iso-8859-1?q?Fran=E7ois?= Pons <fpons@mandrakesoft.com>" |
4782 | ); |
4783 | assert_parse!( |
4784 | - "هل تتكلم اللغة الإنجليزية /العربية؟", "do.you.speak@arabic.com", |
4785 | - "=?utf-8?b?2YfZhCDYqtiq2YPZhNmFINin2YTZhNi62Kkg2KfZhNil2YbYrNmE2YrYstmK2Kk=?=\n =?utf-8?b?IC/Yp9mE2LnYsdio2YrYqdif?= <do.you.speak@arabic.com>" |
4786 | + "هل تتكلم اللغة الإنجليزية /العربية؟", |
4787 | + "do.you.speak@arabic.com", |
4788 | + "=?utf-8?b?2YfZhCDYqtiq2YPZhNmFINin2YTZhNi62Kkg2KfZhNil2YbYrNmE2YrYstmK2Kk=?=\n \ |
4789 | + =?utf-8?b?IC/Yp9mE2LnYsdio2YrYqdif?= <do.you.speak@arabic.com>" |
4790 | ); |
4791 | assert_parse!( |
4792 | - "狂ったこの世で狂うなら気は確かだ。", "famous@quotes.ja", |
4793 | - "=?utf-8?b?54uC44Gj44Gf44GT44Gu5LiW44Gn54uC44GG44Gq44KJ5rCX44Gv56K644GL44Gg?=\n =?utf-8?b?44CC?= <famous@quotes.ja>" |
4794 | + "狂ったこの世で狂うなら気は確かだ。", |
4795 | + "famous@quotes.ja", |
4796 | + "=?utf-8?b?54uC44Gj44Gf44GT44Gu5LiW44Gn54uC44GG44Gq44KJ5rCX44Gv56K644GL44Gg?=\n \ |
4797 | + =?utf-8?b?44CC?= <famous@quotes.ja>" |
4798 | ); |
4799 | assert_eq!( |
4800 | Address::new_group( |
4801 | diff --git a/melib/src/email/pgp.rs b/melib/src/email/pgp.rs |
4802 | index d17e725..507f785 100644 |
4803 | --- a/melib/src/email/pgp.rs |
4804 | +++ b/melib/src/email/pgp.rs |
4805 | @@ -20,11 +20,13 @@ |
4806 | */ |
4807 | |
4808 | /*! Verification of OpenPGP signatures */ |
4809 | - use crate::email::{ |
4810 | - attachment_types::{ContentType, MultipartType}, |
4811 | - attachments::Attachment, |
4812 | + use crate::{ |
4813 | + email::{ |
4814 | + attachment_types::{ContentType, MultipartType}, |
4815 | + attachments::Attachment, |
4816 | + }, |
4817 | + Error, Result, |
4818 | }; |
4819 | - use crate::{Error, Result}; |
4820 | |
4821 | /// Convert raw attachment to the form needed for signature verification ([rfc3156](https://tools.ietf.org/html/rfc3156)) |
4822 | /// |
4823 | diff --git a/melib/src/error.rs b/melib/src/error.rs |
4824 | index 8e57664..4f1515d 100644 |
4825 | --- a/melib/src/error.rs |
4826 | +++ b/melib/src/error.rs |
4827 | @@ -23,13 +23,7 @@ |
4828 | * An error object for `melib` |
4829 | */ |
4830 | |
4831 | - use std::borrow::Cow; |
4832 | - use std::fmt; |
4833 | - use std::io; |
4834 | - use std::result; |
4835 | - use std::str; |
4836 | - use std::string; |
4837 | - use std::sync::Arc; |
4838 | + use std::{borrow::Cow, fmt, io, result, str, string, sync::Arc}; |
4839 | |
4840 | pub type Result<T> = result::Result<T, Error>; |
4841 | |
4842 | diff --git a/melib/src/gpgme/bindings.rs b/melib/src/gpgme/bindings.rs |
4843 | index 4883b89..4ff9258 100644 |
4844 | --- a/melib/src/gpgme/bindings.rs |
4845 | +++ b/melib/src/gpgme/bindings.rs |
4846 | @@ -195,8 +195,7 @@ pub struct gpgme_data { |
4847 | } |
4848 | pub type gpgme_data_t = *mut gpgme_data; |
4849 | pub type gpgme_error_t = gpg_error_t; |
4850 | - pub use self::gpg_err_code_t as gpgme_err_code_t; |
4851 | - pub use self::gpg_err_source_t as gpgme_err_source_t; |
4852 | + pub use self::{gpg_err_code_t as gpgme_err_code_t, gpg_err_source_t as gpgme_err_source_t}; |
4853 | pub type gpgme_strerror = extern "C" fn(err: gpgme_error_t) -> *const ::std::os::raw::c_char; |
4854 | pub type gpgme_strerror_r = unsafe extern "C" fn( |
4855 | err: gpg_error_t, |
4856 | @@ -5326,14 +5325,12 @@ pub type gpgme_op_assuan_transact = extern "C" fn( |
4857 | pub type GpgmeCtx = gpgme_ctx_t; |
4858 | pub type GpgmeData = gpgme_data_t; |
4859 | pub type GpgmeError = gpgme_error_t; |
4860 | - pub use self::gpgme_attr_t as GpgmeAttr; |
4861 | - pub use self::gpgme_data_encoding_t as GpgmeDataEncoding; |
4862 | - pub use self::gpgme_hash_algo_t as GpgmeHashAlgo; |
4863 | - pub use self::gpgme_protocol_t as GpgmeProtocol; |
4864 | - pub use self::gpgme_pubkey_algo_t as GpgmePubKeyAlgo; |
4865 | - pub use self::gpgme_sig_mode_t as GpgmeSigMode; |
4866 | - pub use self::gpgme_sig_stat_t as GpgmeSigStat; |
4867 | - pub use self::gpgme_validity_t as GpgmeValidity; |
4868 | + pub use self::{ |
4869 | + gpgme_attr_t as GpgmeAttr, gpgme_data_encoding_t as GpgmeDataEncoding, |
4870 | + gpgme_hash_algo_t as GpgmeHashAlgo, gpgme_protocol_t as GpgmeProtocol, |
4871 | + gpgme_pubkey_algo_t as GpgmePubKeyAlgo, gpgme_sig_mode_t as GpgmeSigMode, |
4872 | + gpgme_sig_stat_t as GpgmeSigStat, gpgme_validity_t as GpgmeValidity, |
4873 | + }; |
4874 | pub type GpgmeEngineInfo = gpgme_engine_info_t; |
4875 | pub type GpgmeSubkey = gpgme_subkey_t; |
4876 | pub type GpgmeKeySig = gpgme_key_sig_t; |
4877 | diff --git a/melib/src/gpgme/io.rs b/melib/src/gpgme/io.rs |
4878 | index 5d37578..d716e35 100644 |
4879 | --- a/melib/src/gpgme/io.rs |
4880 | +++ b/melib/src/gpgme/io.rs |
4881 | @@ -19,9 +19,10 @@ |
4882 | * along with meli. If not, see <http://www.gnu.org/licenses/>. |
4883 | */ |
4884 | |
4885 | - use super::*; |
4886 | use std::io::{self, Read, Seek, Write}; |
4887 | |
4888 | + use super::*; |
4889 | + |
4890 | #[repr(C)] |
4891 | struct TagData { |
4892 | idx: usize, |
4893 | diff --git a/melib/src/gpgme/mod.rs b/melib/src/gpgme/mod.rs |
4894 | index 511d4cc..858a14c 100644 |
4895 | --- a/melib/src/gpgme/mod.rs |
4896 | +++ b/melib/src/gpgme/mod.rs |
4897 | @@ -19,26 +19,34 @@ |
4898 | * along with meli. If not, see <http://www.gnu.org/licenses/>. |
4899 | */ |
4900 | |
4901 | - use crate::email::{ |
4902 | - pgp::{DecryptionMetadata, Recipient}, |
4903 | - Address, |
4904 | + use std::{ |
4905 | + borrow::Cow, |
4906 | + collections::HashMap, |
4907 | + ffi::{CStr, CString, OsStr}, |
4908 | + future::Future, |
4909 | + io::Seek, |
4910 | + os::unix::{ |
4911 | + ffi::OsStrExt, |
4912 | + io::{AsRawFd, RawFd}, |
4913 | + }, |
4914 | + path::Path, |
4915 | + sync::{Arc, Mutex}, |
4916 | }; |
4917 | - use crate::error::{Error, ErrorKind, IntoError, Result, ResultIntoError}; |
4918 | + |
4919 | use futures::FutureExt; |
4920 | use serde::{ |
4921 | de::{self, Deserialize}, |
4922 | Deserializer, Serialize, Serializer, |
4923 | }; |
4924 | use smol::Async; |
4925 | - use std::borrow::Cow; |
4926 | - use std::collections::HashMap; |
4927 | - use std::ffi::{CStr, CString, OsStr}; |
4928 | - use std::future::Future; |
4929 | - use std::io::Seek; |
4930 | - use std::os::unix::ffi::OsStrExt; |
4931 | - use std::os::unix::io::{AsRawFd, RawFd}; |
4932 | - use std::path::Path; |
4933 | - use std::sync::{Arc, Mutex}; |
4934 | + |
4935 | + use crate::{ |
4936 | + email::{ |
4937 | + pgp::{DecryptionMetadata, Recipient}, |
4938 | + Address, |
4939 | + }, |
4940 | + error::{Error, ErrorKind, IntoError, Result, ResultIntoError}, |
4941 | + }; |
4942 | |
4943 | macro_rules! call { |
4944 | ($lib:expr, $func:ty) => {{ |
4945 | @@ -247,10 +255,10 @@ impl Context { |
4946 | |
4947 | let mut io_cbs = gpgme_io_cbs { |
4948 | add: Some(io::gpgme_register_io_cb), |
4949 | - add_priv: Arc::into_raw(add_priv_data) as *mut ::std::os::raw::c_void, //add_priv: *mut ::std::os::raw::c_void, |
4950 | + add_priv: Arc::into_raw(add_priv_data) as *mut ::std::os::raw::c_void, /* add_priv: *mut ::std::os::raw::c_void, */ |
4951 | remove: Some(io::gpgme_remove_io_cb), |
4952 | event: Some(io::gpgme_event_io_cb), |
4953 | - event_priv: Arc::into_raw(event_priv_data) as *mut ::std::os::raw::c_void, //pub event_priv: *mut ::std::os::raw::c_void, |
4954 | + event_priv: Arc::into_raw(event_priv_data) as *mut ::std::os::raw::c_void, /* pub event_priv: *mut ::std::os::raw::c_void, */ |
4955 | }; |
4956 | |
4957 | unsafe { |
4958 | @@ -1345,7 +1353,8 @@ impl Drop for Key { |
4959 | // futures::executor::block_on(ctx.keylist().unwrap()).unwrap() |
4960 | // ); |
4961 | // let cipher = ctx.new_data_file("/tmp/msg.asc").unwrap(); |
4962 | - // let plain = futures::executor::block_on(ctx.decrypt(cipher).unwrap()).unwrap(); |
4963 | + // let plain = |
4964 | + // futures::executor::block_on(ctx.decrypt(cipher).unwrap()).unwrap(); |
4965 | // println!( |
4966 | // "buf: {}", |
4967 | // String::from_utf8_lossy(&plain.into_bytes().unwrap()) |
4968 | diff --git a/melib/src/lib.rs b/melib/src/lib.rs |
4969 | index c50086d..8902d27 100644 |
4970 | --- a/melib/src/lib.rs |
4971 | +++ b/melib/src/lib.rs |
4972 | @@ -20,19 +20,29 @@ |
4973 | */ |
4974 | |
4975 | //! A crate that performs mail client operations such as |
4976 | - //! - Hold an [`Envelope`](./email/struct.Envelope.html) with methods convenient for mail client use. (see module [`email`](./email/index.html)) |
4977 | - //! - Abstract through mail storages through the [`MailBackend`](./backends/trait.MailBackend.html) trait, and handle read/writes/updates through it. (see module [`backends`](./backends/index.html)) |
4978 | - //! - Decode attachments (see module [`email::attachments`](./email/attachments/index.html)) |
4979 | + //! - Hold an [`Envelope`](./email/struct.Envelope.html) with methods convenient |
4980 | + //! for mail client use. (see module [`email`](./email/index.html)) |
4981 | + //! - Abstract through mail storages through the |
4982 | + //! [`MailBackend`](./backends/trait.MailBackend.html) trait, and handle |
4983 | + //! read/writes/updates through it. (see module |
4984 | + //! [`backends`](./backends/index.html)) |
4985 | + //! - Decode attachments (see module |
4986 | + //! [`email::attachments`](./email/attachments/index.html)) |
4987 | //! - Create new mail (see [`email::Draft`](./email/compose/struct.Draft.html)) |
4988 | //! - Send mail with an SMTP client (see module [`smtp`](./smtp/index.html)) |
4989 | - //! - Manage an `addressbook` i.e. have contacts (see module [`addressbook`](./addressbook/index.html)) |
4990 | - //! - Build thread structures out of a list of mail via their `In-Reply-To` and `References` header values (see module [`thread`](./thread/index.html)) |
4991 | + //! - Manage an `addressbook` i.e. have contacts (see module |
4992 | + //! [`addressbook`](./addressbook/index.html)) |
4993 | + //! - Build thread structures out of a list of mail via their `In-Reply-To` and |
4994 | + //! `References` header values (see module [`thread`](./thread/index.html)) |
4995 | //! |
4996 | //! Other exports are |
4997 | - //! - Basic mail account configuration to use with [`backends`](./backends/index.html) (see module [`conf`](./conf/index.html)) |
4998 | + //! - Basic mail account configuration to use with |
4999 | + //! [`backends`](./backends/index.html) (see module |
5000 | + //! [`conf`](./conf/index.html)) |
5001 | //! - Parser combinators (see module [`parsec`](./parsec/index.html)) |
5002 | //! - A `ShellExpandTrait` to expand paths like a shell. |
5003 | - //! - A `debug` macro that works like `std::dbg` but for multiple threads. (see [`debug` macro](./macro.debug.html)) |
5004 | + //! - A `debug` macro that works like `std::dbg` but for multiple threads. (see |
5005 | + //! [`debug` macro](./macro.debug.html)) |
5006 | #[macro_use] |
5007 | pub mod dbg { |
5008 | |
5009 | @@ -102,8 +112,7 @@ pub use datetime::UnixTimestamp; |
5010 | |
5011 | #[macro_use] |
5012 | mod logging; |
5013 | - pub use self::logging::LoggingLevel::*; |
5014 | - pub use self::logging::*; |
5015 | + pub use self::logging::{LoggingLevel::*, *}; |
5016 | |
5017 | pub mod addressbook; |
5018 | pub use addressbook::*; |
5019 | @@ -180,12 +189,15 @@ impl core::fmt::Display for Bytes { |
5020 | pub use shellexpand::ShellExpandTrait; |
5021 | pub mod shellexpand { |
5022 | |
5023 | - use smallvec::SmallVec; |
5024 | - use std::ffi::OsStr; |
5025 | - use std::os::unix::ffi::OsStrExt; |
5026 | #[cfg(not(any(target_os = "netbsd", target_os = "macos")))] |
5027 | use std::os::unix::io::AsRawFd; |
5028 | - use std::path::{Path, PathBuf}; |
5029 | + use std::{ |
5030 | + ffi::OsStr, |
5031 | + os::unix::ffi::OsStrExt, |
5032 | + path::{Path, PathBuf}, |
5033 | + }; |
5034 | + |
5035 | + use smallvec::SmallVec; |
5036 | |
5037 | pub trait ShellExpandTrait { |
5038 | fn expand(&self) -> PathBuf; |
5039 | @@ -233,23 +245,20 @@ pub mod shellexpand { |
5040 | |
5041 | let (prefix, _match) = if self.as_os_str().as_bytes().ends_with(b"/.") { |
5042 | (self.components().as_path(), OsStr::from_bytes(b".")) |
5043 | + } else if self.exists() && (!force || self.as_os_str().as_bytes().ends_with(b"/")) { |
5044 | + return SmallVec::new(); |
5045 | } else { |
5046 | - if self.exists() && (!force || self.as_os_str().as_bytes().ends_with(b"/")) { |
5047 | - // println!("{} {:?}", self.display(), self.components().last()); |
5048 | - return SmallVec::new(); |
5049 | + let last_component = self |
5050 | + .components() |
5051 | + .last() |
5052 | + .map(|c| c.as_os_str()) |
5053 | + .unwrap_or_else(|| OsStr::from_bytes(b"")); |
5054 | + let prefix = if let Some(p) = self.parent() { |
5055 | + p |
5056 | } else { |
5057 | - let last_component = self |
5058 | - .components() |
5059 | - .last() |
5060 | - .map(|c| c.as_os_str()) |
5061 | - .unwrap_or_else(|| OsStr::from_bytes(b"")); |
5062 | - let prefix = if let Some(p) = self.parent() { |
5063 | - p |
5064 | - } else { |
5065 | - return SmallVec::new(); |
5066 | - }; |
5067 | - (prefix, last_component) |
5068 | - } |
5069 | + return SmallVec::new(); |
5070 | + }; |
5071 | + (prefix, last_component) |
5072 | }; |
5073 | |
5074 | let dir = match ::nix::dir::Dir::openat( |
5075 | @@ -322,10 +331,13 @@ pub mod shellexpand { |
5076 | pos += dir[0].d_reclen as usize; |
5077 | } |
5078 | // https://github.com/romkatv/gitstatus/blob/caf44f7aaf33d0f46e6749e50595323c277e0908/src/dir.cc |
5079 | - // "It's tempting to bail here if n + sizeof(linux_dirent64) + 512 <= n. After all, there |
5080 | - // was enough space for another entry but SYS_getdents64 didn't write it, so this must be |
5081 | - // the end of the directory listing, right? Unfortunately, no. SYS_getdents64 is finicky. |
5082 | - // It sometimes writes a partial list of entries even if the full list would fit." |
5083 | + // "It's tempting to bail here if n + sizeof(linux_dirent64) + |
5084 | + // 512 <= n. After all, there was enough space |
5085 | + // for another entry but SYS_getdents64 didn't write it, so this |
5086 | + // must be the end of the directory listing, |
5087 | + // right? Unfortunately, no. SYS_getdents64 is finicky. |
5088 | + // It sometimes writes a partial list of entries even if the |
5089 | + // full list would fit." |
5090 | } |
5091 | entries |
5092 | } |
5093 | @@ -420,8 +432,7 @@ macro_rules! declare_u64_hash { |
5094 | impl $type_name { |
5095 | #[inline(always)] |
5096 | pub fn from_bytes(bytes: &[u8]) -> Self { |
5097 | - use std::collections::hash_map::DefaultHasher; |
5098 | - use std::hash::Hasher; |
5099 | + use std::{collections::hash_map::DefaultHasher, hash::Hasher}; |
5100 | let mut h = DefaultHasher::new(); |
5101 | h.write(bytes); |
5102 | Self(h.finish()) |
5103 | diff --git a/melib/src/logging.rs b/melib/src/logging.rs |
5104 | index 6259b4a..36f9c16 100644 |
5105 | --- a/melib/src/logging.rs |
5106 | +++ b/melib/src/logging.rs |
5107 | @@ -19,11 +19,14 @@ |
5108 | * along with meli. If not, see <http://www.gnu.org/licenses/>. |
5109 | */ |
5110 | |
5111 | + use std::{ |
5112 | + fs::OpenOptions, |
5113 | + io::{BufWriter, Write}, |
5114 | + path::PathBuf, |
5115 | + sync::{Arc, Mutex}, |
5116 | + }; |
5117 | + |
5118 | use crate::shellexpand::ShellExpandTrait; |
5119 | - use std::fs::OpenOptions; |
5120 | - use std::io::{BufWriter, Write}; |
5121 | - use std::path::PathBuf; |
5122 | - use std::sync::{Arc, Mutex}; |
5123 | |
5124 | #[derive(Copy, Clone, PartialEq, PartialOrd, Hash, Debug, Serialize, Deserialize)] |
5125 | pub enum LoggingLevel { |
5126 | diff --git a/melib/src/parsec.rs b/melib/src/parsec.rs |
5127 | index c4205b1..a8541c0 100644 |
5128 | --- a/melib/src/parsec.rs |
5129 | +++ b/melib/src/parsec.rs |
5130 | @@ -442,30 +442,17 @@ pub fn is_not<'a>(slice: &'static [u8]) -> impl Parser<'a, &'a str> { |
5131 | /// |
5132 | /// let parser = |input| { |
5133 | /// alt([ |
5134 | - /// delimited( |
5135 | - /// match_literal("{"), |
5136 | - /// quoted_slice(), |
5137 | - /// match_literal("}"), |
5138 | - /// ), |
5139 | - /// delimited( |
5140 | - /// match_literal("["), |
5141 | - /// quoted_slice(), |
5142 | - /// match_literal("]"), |
5143 | - /// ), |
5144 | - /// ]).parse(input) |
5145 | + /// delimited(match_literal("{"), quoted_slice(), match_literal("}")), |
5146 | + /// delimited(match_literal("["), quoted_slice(), match_literal("]")), |
5147 | + /// ]) |
5148 | + /// .parse(input) |
5149 | /// }; |
5150 | /// |
5151 | /// let input1: &str = "{\"quoted\"}"; |
5152 | /// let input2: &str = "[\"quoted\"]"; |
5153 | - /// assert_eq!( |
5154 | - /// Ok(("", "quoted")), |
5155 | - /// parser.parse(input1) |
5156 | - /// ); |
5157 | + /// assert_eq!(Ok(("", "quoted")), parser.parse(input1)); |
5158 | /// |
5159 | - /// assert_eq!( |
5160 | - /// Ok(("", "quoted")), |
5161 | - /// parser.parse(input2) |
5162 | - /// ); |
5163 | + /// assert_eq!(Ok(("", "quoted")), parser.parse(input2)); |
5164 | /// ``` |
5165 | pub fn alt<'a, P, A, const N: usize>(parsers: [P; N]) -> impl Parser<'a, A> |
5166 | where |
5167 | @@ -591,20 +578,17 @@ pub fn take<'a>(count: usize) -> impl Parser<'a, &'a str> { |
5168 | ///```rust |
5169 | /// # use std::str::FromStr; |
5170 | /// # use melib::parsec::{Parser, delimited, match_literal, map_res, is_a, take_literal}; |
5171 | - /// let lit: &str = "{31}\r\nThere is no script by that name\r\n"; |
5172 | - /// assert_eq!( |
5173 | - /// take_literal(delimited( |
5174 | - /// match_literal("{"), |
5175 | - /// map_res(is_a(b"0123456789"), |s| usize::from_str(s)), |
5176 | - /// match_literal("}\r\n"), |
5177 | - /// )) |
5178 | - /// .parse(lit), |
5179 | - /// Ok(( |
5180 | - /// "\r\n", |
5181 | - /// "There is no script by that name", |
5182 | - /// )) |
5183 | - /// ); |
5184 | - ///``` |
5185 | + /// let lit: &str = "{31}\r\nThere is no script by that name\r\n"; |
5186 | + /// assert_eq!( |
5187 | + /// take_literal(delimited( |
5188 | + /// match_literal("{"), |
5189 | + /// map_res(is_a(b"0123456789"), |s| usize::from_str(s)), |
5190 | + /// match_literal("}\r\n"), |
5191 | + /// )) |
5192 | + /// .parse(lit), |
5193 | + /// Ok(("\r\n", "There is no script by that name",)) |
5194 | + /// ); |
5195 | + /// ``` |
5196 | pub fn take_literal<'a, P>(parser: P) -> impl Parser<'a, &'a str> |
5197 | where |
5198 | P: Parser<'a, usize>, |
5199 | @@ -617,9 +601,10 @@ where |
5200 | |
5201 | #[cfg(test)] |
5202 | mod test { |
5203 | - use super::*; |
5204 | use std::collections::HashMap; |
5205 | |
5206 | + use super::*; |
5207 | + |
5208 | #[test] |
5209 | fn test_parsec() { |
5210 | #[derive(Debug, PartialEq)] |
5211 | @@ -639,16 +624,16 @@ mod test { |
5212 | either( |
5213 | either( |
5214 | either( |
5215 | - map(parse_bool(), |b| JsonValue::JsonBool(b)), |
5216 | + map(parse_bool(), JsonValue::JsonBool), |
5217 | map(parse_null(), |()| JsonValue::JsonNull), |
5218 | ), |
5219 | - map(parse_array(), |vec| JsonValue::JsonArray(vec)), |
5220 | + map(parse_array(), JsonValue::JsonArray), |
5221 | ), |
5222 | - map(parse_object(), |obj| JsonValue::JsonObject(obj)), |
5223 | + map(parse_object(), JsonValue::JsonObject), |
5224 | ), |
5225 | - map(parse_number(), |n| JsonValue::JsonNumber(n)), |
5226 | + map(parse_number(), JsonValue::JsonNumber), |
5227 | ), |
5228 | - map(quoted_string(), |s| JsonValue::JsonString(s)), |
5229 | + map(quoted_string(), JsonValue::JsonString), |
5230 | ) |
5231 | .parse(input) |
5232 | } |
5233 | diff --git a/melib/src/search.rs b/melib/src/search.rs |
5234 | index 467d7b0..0693cc7 100644 |
5235 | --- a/melib/src/search.rs |
5236 | +++ b/melib/src/search.rs |
5237 | @@ -19,14 +19,13 @@ |
5238 | * along with meli. If not, see <http://www.gnu.org/licenses/>. |
5239 | */ |
5240 | |
5241 | - use crate::parsec::*; |
5242 | - use crate::UnixTimestamp; |
5243 | - use std::borrow::Cow; |
5244 | - use std::convert::TryFrom; |
5245 | + use std::{borrow::Cow, convert::TryFrom}; |
5246 | |
5247 | pub use query_parser::query; |
5248 | use Query::*; |
5249 | |
5250 | + use crate::{parsec::*, UnixTimestamp}; |
5251 | + |
5252 | #[derive(Debug, PartialEq, Clone, Serialize)] |
5253 | pub enum Query { |
5254 | Before(UnixTimestamp), |
5255 | @@ -233,9 +232,10 @@ pub mod query_parser { |
5256 | /// |
5257 | /// # Invocation |
5258 | /// ``` |
5259 | - /// use melib::search::query; |
5260 | - /// use melib::search::Query; |
5261 | - /// use melib::parsec::Parser; |
5262 | + /// use melib::{ |
5263 | + /// parsec::Parser, |
5264 | + /// search::{query, Query}, |
5265 | + /// }; |
5266 | /// |
5267 | /// let input = "test"; |
5268 | /// let query = query().parse(input); |
5269 | diff --git a/melib/src/sieve.rs b/melib/src/sieve.rs |
5270 | index d84e07b..6a66a26 100644 |
5271 | --- a/melib/src/sieve.rs |
5272 | +++ b/melib/src/sieve.rs |
5273 | @@ -153,7 +153,8 @@ pub enum ZoneRule { |
5274 | ///time zone in offset format "+hhmm" or "-hhmm". An |
5275 | ///offset of 0 (Zulu) always has a positive sign. |
5276 | Zone, |
5277 | - /// "weekday" => the day of the week expressed as an integer between "0" and "6". "0" is Sunday, "1" is Monday, etc. |
5278 | + /// "weekday" => the day of the week expressed as an integer between "0" |
5279 | + /// and "6". "0" is Sunday, "1" is Monday, etc. |
5280 | Weekday, |
5281 | } |
5282 | |
5283 | @@ -370,9 +371,9 @@ pub mod parser { |
5284 | ), |
5285 | |(num_s, quant)| { |
5286 | Ok(match (num_s.parse::<u64>(), quant.to_ascii_lowercase()) { |
5287 | - (Ok(num), 'k') => num * 1000, |
5288 | - (Ok(num), 'm') => num * 1000_000, |
5289 | - (Ok(num), 'g') => num * 1000_000_000, |
5290 | + (Ok(num), 'k') => num * 1_000, |
5291 | + (Ok(num), 'm') => num * 1_000_000, |
5292 | + (Ok(num), 'g') => num * 1_000_000_000, |
5293 | _ => return Err(num_s), |
5294 | }) |
5295 | }, |
5296 | @@ -483,7 +484,8 @@ pub mod parser { |
5297 | } |
5298 | } |
5299 | |
5300 | - // address [COMPARATOR] [ADDRESS-PART] [MATCH-TYPE] <header-list: string-list> <key-list: string-list> |
5301 | + // address [COMPARATOR] [ADDRESS-PART] [MATCH-TYPE] <header-list: string-list> |
5302 | + // <key-list: string-list> |
5303 | pub fn parse_sieve_address<'a>() -> impl Parser<'a, ConditionRule> { |
5304 | move |input| { |
5305 | map( |
5306 | @@ -677,19 +679,12 @@ pub mod parser { |
5307 | |
5308 | #[cfg(test)] |
5309 | mod test { |
5310 | - use super::parser::*; |
5311 | + use super::{ |
5312 | + parser::*, ActionCommand::*, AddressOperator::*, CharacterOperator::*, ConditionRule::*, |
5313 | + ControlCommand::*, IntegerOperator::*, MatchOperator::*, Rule::*, RuleBlock, |
5314 | + }; |
5315 | use crate::parsec::Parser; |
5316 | |
5317 | - use super::ActionCommand::*; |
5318 | - use super::AddressOperator::*; |
5319 | - use super::CharacterOperator::*; |
5320 | - use super::ConditionRule::*; |
5321 | - use super::ControlCommand::*; |
5322 | - use super::IntegerOperator::*; |
5323 | - use super::MatchOperator::*; |
5324 | - use super::Rule::*; |
5325 | - use super::RuleBlock; |
5326 | - |
5327 | #[test] |
5328 | fn test_sieve_parse_strings() { |
5329 | assert_eq!( |
5330 | @@ -705,9 +700,10 @@ mod test { |
5331 | |
5332 | #[test] |
5333 | fn test_sieve_parse_conditionals() { |
5334 | - /* Operators that start with : like :matches are unordered and optional, since they have |
5335 | - * defaults. But that means we must handle any order correctly, which is tricky if we use |
5336 | - * an optional parser; for an optional parser both None and Some(_) are valid values. |
5337 | + /* Operators that start with : like :matches are unordered and optional, |
5338 | + * since they have defaults. But that means we must handle any order |
5339 | + * correctly, which is tricky if we use an optional parser; for an |
5340 | + * optional parser both None and Some(_) are valid values. |
5341 | */ |
5342 | |
5343 | /* Permutations of two */ |
5344 | diff --git a/melib/src/smtp.rs b/melib/src/smtp.rs |
5345 | index 1c38411..8f9d1f3 100644 |
5346 | --- a/melib/src/smtp.rs |
5347 | +++ b/melib/src/smtp.rs |
5348 | @@ -24,8 +24,8 @@ |
5349 | |
5350 | //! SMTP client support |
5351 | //! |
5352 | - //! This module implements a client for the SMTP protocol as specified by [RFC 5321 Simple Mail |
5353 | - //! Transfer Protocol](https://www.rfc-editor.org/rfc/rfc5321). |
5354 | + //! This module implements a client for the SMTP protocol as specified by [RFC |
5355 | + //! 5321 Simple Mail Transfer Protocol](https://www.rfc-editor.org/rfc/rfc5321). |
5356 | //! |
5357 | //! The connection and methods are `async` and uses the `smol` runtime. |
5358 | //!# Example |
5359 | @@ -72,18 +72,18 @@ |
5360 | //! Ok(()) |
5361 | //! ``` |
5362 | |
5363 | - use crate::connections::{lookup_ipv4, Connection}; |
5364 | - use crate::email::{parser::BytesExt, Address, Envelope}; |
5365 | - use crate::error::{Error, Result, ResultIntoError}; |
5366 | + use std::{borrow::Cow, convert::TryFrom, net::TcpStream, process::Command}; |
5367 | + |
5368 | use futures::io::{AsyncReadExt, AsyncWriteExt}; |
5369 | use native_tls::TlsConnector; |
5370 | use smallvec::SmallVec; |
5371 | - use smol::unblock; |
5372 | - use smol::Async as AsyncWrapper; |
5373 | - use std::borrow::Cow; |
5374 | - use std::convert::TryFrom; |
5375 | - use std::net::TcpStream; |
5376 | - use std::process::Command; |
5377 | + use smol::{unblock, Async as AsyncWrapper}; |
5378 | + |
5379 | + use crate::{ |
5380 | + connections::{lookup_ipv4, Connection}, |
5381 | + email::{parser::BytesExt, Address, Envelope}, |
5382 | + error::{Error, Result, ResultIntoError}, |
5383 | + }; |
5384 | |
5385 | /// Kind of server security (StartTLS/TLS/None) the client should attempt |
5386 | #[derive(Debug, Copy, PartialEq, Eq, Clone, Serialize, Deserialize)] |
5387 | @@ -191,11 +191,12 @@ pub struct SmtpExtensionSupport { |
5388 | /// [RFC 6152: SMTP Service Extension for 8-bit MIME Transport](https://www.rfc-editor.org/rfc/rfc6152) |
5389 | #[serde(default = "crate::conf::true_val")] |
5390 | _8bitmime: bool, |
5391 | - /// Essentially, the PRDR extension to SMTP allows (but does not require) an SMTP server to |
5392 | - /// issue multiple responses after a message has been transferred, by mutual consent of the |
5393 | - /// client and server. SMTP clients that support the PRDR extension then use the expanded |
5394 | - /// responses as supplemental data to the responses that were received during the earlier |
5395 | - /// envelope exchange. |
5396 | + /// Essentially, the PRDR extension to SMTP allows (but does not require) an |
5397 | + /// SMTP server to issue multiple responses after a message has been |
5398 | + /// transferred, by mutual consent of the client and server. SMTP |
5399 | + /// clients that support the PRDR extension then use the expanded |
5400 | + /// responses as supplemental data to the responses that were received |
5401 | + /// during the earlier envelope exchange. |
5402 | #[serde(default = "crate::conf::true_val")] |
5403 | prdr: bool, |
5404 | #[serde(default = "crate::conf::true_val")] |
5405 | @@ -284,7 +285,10 @@ impl SmtpConnection { |
5406 | danger_accept_invalid_certs, |
5407 | }; |
5408 | } else { |
5409 | - return Err(Error::new("Please specify what SMTP security transport to use explicitly instead of `auto`.")); |
5410 | + return Err(Error::new( |
5411 | + "Please specify what SMTP security transport to use explicitly \ |
5412 | + instead of `auto`.", |
5413 | + )); |
5414 | } |
5415 | } |
5416 | socket.write_all(b"EHLO meli.delivery\r\n").await?; |
5417 | @@ -386,9 +390,11 @@ impl SmtpConnection { |
5418 | .any(|l| l.starts_with("AUTH")) |
5419 | { |
5420 | return Err(Error::new(format!( |
5421 | - "SMTP Server doesn't advertise Authentication support. Server response was: {:?}", |
5422 | - pre_auth_extensions_reply |
5423 | - )).set_kind(crate::error::ErrorKind::Authentication)); |
5424 | + "SMTP Server doesn't advertise Authentication support. Server response was: \ |
5425 | + {:?}", |
5426 | + pre_auth_extensions_reply |
5427 | + )) |
5428 | + .set_kind(crate::error::ErrorKind::Authentication)); |
5429 | } |
5430 | no_auth_needed = |
5431 | ret.server_conf.auth == SmtpAuth::None || !ret.server_conf.auth.require_auth(); |
5432 | @@ -430,7 +436,7 @@ impl SmtpConnection { |
5433 | |
5434 | let mut output = unblock(move || { |
5435 | Command::new("sh") |
5436 | - .args(&["-c", &_command]) |
5437 | + .args(["-c", &_command]) |
5438 | .stdin(std::process::Stdio::piped()) |
5439 | .stdout(std::process::Stdio::piped()) |
5440 | .stderr(std::process::Stdio::piped()) |
5441 | @@ -493,7 +499,7 @@ impl SmtpConnection { |
5442 | let _token_command = token_command.clone(); |
5443 | let mut output = unblock(move || { |
5444 | Command::new("sh") |
5445 | - .args(&["-c", &_token_command]) |
5446 | + .args(["-c", &_token_command]) |
5447 | .stdin(std::process::Stdio::piped()) |
5448 | .stdout(std::process::Stdio::piped()) |
5449 | .stderr(std::process::Stdio::piped()) |
5450 | @@ -538,7 +544,7 @@ impl SmtpConnection { |
5451 | self.server_conf.envelope_from = envelope_from; |
5452 | } |
5453 | |
5454 | - fn set_extension_support(&mut self, reply: Reply<'_>) { |
5455 | + fn set_extension_support(&mut self, reply: Reply) { |
5456 | debug_assert_eq!(reply.code, ReplyCode::_250); |
5457 | self.server_conf.extensions.pipelining &= reply.lines.contains(&"PIPELINING"); |
5458 | self.server_conf.extensions.chunking &= reply.lines.contains(&"CHUNKING"); |
5459 | @@ -595,7 +601,10 @@ impl SmtpConnection { |
5460 | .chain_err_summary(|| "SMTP submission was aborted")?; |
5461 | let tos = tos.unwrap_or_else(|| envelope.to()); |
5462 | if tos.is_empty() && envelope.cc().is_empty() && envelope.bcc().is_empty() { |
5463 | - return Err(Error::new("SMTP submission was aborted because there was no e-mail address found in the To: header field. Consider adding recipients.")); |
5464 | + return Err(Error::new( |
5465 | + "SMTP submission was aborted because there was no e-mail address found in the To: \ |
5466 | + header field. Consider adding recipients.", |
5467 | + )); |
5468 | } |
5469 | let mut current_command: SmallVec<[&[u8]; 16]> = SmallVec::new(); |
5470 | //first step in the procedure is the MAIL command. |
5471 | @@ -605,9 +614,17 @@ impl SmtpConnection { |
5472 | current_command.push(envelope_from.trim().as_bytes()); |
5473 | } else { |
5474 | if envelope.from().is_empty() { |
5475 | - return Err(Error::new("SMTP submission was aborted because there was no e-mail address found in the From: header field. Consider adding a valid value or setting `envelope_from` in SMTP client settings")); |
5476 | + return Err(Error::new( |
5477 | + "SMTP submission was aborted because there was no e-mail address found in the \ |
5478 | + From: header field. Consider adding a valid value or setting `envelope_from` \ |
5479 | + in SMTP client settings", |
5480 | + )); |
5481 | } else if envelope.from().len() != 1 { |
5482 | - return Err(Error::new("SMTP submission was aborted because there was more than one e-mail address found in the From: header field. Consider setting `envelope_from` in SMTP client settings")); |
5483 | + return Err(Error::new( |
5484 | + "SMTP submission was aborted because there was more than one e-mail address \ |
5485 | + found in the From: header field. Consider setting `envelope_from` in SMTP \ |
5486 | + client settings", |
5487 | + )); |
5488 | } |
5489 | current_command.push(envelope.from()[0].address_spec_raw().trim()); |
5490 | } |
5491 | @@ -628,12 +645,13 @@ impl SmtpConnection { |
5492 | } else { |
5493 | pipelining_queue.push(Some((ReplyCode::_250, &[]))); |
5494 | } |
5495 | - //The second step in the procedure is the RCPT command. This step of the procedure can |
5496 | - //be repeated any number of times. If accepted, the SMTP server returns a "250 OK" |
5497 | - //reply. If the mailbox specification is not acceptable for some reason, the server MUST |
5498 | - //return a reply indicating whether the failure is permanent (i.e., will occur again if |
5499 | - //the client tries to send the same address again) or temporary (i.e., the address might |
5500 | - //be accepted if the client tries again later). |
5501 | + //The second step in the procedure is the RCPT command. This step of the |
5502 | + // procedure can be repeated any number of times. If accepted, the SMTP |
5503 | + // server returns a "250 OK" reply. If the mailbox specification is not |
5504 | + // acceptable for some reason, the server MUST return a reply indicating |
5505 | + // whether the failure is permanent (i.e., will occur again if |
5506 | + // the client tries to send the same address again) or temporary (i.e., the |
5507 | + // address might be accepted if the client tries again later). |
5508 | for addr in tos |
5509 | .iter() |
5510 | .chain(envelope.cc().iter()) |
5511 | @@ -651,7 +669,8 @@ impl SmtpConnection { |
5512 | self.send_command(¤t_command).await?; |
5513 | |
5514 | //RCPT TO:<forward-path> [ SP <rcpt-parameters> ] <CRLF> |
5515 | - //If accepted, the SMTP server returns a "250 OK" reply and stores the forward-path. |
5516 | + //If accepted, the SMTP server returns a "250 OK" reply and stores the |
5517 | + // forward-path. |
5518 | if !self.server_conf.extensions.pipelining { |
5519 | self.read_lines(&mut res, Some((ReplyCode::_250, &[]))) |
5520 | .await?; |
5521 | @@ -660,9 +679,10 @@ impl SmtpConnection { |
5522 | } |
5523 | } |
5524 | |
5525 | - //Since it has been a common source of errors, it is worth noting that spaces are not |
5526 | - //permitted on either side of the colon following FROM in the MAIL command or TO in the |
5527 | - //RCPT command. The syntax is exactly as given above. |
5528 | + //Since it has been a common source of errors, it is worth noting that spaces |
5529 | + // are not permitted on either side of the colon following FROM in the |
5530 | + // MAIL command or TO in the RCPT command. The syntax is exactly as |
5531 | + // given above. |
5532 | |
5533 | if self.server_conf.extensions.binarymime { |
5534 | let mail_length = format!("{}", mail.as_bytes().len()); |
5535 | @@ -674,13 +694,14 @@ impl SmtpConnection { |
5536 | //(or some alternative specified in a service extension). |
5537 | //DATA <CRLF> |
5538 | self.send_command(&[b"DATA"]).await?; |
5539 | - //Client SMTP implementations that employ pipelining MUST check ALL statuses associated |
5540 | - //with each command in a group. For example, if none of the RCPT TO recipient addresses |
5541 | - //were accepted the client must then check the response to the DATA command -- the client |
5542 | - //cannot assume that the DATA command will be rejected just because none of the RCPT TO |
5543 | - //commands worked. If the DATA command was properly rejected the client SMTP can just |
5544 | - //issue RSET, but if the DATA command was accepted the client SMTP should send a single |
5545 | - //dot. |
5546 | + //Client SMTP implementations that employ pipelining MUST check ALL statuses |
5547 | + // associated with each command in a group. For example, if none of |
5548 | + // the RCPT TO recipient addresses were accepted the client must |
5549 | + // then check the response to the DATA command -- the client |
5550 | + // cannot assume that the DATA command will be rejected just because none of the |
5551 | + // RCPT TO commands worked. If the DATA command was properly |
5552 | + // rejected the client SMTP can just issue RSET, but if the DATA |
5553 | + // command was accepted the client SMTP should send a single dot. |
5554 | let mut _all_error = self.server_conf.extensions.pipelining; |
5555 | let mut _any_error = false; |
5556 | let mut ignore_mailfrom = true; |
5557 | @@ -694,15 +715,17 @@ impl SmtpConnection { |
5558 | pipelining_results.push(reply.into()); |
5559 | } |
5560 | |
5561 | - //If accepted, the SMTP server returns a 354 Intermediate reply and considers all |
5562 | - //succeeding lines up to but not including the end of mail data indicator to be the |
5563 | - //message text. When the end of text is successfully received and stored, the |
5564 | - //SMTP-receiver sends a "250 OK" reply. |
5565 | + //If accepted, the SMTP server returns a 354 Intermediate reply and considers |
5566 | + // all succeeding lines up to but not including the end of mail data |
5567 | + // indicator to be the message text. When the end of text is |
5568 | + // successfully received and stored, the SMTP-receiver sends a "250 |
5569 | + // OK" reply. |
5570 | self.read_lines(&mut res, Some((ReplyCode::_354, &[]))) |
5571 | .await?; |
5572 | |
5573 | - //Before sending a line of mail text, the SMTP client checks the first character of the |
5574 | - //line.If it is a period, one additional period is inserted at the beginning of the line. |
5575 | + //Before sending a line of mail text, the SMTP client checks the first |
5576 | + // character of the line.If it is a period, one additional period is |
5577 | + // inserted at the beginning of the line. |
5578 | for line in mail.lines() { |
5579 | if line.starts_with('.') { |
5580 | self.stream.write_all(b".").await?; |
5581 | @@ -715,15 +738,16 @@ impl SmtpConnection { |
5582 | self.stream.write_all(b".\r\n").await?; |
5583 | } |
5584 | |
5585 | - //The mail data are terminated by a line containing only a period, that is, the character |
5586 | - //sequence "<CRLF>.<CRLF>", where the first <CRLF> is actually the terminator of the |
5587 | - //previous line (see Section 4.5.2). This is the end of mail data indication. |
5588 | + //The mail data are terminated by a line containing only a period, that is, the |
5589 | + // character sequence "<CRLF>.<CRLF>", where the first <CRLF> is |
5590 | + // actually the terminator of the previous line (see Section 4.5.2). |
5591 | + // This is the end of mail data indication. |
5592 | self.stream.write_all(b".\r\n").await?; |
5593 | } |
5594 | |
5595 | - //The end of mail data indicator also confirms the mail transaction and tells the SMTP |
5596 | - //server to now process the stored recipients and mail data. If accepted, the SMTP |
5597 | - //server returns a "250 OK" reply. |
5598 | + //The end of mail data indicator also confirms the mail transaction and tells |
5599 | + // the SMTP server to now process the stored recipients and mail data. |
5600 | + // If accepted, the SMTP server returns a "250 OK" reply. |
5601 | let reply_code = self |
5602 | .read_lines( |
5603 | &mut res, |
5604 | @@ -760,7 +784,9 @@ pub type ExpectedReplyCode = Option<(ReplyCode, &'static [ReplyCode])>; |
5605 | pub enum ReplyCode { |
5606 | /// System status, or system help reply |
5607 | _211, |
5608 | - /// Help message (Information on how to use the receiver or the meaning of a particular non-standard command; this reply is useful only to the human user) |
5609 | + /// Help message (Information on how to use the receiver or the meaning of a |
5610 | + /// particular non-standard command; this reply is useful only to the human |
5611 | + /// user) |
5612 | _214, |
5613 | /// <domain> Service ready |
5614 | _220, |
5615 | @@ -772,7 +798,8 @@ pub enum ReplyCode { |
5616 | _250, |
5617 | /// User not local; will forward to <forward-path> (See Section 3.4) |
5618 | _251, |
5619 | - /// Cannot VRFY user, but will accept message and attempt delivery (See Section 3.5.3) |
5620 | + /// Cannot VRFY user, but will accept message and attempt delivery (See |
5621 | + /// Section 3.5.3) |
5622 | _252, |
5623 | /// rfc4954 AUTH continuation request |
5624 | _334, |
5625 | @@ -780,9 +807,11 @@ pub enum ReplyCode { |
5626 | _353, |
5627 | /// Start mail input; end with <CRLF>.<CRLF> |
5628 | _354, |
5629 | - /// <domain> Service not available, closing transmission channel (This may be a reply to any command if the service knows it must shut down) |
5630 | + /// <domain> Service not available, closing transmission channel (This may |
5631 | + /// be a reply to any command if the service knows it must shut down) |
5632 | _421, |
5633 | - /// Requested mail action not taken: mailbox unavailable (e.g., mailbox busy or temporarily blocked for policy reasons) |
5634 | + /// Requested mail action not taken: mailbox unavailable (e.g., mailbox busy |
5635 | + /// or temporarily blocked for policy reasons) |
5636 | _450, |
5637 | /// Requested action aborted: local error in processing |
5638 | _451, |
5639 | @@ -790,7 +819,8 @@ pub enum ReplyCode { |
5640 | _452, |
5641 | /// Server unable to accommodate parameters |
5642 | _455, |
5643 | - /// Syntax error, command unrecognized (This may include errors such as command line too long) |
5644 | + /// Syntax error, command unrecognized (This may include errors such as |
5645 | + /// command line too long) |
5646 | _500, |
5647 | /// Syntax error in parameters or arguments |
5648 | _501, |
5649 | @@ -802,15 +832,18 @@ pub enum ReplyCode { |
5650 | _504, |
5651 | /// Authentication failed |
5652 | _535, |
5653 | - /// Requested action not taken: mailbox unavailable (e.g., mailbox not found, no access, or command rejected for policy reasons) |
5654 | + /// Requested action not taken: mailbox unavailable (e.g., mailbox not |
5655 | + /// found, no access, or command rejected for policy reasons) |
5656 | _550, |
5657 | /// User not local; please try <forward-path> (See Section 3.4) |
5658 | _551, |
5659 | /// Requested mail action aborted: exceeded storage allocation |
5660 | _552, |
5661 | - /// Requested action not taken: mailbox name not allowed (e.g., mailbox syntax incorrect) |
5662 | + /// Requested action not taken: mailbox name not allowed (e.g., mailbox |
5663 | + /// syntax incorrect) |
5664 | _553, |
5665 | - /// Transaction failed (Or, in the case of a connection-opening response, "No SMTP service here") |
5666 | + /// Transaction failed (Or, in the case of a connection-opening response, |
5667 | + /// "No SMTP service here") |
5668 | _554, |
5669 | /// MAIL FROM/RCPT TO parameters not recognized or not implemented |
5670 | _555, |
5671 | @@ -844,10 +877,16 @@ impl ReplyCode { |
5672 | _503 => "Bad sequence of commands", |
5673 | _504 => "Command parameter not implemented", |
5674 | _535 => "Authentication failed", |
5675 | - _550 => "Requested action not taken: mailbox unavailable (e.g., mailbox not found, no access, or command rejected for policy reasons)", |
5676 | + _550 => { |
5677 | + "Requested action not taken: mailbox unavailable (e.g., mailbox not found, no \ |
5678 | + access, or command rejected for policy reasons)" |
5679 | + } |
5680 | _551 => "User not local", |
5681 | _552 => "Requested mail action aborted: exceeded storage allocation", |
5682 | - _553 => "Requested action not taken: mailbox name not allowed (e.g., mailbox syntax incorrect)", |
5683 | + _553 => { |
5684 | + "Requested action not taken: mailbox name not allowed (e.g., mailbox syntax \ |
5685 | + incorrect)" |
5686 | + } |
5687 | _554 => "Transaction failed", |
5688 | _555 => "MAIL FROM/RCPT TO parameters not recognized or not implemented", |
5689 | _530 => "Must issue a STARTTLS command first", |
5690 | @@ -927,19 +966,19 @@ pub struct Reply<'s> { |
5691 | pub lines: SmallVec<[&'s str; 16]>, |
5692 | } |
5693 | |
5694 | - impl<'s> Into<Result<ReplyCode>> for Reply<'s> { |
5695 | - fn into(self: Reply<'s>) -> Result<ReplyCode> { |
5696 | - if self.code.is_err() { |
5697 | - Err(Error::new(self.lines.join("\n")).set_summary(self.code.as_str())) |
5698 | + impl<'s> From<Reply<'s>> for Result<ReplyCode> { |
5699 | + fn from(val: Reply<'s>) -> Self { |
5700 | + if val.code.is_err() { |
5701 | + Err(Error::new(val.lines.join("\n")).set_summary(val.code.as_str())) |
5702 | } else { |
5703 | - Ok(self.code) |
5704 | + Ok(val.code) |
5705 | } |
5706 | } |
5707 | } |
5708 | |
5709 | impl<'s> Reply<'s> { |
5710 | - /// `s` must be raw SMTP output i.e each line must start with 3 digit reply code, a space |
5711 | - /// or '-' and end with '\r\n' |
5712 | + /// `s` must be raw SMTP output i.e each line must start with 3 digit reply |
5713 | + /// code, a space or '-' and end with '\r\n' |
5714 | pub fn new(s: &'s str, code: ReplyCode) -> Self { |
5715 | let lines: SmallVec<_> = s.lines().map(|l| &l[4..l.len()]).collect(); |
5716 | Reply { lines, code } |
5717 | @@ -959,7 +998,9 @@ async fn read_lines<'r>( |
5718 | let mut returned_code: Option<ReplyCode> = None; |
5719 | 'read_loop: loop { |
5720 | while let Some(pos) = ret[last_line_idx..].find("\r\n") { |
5721 | - // "Formally, a reply is defined to be the sequence: a three-digit code, <SP>, one line of text, and <CRLF>, or a multiline reply (as defined in the same section)." |
5722 | + // "Formally, a reply is defined to be the sequence: a three-digit code, <SP>, |
5723 | + // one line of text, and <CRLF>, or a multiline reply (as defined in the same |
5724 | + // section)." |
5725 | if ret[last_line_idx..].len() < 4 |
5726 | || !ret[last_line_idx..] |
5727 | .chars() |
5728 | @@ -1022,12 +1063,15 @@ async fn read_lines<'r>( |
5729 | |
5730 | #[cfg(test)] |
5731 | mod test { |
5732 | - use super::*; |
5733 | + use std::net::IpAddr; //, Ipv4Addr, Ipv6Addr}; |
5734 | + use std::{ |
5735 | + sync::{Arc, Mutex}, |
5736 | + thread, |
5737 | + }; |
5738 | |
5739 | use mailin_embedded::{Handler, Response, Server, SslConfig}; |
5740 | - use std::net::IpAddr; //, Ipv4Addr, Ipv6Addr}; |
5741 | - use std::sync::{Arc, Mutex}; |
5742 | - use std::thread; |
5743 | + |
5744 | + use super::*; |
5745 | |
5746 | const ADDRESS: &str = "127.0.0.1:8825"; |
5747 | #[derive(Debug, Clone)] |
5748 | @@ -1229,7 +1273,7 @@ mod test { |
5749 | futures::executor::block_on(SmtpConnection::new_connection(smtp_server_conf)).unwrap(); |
5750 | futures::executor::block_on(connection.mail_transaction( |
5751 | input_str, |
5752 | - /*tos*/ |
5753 | + /* tos */ |
5754 | Some(&[ |
5755 | Address::try_from("foo-chat@example.com").unwrap(), |
5756 | Address::try_from("webmaster@example.com").unwrap(), |
5757 | diff --git a/melib/src/sqlite3.rs b/melib/src/sqlite3.rs |
5758 | index a8177d4..9c6995b 100644 |
5759 | --- a/melib/src/sqlite3.rs |
5760 | +++ b/melib/src/sqlite3.rs |
5761 | @@ -19,10 +19,12 @@ |
5762 | * along with meli. If not, see <http://www.gnu.org/licenses/>. |
5763 | */ |
5764 | |
5765 | - use crate::{error::*, logging::log, Envelope}; |
5766 | + use std::path::PathBuf; |
5767 | + |
5768 | use rusqlite::types::{FromSql, FromSqlError, FromSqlResult, ToSql, ToSqlOutput}; |
5769 | pub use rusqlite::{self, params, Connection}; |
5770 | - use std::path::PathBuf; |
5771 | + |
5772 | + use crate::{error::*, logging::log, Envelope}; |
5773 | |
5774 | #[derive(Copy, Clone, Debug)] |
5775 | pub struct DatabaseDescription { |
5776 | @@ -90,8 +92,9 @@ pub fn open_or_create_db( |
5777 | ); |
5778 | if second_try { |
5779 | return Err(Error::new(format!( |
5780 | - "Database version mismatch, is {} but expected {}. Could not recreate database.", |
5781 | - version, description.version |
5782 | + "Database version mismatch, is {} but expected {}. Could not recreate \ |
5783 | + database.", |
5784 | + version, description.version |
5785 | ))); |
5786 | } |
5787 | reset_db(description, identifier)?; |
5788 | @@ -100,7 +103,7 @@ pub fn open_or_create_db( |
5789 | } |
5790 | |
5791 | if version == 0 { |
5792 | - conn.pragma_update(None, "user_version", &description.version)?; |
5793 | + conn.pragma_update(None, "user_version", description.version)?; |
5794 | } |
5795 | if let Some(s) = description.init_script { |
5796 | conn.execute_batch(s) |
5797 | diff --git a/melib/src/text_processing/grapheme_clusters.rs b/melib/src/text_processing/grapheme_clusters.rs |
5798 | index e74cf7e..069417e 100644 |
5799 | --- a/melib/src/text_processing/grapheme_clusters.rs |
5800 | +++ b/melib/src/text_processing/grapheme_clusters.rs |
5801 | @@ -29,8 +29,10 @@ |
5802 | |
5803 | */ |
5804 | |
5805 | - use super::types::Reflow; |
5806 | - use super::wcwidth::{wcwidth, CodePointsIter}; |
5807 | + use super::{ |
5808 | + types::Reflow, |
5809 | + wcwidth::{wcwidth, CodePointsIter}, |
5810 | + }; |
5811 | extern crate unicode_segmentation; |
5812 | use self::unicode_segmentation::UnicodeSegmentation; |
5813 | |
5814 | @@ -187,12 +189,13 @@ pub fn word_break_string(s: &str, width: usize) -> Vec<&str> { |
5815 | //} |
5816 | // |
5817 | //fn is_surrogate(s: &str, pos: usize) -> bool { |
5818 | - // return 0xd800 <= char_code_at(s, pos) && char_code_at(s, pos) <= 0xdbff && |
5819 | - // 0xdc00 <= char_code_at(s, pos + 1) && char_code_at(s, pos + 1) <= 0xdfff; |
5820 | + // return 0xd800 <= char_code_at(s, pos) && char_code_at(s, pos) <= 0xdbff |
5821 | + // && 0xdc00 <= char_code_at(s, pos + 1) && char_code_at(s, pos + 1) <= |
5822 | + // 0xdfff; |
5823 | //} |
5824 | // |
5825 | - //// Private function, gets a Unicode code point from a java_script UTF-16 string |
5826 | - //// handling surrogate pairs appropriately |
5827 | + //// Private function, gets a Unicode code point from a java_script UTF-16 |
5828 | + //// string handling surrogate pairs appropriately |
5829 | //fn code_point_at(s: &str, idx: usize) -> u8 { |
5830 | // let mut code: u8 = char_code_at(s, idx); |
5831 | // |
5832 | @@ -234,8 +237,8 @@ pub fn word_break_string(s: &str, width: usize) -> Vec<&str> { |
5833 | // // GB10. (E_Base | EBG) Extend* ? E_Modifier |
5834 | // let mut e_modifier_index = all.last_index_of(E_Modifier) |
5835 | // if(e_modifier_index > 1 && |
5836 | - // all.slice(1, e_modifier_index).every(function(c){return c == Extend}) && |
5837 | - // [Extend, E_Base, E_Base_GAZ].index_of(start) == -1){ |
5838 | + // all.slice(1, e_modifier_index).every(function(c){return c == |
5839 | + // Extend}) && [Extend, E_Base, E_Base_GAZ].index_of(start) == -1){ |
5840 | // return Break |
5841 | // } |
5842 | // |
5843 | @@ -244,9 +247,10 @@ pub fn word_break_string(s: &str, width: usize) -> Vec<&str> { |
5844 | // // GB13. [^RI] (RI RI)* RI ? RI |
5845 | // let mut r_iIndex = all.last_index_of(Regional_Indicator) |
5846 | // if(r_iIndex > 0 && |
5847 | - // all.slice(1, r_iIndex).every(function(c){return c == Regional_Indicator}) && |
5848 | - // [Prepend, Regional_Indicator].index_of(previous) == -1) { |
5849 | - // if(all.filter(function(c){return c == Regional_Indicator}).length % 2 == 1) { |
5850 | + // all.slice(1, r_iIndex).every(function(c){return c == |
5851 | + // Regional_Indicator}) && [Prepend, |
5852 | + // Regional_Indicator].index_of(previous) == -1) { |
5853 | + // if(all.filter(function(c){return c == Regional_Indicator}).length % 2 == 1) { |
5854 | // return BreakLastRegional |
5855 | // } |
5856 | // else { |
5857 | @@ -300,10 +304,11 @@ pub fn word_break_string(s: &str, width: usize) -> Vec<&str> { |
5858 | // } |
5859 | // |
5860 | // // GB10. (E_Base | EBG) Extend* ? E_Modifier |
5861 | - // let mut previous_non_extend_index = all.index_of(Extend) != -1 ? all.last_index_of(Extend) - 1 : all.length - 2; |
5862 | - // if([E_Base, E_Base_GAZ].index_of(all[previous_non_extend_index]) != -1 && |
5863 | - // all.slice(previous_non_extend_index + 1, -1).every(function(c){return c == Extend}) && |
5864 | - // next == E_Modifier){ |
5865 | + // let mut previous_non_extend_index = all.index_of(Extend) != -1 ? |
5866 | + // all.last_index_of(Extend) - 1 : all.length - 2; if([E_Base, |
5867 | + // E_Base_GAZ].index_of(all[previous_non_extend_index]) != -1 && |
5868 | + // all.slice(previous_non_extend_index + 1, -1).every(function(c){return c |
5869 | + // == Extend}) && next == E_Modifier){ |
5870 | // return NotBreak; |
5871 | // } |
5872 | // |
5873 | @@ -388,8 +393,8 @@ pub fn word_break_string(s: &str, width: usize) -> Vec<&str> { |
5874 | //// return { value: undefined, done: true }; |
5875 | //// }).bind(this) |
5876 | //// }; |
5877 | - //// // ES2015 @@iterator method (iterable) for spread syntax and for...of statement |
5878 | - //// if (typeof Symbol !== 'undefined' && Symbol.iterator) { |
5879 | + //// // ES2015 @@iterator method (iterable) for spread syntax and for...of |
5880 | + //// statement if (typeof Symbol !== 'undefined' && Symbol.iterator) { |
5881 | //// res[Symbol.iterator] = function() {return res}; |
5882 | //// } |
5883 | //// return res; |
5884 | @@ -419,17 +424,18 @@ pub fn word_break_string(s: &str, width: usize) -> Vec<&str> { |
5885 | // //and adapted to java_script rules |
5886 | // |
5887 | // if( |
5888 | - // (0x0600 <= code && code <= 0x0605) || // Cf [6] ARABIC NUMBER SIGN..ARABIC NUMBER MARK ABOVE |
5889 | - // 0x06DD == code || // Cf ARABIC END OF AYAH |
5890 | - // 0x070F == code || // Cf SYRIAC ABBREVIATION MARK |
5891 | + // (0x0600 <= code && code <= 0x0605) || // Cf [6] ARABIC NUMBER |
5892 | + // SIGN..ARABIC NUMBER MARK ABOVE 0x06DD == code || // Cf ARABIC |
5893 | + // END OF AYAH 0x070F == code || // Cf SYRIAC ABBREVIATION MARK |
5894 | // 0x08E2 == code || // Cf ARABIC DISPUTED END OF AYAH |
5895 | // 0x0D4E == code || // Lo MALAYALAM LETTER DOT REPH |
5896 | // 0x110BD == code || // Cf KAITHI NUMBER SIGN |
5897 | - // (0x111C2 <= code && code <= 0x111C3) || // Lo [2] SHARADA SIGN JIHVAMULIYA..SHARADA SIGN UPADHMANIYA |
5898 | - // 0x11A3A == code || // Lo ZANABAZAR SQUARE CLUSTER-INITIAL LETTER RA |
5899 | - // (0x11A86 <= code && code <= 0x11A89) || // Lo [4] SOYOMBO CLUSTER-INITIAL LETTER RA..SOYOMBO CLUSTER-INITIAL LETTER SA |
5900 | - // 0x11D46 == code // Lo MASARAM GONDI REPHA |
5901 | - // ){ |
5902 | + // (0x111C2 <= code && code <= 0x111C3) || // Lo [2] SHARADA SIGN |
5903 | + // JIHVAMULIYA..SHARADA SIGN UPADHMANIYA 0x11A3A == code || // Lo |
5904 | + // ZANABAZAR SQUARE CLUSTER-INITIAL LETTER RA (0x11A86 <= code && code <= |
5905 | + // 0x11A89) || // Lo [4] SOYOMBO CLUSTER-INITIAL LETTER RA..SOYOMBO |
5906 | + // CLUSTER-INITIAL LETTER SA 0x11D46 == code // Lo MASARAM GONDI |
5907 | + // REPHA ){ |
5908 | // return Prepend; |
5909 | // } |
5910 | // if( |
5911 | @@ -446,549 +452,679 @@ pub fn word_break_string(s: &str, width: usize) -> Vec<&str> { |
5912 | // |
5913 | // |
5914 | // if( |
5915 | - // (0x0000 <= code && code <= 0x0009) || // Cc [10] <control-0000>..<control-0009> |
5916 | - // (0x000B <= code && code <= 0x000C) || // Cc [2] <control-000B>..<control-000C> |
5917 | - // (0x000E <= code && code <= 0x001F) || // Cc [18] <control-000E>..<control-001F> |
5918 | - // (0x007F <= code && code <= 0x009F) || // Cc [33] <control-007F>..<control-009F> |
5919 | + // (0x0000 <= code && code <= 0x0009) || // Cc [10] |
5920 | + // <control-0000>..<control-0009> (0x000B <= code && code <= 0x000C) || |
5921 | + // // Cc [2] <control-000B>..<control-000C> (0x000E <= code && code <= |
5922 | + // 0x001F) || // Cc [18] <control-000E>..<control-001F> (0x007F <= code |
5923 | + // && code <= 0x009F) || // Cc [33] <control-007F>..<control-009F> |
5924 | // 0x00AD == code || // Cf SOFT HYPHEN |
5925 | // 0x061C == code || // Cf ARABIC LETTER MARK |
5926 | // |
5927 | // 0x180E == code || // Cf MONGOLIAN VOWEL SEPARATOR |
5928 | // 0x200B == code || // Cf ZERO WIDTH SPACE |
5929 | - // (0x200E <= code && code <= 0x200F) || // Cf [2] LEFT-TO-RIGHT MARK..RIGHT-TO-LEFT MARK |
5930 | - // 0x2028 == code || // Zl LINE SEPARATOR |
5931 | + // (0x200E <= code && code <= 0x200F) || // Cf [2] LEFT-TO-RIGHT |
5932 | + // MARK..RIGHT-TO-LEFT MARK 0x2028 == code || // Zl LINE SEPARATOR |
5933 | // 0x2029 == code || // Zp PARAGRAPH SEPARATOR |
5934 | - // (0x202A <= code && code <= 0x202E) || // Cf [5] LEFT-TO-RIGHT EMBEDDING..RIGHT-TO-LEFT OVERRIDE |
5935 | - // (0x2060 <= code && code <= 0x2064) || // Cf [5] WORD JOINER..INVISIBLE PLUS |
5936 | - // 0x2065 == code || // Cn <reserved-2065> |
5937 | - // (0x2066 <= code && code <= 0x206F) || // Cf [10] LEFT-TO-RIGHT ISOLATE..NOMINAL DIGIT SHAPES |
5938 | - // (0x_d800 <= code && code <= 0x_dFFF) || // Cs [2048] <surrogate-D800>..<surrogate-DFFF> |
5939 | - // 0x_fEFF == code || // Cf ZERO WIDTH NO-BREAK SPACE |
5940 | - // (0x_fFF0 <= code && code <= 0x_fFF8) || // Cn [9] <reserved-FFF0>..<reserved-FFF8> |
5941 | - // (0x_fFF9 <= code && code <= 0x_fFFB) || // Cf [3] INTERLINEAR ANNOTATION ANCHOR..INTERLINEAR ANNOTATION TERMINATOR |
5942 | - // (0x1BCA0 <= code && code <= 0x1BCA3) || // Cf [4] SHORTHAND FORMAT LETTER OVERLAP..SHORTHAND FORMAT UP STEP |
5943 | - // (0x1D173 <= code && code <= 0x1D17A) || // Cf [8] MUSICAL SYMBOL BEGIN BEAM..MUSICAL SYMBOL END PHRASE |
5944 | - // 0x_e0000 == code || // Cn <reserved-E0000> |
5945 | - // 0x_e0001 == code || // Cf LANGUAGE TAG |
5946 | - // (0x_e0002 <= code && code <= 0x_e001F) || // Cn [30] <reserved-E0002>..<reserved-E001F> |
5947 | - // (0x_e0080 <= code && code <= 0x_e00FF) || // Cn [128] <reserved-E0080>..<reserved-E00FF> |
5948 | - // (0x_e01F0 <= code && code <= 0x_e0FFF) // Cn [3600] <reserved-E01F0>..<reserved-E0FFF> |
5949 | + // (0x202A <= code && code <= 0x202E) || // Cf [5] LEFT-TO-RIGHT |
5950 | + // EMBEDDING..RIGHT-TO-LEFT OVERRIDE (0x2060 <= code && code <= 0x2064) |
5951 | + // || // Cf [5] WORD JOINER..INVISIBLE PLUS 0x2065 == code || // Cn |
5952 | + // <reserved-2065> (0x2066 <= code && code <= 0x206F) || // Cf [10] |
5953 | + // LEFT-TO-RIGHT ISOLATE..NOMINAL DIGIT SHAPES (0x_d800 <= code && code |
5954 | + // <= 0x_dFFF) || // Cs [2048] <surrogate-D800>..<surrogate-DFFF> 0x_fEFF |
5955 | + // == code || // Cf ZERO WIDTH NO-BREAK SPACE (0x_fFF0 <= code && |
5956 | + // code <= 0x_fFF8) || // Cn [9] <reserved-FFF0>..<reserved-FFF8> |
5957 | + // (0x_fFF9 <= code && code <= 0x_fFFB) || // Cf [3] INTERLINEAR |
5958 | + // ANNOTATION ANCHOR..INTERLINEAR ANNOTATION TERMINATOR (0x1BCA0 <= code |
5959 | + // && code <= 0x1BCA3) || // Cf [4] SHORTHAND FORMAT LETTER OVERLAP..SHORTHAND |
5960 | + // FORMAT UP STEP (0x1D173 <= code && code <= 0x1D17A) || // Cf [8] |
5961 | + // MUSICAL SYMBOL BEGIN BEAM..MUSICAL SYMBOL END PHRASE 0x_e0000 == code |
5962 | + // || // Cn <reserved-E0000> 0x_e0001 == code || // Cf |
5963 | + // LANGUAGE TAG (0x_e0002 <= code && code <= 0x_e001F) || // Cn [30] |
5964 | + // <reserved-E0002>..<reserved-E001F> (0x_e0080 <= code && code <= |
5965 | + // 0x_e00FF) || // Cn [128] <reserved-E0080>..<reserved-E00FF> (0x_e01F0 |
5966 | + // <= code && code <= 0x_e0FFF) // Cn [3600] <reserved-E01F0>..<reserved-E0FFF> |
5967 | // ){ |
5968 | // return Control; |
5969 | // } |
5970 | // |
5971 | // |
5972 | // if( |
5973 | - // (0x0300 <= code && code <= 0x036F) || // Mn [112] COMBINING GRAVE ACCENT..COMBINING LATIN SMALL LETTER X |
5974 | - // (0x0483 <= code && code <= 0x0487) || // Mn [5] COMBINING CYRILLIC TITLO..COMBINING CYRILLIC POKRYTIE |
5975 | - // (0x0488 <= code && code <= 0x0489) || // Me [2] COMBINING CYRILLIC HUNDRED THOUSANDS SIGN..COMBINING CYRILLIC MILLIONS SIGN |
5976 | - // (0x0591 <= code && code <= 0x05BD) || // Mn [45] HEBREW ACCENT ETNAHTA..HEBREW POINT METEG |
5977 | - // 0x05BF == code || // Mn HEBREW POINT RAFE |
5978 | - // (0x05C1 <= code && code <= 0x05C2) || // Mn [2] HEBREW POINT SHIN DOT..HEBREW POINT SIN DOT |
5979 | - // (0x05C4 <= code && code <= 0x05C5) || // Mn [2] HEBREW MARK UPPER DOT..HEBREW MARK LOWER DOT |
5980 | - // 0x05C7 == code || // Mn HEBREW POINT QAMATS QATAN |
5981 | - // (0x0610 <= code && code <= 0x061A) || // Mn [11] ARABIC SIGN SALLALLAHOU ALAYHE WASSALLAM..ARABIC SMALL KASRA |
5982 | - // (0x064B <= code && code <= 0x065F) || // Mn [21] ARABIC FATHATAN..ARABIC WAVY HAMZA BELOW |
5983 | - // 0x0670 == code || // Mn ARABIC LETTER SUPERSCRIPT ALEF |
5984 | - // (0x06D6 <= code && code <= 0x06DC) || // Mn [7] ARABIC SMALL HIGH LIGATURE SAD WITH LAM WITH ALEF MAKSURA..ARABIC SMALL HIGH SEEN |
5985 | - // (0x06DF <= code && code <= 0x06E4) || // Mn [6] ARABIC SMALL HIGH ROUNDED ZERO..ARABIC SMALL HIGH MADDA |
5986 | - // (0x06E7 <= code && code <= 0x06E8) || // Mn [2] ARABIC SMALL HIGH YEH..ARABIC SMALL HIGH NOON |
5987 | - // (0x06EA <= code && code <= 0x06ED) || // Mn [4] ARABIC EMPTY CENTRE LOW STOP..ARABIC SMALL LOW MEEM |
5988 | - // 0x0711 == code || // Mn SYRIAC LETTER SUPERSCRIPT ALAPH |
5989 | - // (0x0730 <= code && code <= 0x074A) || // Mn [27] SYRIAC PTHAHA ABOVE..SYRIAC BARREKH |
5990 | - // (0x07A6 <= code && code <= 0x07B0) || // Mn [11] THAANA ABAFILI..THAANA SUKUN |
5991 | - // (0x07EB <= code && code <= 0x07F3) || // Mn [9] NKO COMBINING SHORT HIGH TONE..NKO COMBINING DOUBLE DOT ABOVE |
5992 | - // (0x0816 <= code && code <= 0x0819) || // Mn [4] SAMARITAN MARK IN..SAMARITAN MARK DAGESH |
5993 | - // (0x081B <= code && code <= 0x0823) || // Mn [9] SAMARITAN MARK EPENTHETIC YUT..SAMARITAN VOWEL SIGN A |
5994 | - // (0x0825 <= code && code <= 0x0827) || // Mn [3] SAMARITAN VOWEL SIGN SHORT A..SAMARITAN VOWEL SIGN U |
5995 | - // (0x0829 <= code && code <= 0x082D) || // Mn [5] SAMARITAN VOWEL SIGN LONG I..SAMARITAN MARK NEQUDAA |
5996 | - // (0x0859 <= code && code <= 0x085B) || // Mn [3] MANDAIC AFFRICATION MARK..MANDAIC GEMINATION MARK |
5997 | - // (0x08D4 <= code && code <= 0x08E1) || // Mn [14] ARABIC SMALL HIGH WORD AR-RUB..ARABIC SMALL HIGH SIGN SAFHA |
5998 | - // (0x08E3 <= code && code <= 0x0902) || // Mn [32] ARABIC TURNED DAMMA BELOW..DEVANAGARI SIGN ANUSVARA |
5999 | - // 0x093A == code || // Mn DEVANAGARI VOWEL SIGN OE |
6000 | - // 0x093C == code || // Mn DEVANAGARI SIGN NUKTA |
6001 | - // (0x0941 <= code && code <= 0x0948) || // Mn [8] DEVANAGARI VOWEL SIGN U..DEVANAGARI VOWEL SIGN AI |
6002 | - // 0x094D == code || // Mn DEVANAGARI SIGN VIRAMA |
6003 | - // (0x0951 <= code && code <= 0x0957) || // Mn [7] DEVANAGARI STRESS SIGN UDATTA..DEVANAGARI VOWEL SIGN UUE |
6004 | - // (0x0962 <= code && code <= 0x0963) || // Mn [2] DEVANAGARI VOWEL SIGN VOCALIC L..DEVANAGARI VOWEL SIGN VOCALIC LL |
6005 | - // 0x0981 == code || // Mn BENGALI SIGN CANDRABINDU |
6006 | - // 0x09BC == code || // Mn BENGALI SIGN NUKTA |
6007 | - // 0x09BE == code || // Mc BENGALI VOWEL SIGN AA |
6008 | - // (0x09C1 <= code && code <= 0x09C4) || // Mn [4] BENGALI VOWEL SIGN U..BENGALI VOWEL SIGN VOCALIC RR |
6009 | - // 0x09CD == code || // Mn BENGALI SIGN VIRAMA |
6010 | - // 0x09D7 == code || // Mc BENGALI AU LENGTH MARK |
6011 | - // (0x09E2 <= code && code <= 0x09E3) || // Mn [2] BENGALI VOWEL SIGN VOCALIC L..BENGALI VOWEL SIGN VOCALIC LL |
6012 | - // (0x0A01 <= code && code <= 0x0A02) || // Mn [2] GURMUKHI SIGN ADAK BINDI..GURMUKHI SIGN BINDI |
6013 | + // (0x0300 <= code && code <= 0x036F) || // Mn [112] COMBINING GRAVE |
6014 | + // ACCENT..COMBINING LATIN SMALL LETTER X (0x0483 <= code && code <= |
6015 | + // 0x0487) || // Mn [5] COMBINING CYRILLIC TITLO..COMBINING CYRILLIC POKRYTIE |
6016 | + // (0x0488 <= code && code <= 0x0489) || // Me [2] COMBINING CYRILLIC |
6017 | + // HUNDRED THOUSANDS SIGN..COMBINING CYRILLIC MILLIONS SIGN (0x0591 <= |
6018 | + // code && code <= 0x05BD) || // Mn [45] HEBREW ACCENT ETNAHTA..HEBREW POINT |
6019 | + // METEG 0x05BF == code || // Mn HEBREW POINT RAFE |
6020 | + // (0x05C1 <= code && code <= 0x05C2) || // Mn [2] HEBREW POINT SHIN |
6021 | + // DOT..HEBREW POINT SIN DOT (0x05C4 <= code && code <= 0x05C5) || // Mn |
6022 | + // [2] HEBREW MARK UPPER DOT..HEBREW MARK LOWER DOT 0x05C7 == code || // |
6023 | + // Mn HEBREW POINT QAMATS QATAN (0x0610 <= code && code <= 0x061A) |
6024 | + // || // Mn [11] ARABIC SIGN SALLALLAHOU ALAYHE WASSALLAM..ARABIC SMALL KASRA |
6025 | + // (0x064B <= code && code <= 0x065F) || // Mn [21] ARABIC |
6026 | + // FATHATAN..ARABIC WAVY HAMZA BELOW 0x0670 == code || // Mn ARABIC |
6027 | + // LETTER SUPERSCRIPT ALEF (0x06D6 <= code && code <= 0x06DC) || // Mn |
6028 | + // [7] ARABIC SMALL HIGH LIGATURE SAD WITH LAM WITH ALEF MAKSURA..ARABIC SMALL |
6029 | + // HIGH SEEN (0x06DF <= code && code <= 0x06E4) || // Mn [6] ARABIC |
6030 | + // SMALL HIGH ROUNDED ZERO..ARABIC SMALL HIGH MADDA (0x06E7 <= code && |
6031 | + // code <= 0x06E8) || // Mn [2] ARABIC SMALL HIGH YEH..ARABIC SMALL HIGH NOON |
6032 | + // (0x06EA <= code && code <= 0x06ED) || // Mn [4] ARABIC EMPTY CENTRE |
6033 | + // LOW STOP..ARABIC SMALL LOW MEEM 0x0711 == code || // Mn SYRIAC |
6034 | + // LETTER SUPERSCRIPT ALAPH (0x0730 <= code && code <= 0x074A) || // Mn |
6035 | + // [27] SYRIAC PTHAHA ABOVE..SYRIAC BARREKH (0x07A6 <= code && code <= |
6036 | + // 0x07B0) || // Mn [11] THAANA ABAFILI..THAANA SUKUN (0x07EB <= code && |
6037 | + // code <= 0x07F3) || // Mn [9] NKO COMBINING SHORT HIGH TONE..NKO COMBINING |
6038 | + // DOUBLE DOT ABOVE (0x0816 <= code && code <= 0x0819) || // Mn [4] |
6039 | + // SAMARITAN MARK IN..SAMARITAN MARK DAGESH (0x081B <= code && code <= |
6040 | + // 0x0823) || // Mn [9] SAMARITAN MARK EPENTHETIC YUT..SAMARITAN VOWEL SIGN A |
6041 | + // (0x0825 <= code && code <= 0x0827) || // Mn [3] SAMARITAN VOWEL SIGN |
6042 | + // SHORT A..SAMARITAN VOWEL SIGN U (0x0829 <= code && code <= 0x082D) || |
6043 | + // // Mn [5] SAMARITAN VOWEL SIGN LONG I..SAMARITAN MARK NEQUDAA |
6044 | + // (0x0859 <= code && code <= 0x085B) || // Mn [3] MANDAIC AFFRICATION |
6045 | + // MARK..MANDAIC GEMINATION MARK (0x08D4 <= code && code <= 0x08E1) || // |
6046 | + // Mn [14] ARABIC SMALL HIGH WORD AR-RUB..ARABIC SMALL HIGH SIGN SAFHA |
6047 | + // (0x08E3 <= code && code <= 0x0902) || // Mn [32] ARABIC TURNED DAMMA |
6048 | + // BELOW..DEVANAGARI SIGN ANUSVARA 0x093A == code || // Mn |
6049 | + // DEVANAGARI VOWEL SIGN OE 0x093C == code || // Mn DEVANAGARI SIGN |
6050 | + // NUKTA (0x0941 <= code && code <= 0x0948) || // Mn [8] DEVANAGARI |
6051 | + // VOWEL SIGN U..DEVANAGARI VOWEL SIGN AI 0x094D == code || // Mn |
6052 | + // DEVANAGARI SIGN VIRAMA (0x0951 <= code && code <= 0x0957) || // Mn |
6053 | + // [7] DEVANAGARI STRESS SIGN UDATTA..DEVANAGARI VOWEL SIGN UUE (0x0962 |
6054 | + // <= code && code <= 0x0963) || // Mn [2] DEVANAGARI VOWEL SIGN VOCALIC |
6055 | + // L..DEVANAGARI VOWEL SIGN VOCALIC LL 0x0981 == code || // Mn |
6056 | + // BENGALI SIGN CANDRABINDU 0x09BC == code || // Mn BENGALI SIGN |
6057 | + // NUKTA 0x09BE == code || // Mc BENGALI VOWEL SIGN AA |
6058 | + // (0x09C1 <= code && code <= 0x09C4) || // Mn [4] BENGALI VOWEL SIGN |
6059 | + // U..BENGALI VOWEL SIGN VOCALIC RR 0x09CD == code || // Mn BENGALI |
6060 | + // SIGN VIRAMA 0x09D7 == code || // Mc BENGALI AU LENGTH MARK |
6061 | + // (0x09E2 <= code && code <= 0x09E3) || // Mn [2] BENGALI VOWEL SIGN |
6062 | + // VOCALIC L..BENGALI VOWEL SIGN VOCALIC LL (0x0A01 <= code && code <= |
6063 | + // 0x0A02) || // Mn [2] GURMUKHI SIGN ADAK BINDI..GURMUKHI SIGN BINDI |
6064 | // 0x0A3C == code || // Mn GURMUKHI SIGN NUKTA |
6065 | - // (0x0A41 <= code && code <= 0x0A42) || // Mn [2] GURMUKHI VOWEL SIGN U..GURMUKHI VOWEL SIGN UU |
6066 | - // (0x0A47 <= code && code <= 0x0A48) || // Mn [2] GURMUKHI VOWEL SIGN EE..GURMUKHI VOWEL SIGN AI |
6067 | - // (0x0A4B <= code && code <= 0x0A4D) || // Mn [3] GURMUKHI VOWEL SIGN OO..GURMUKHI SIGN VIRAMA |
6068 | + // (0x0A41 <= code && code <= 0x0A42) || // Mn [2] GURMUKHI VOWEL SIGN |
6069 | + // U..GURMUKHI VOWEL SIGN UU (0x0A47 <= code && code <= 0x0A48) || // Mn |
6070 | + // [2] GURMUKHI VOWEL SIGN EE..GURMUKHI VOWEL SIGN AI (0x0A4B <= code && |
6071 | + // code <= 0x0A4D) || // Mn [3] GURMUKHI VOWEL SIGN OO..GURMUKHI SIGN VIRAMA |
6072 | // 0x0A51 == code || // Mn GURMUKHI SIGN UDAAT |
6073 | - // (0x0A70 <= code && code <= 0x0A71) || // Mn [2] GURMUKHI TIPPI..GURMUKHI ADDAK |
6074 | - // 0x0A75 == code || // Mn GURMUKHI SIGN YAKASH |
6075 | - // (0x0A81 <= code && code <= 0x0A82) || // Mn [2] GUJARATI SIGN CANDRABINDU..GUJARATI SIGN ANUSVARA |
6076 | - // 0x0ABC == code || // Mn GUJARATI SIGN NUKTA |
6077 | - // (0x0AC1 <= code && code <= 0x0AC5) || // Mn [5] GUJARATI VOWEL SIGN U..GUJARATI VOWEL SIGN CANDRA E |
6078 | - // (0x0AC7 <= code && code <= 0x0AC8) || // Mn [2] GUJARATI VOWEL SIGN E..GUJARATI VOWEL SIGN AI |
6079 | + // (0x0A70 <= code && code <= 0x0A71) || // Mn [2] GURMUKHI |
6080 | + // TIPPI..GURMUKHI ADDAK 0x0A75 == code || // Mn GURMUKHI SIGN |
6081 | + // YAKASH (0x0A81 <= code && code <= 0x0A82) || // Mn [2] GUJARATI SIGN |
6082 | + // CANDRABINDU..GUJARATI SIGN ANUSVARA 0x0ABC == code || // Mn |
6083 | + // GUJARATI SIGN NUKTA (0x0AC1 <= code && code <= 0x0AC5) || // Mn [5] |
6084 | + // GUJARATI VOWEL SIGN U..GUJARATI VOWEL SIGN CANDRA E (0x0AC7 <= code && |
6085 | + // code <= 0x0AC8) || // Mn [2] GUJARATI VOWEL SIGN E..GUJARATI VOWEL SIGN AI |
6086 | // 0x0ACD == code || // Mn GUJARATI SIGN VIRAMA |
6087 | - // (0x0AE2 <= code && code <= 0x0AE3) || // Mn [2] GUJARATI VOWEL SIGN VOCALIC L..GUJARATI VOWEL SIGN VOCALIC LL |
6088 | - // (0x0AFA <= code && code <= 0x0AFF) || // Mn [6] GUJARATI SIGN SUKUN..GUJARATI SIGN TWO-CIRCLE NUKTA ABOVE |
6089 | - // 0x0B01 == code || // Mn ORIYA SIGN CANDRABINDU |
6090 | + // (0x0AE2 <= code && code <= 0x0AE3) || // Mn [2] GUJARATI VOWEL SIGN |
6091 | + // VOCALIC L..GUJARATI VOWEL SIGN VOCALIC LL (0x0AFA <= code && code <= |
6092 | + // 0x0AFF) || // Mn [6] GUJARATI SIGN SUKUN..GUJARATI SIGN TWO-CIRCLE NUKTA |
6093 | + // ABOVE 0x0B01 == code || // Mn ORIYA SIGN CANDRABINDU |
6094 | // 0x0B3C == code || // Mn ORIYA SIGN NUKTA |
6095 | // 0x0B3E == code || // Mc ORIYA VOWEL SIGN AA |
6096 | // 0x0B3F == code || // Mn ORIYA VOWEL SIGN I |
6097 | - // (0x0B41 <= code && code <= 0x0B44) || // Mn [4] ORIYA VOWEL SIGN U..ORIYA VOWEL SIGN VOCALIC RR |
6098 | - // 0x0B4D == code || // Mn ORIYA SIGN VIRAMA |
6099 | - // 0x0B56 == code || // Mn ORIYA AI LENGTH MARK |
6100 | + // (0x0B41 <= code && code <= 0x0B44) || // Mn [4] ORIYA VOWEL SIGN |
6101 | + // U..ORIYA VOWEL SIGN VOCALIC RR 0x0B4D == code || // Mn ORIYA |
6102 | + // SIGN VIRAMA 0x0B56 == code || // Mn ORIYA AI LENGTH MARK |
6103 | // 0x0B57 == code || // Mc ORIYA AU LENGTH MARK |
6104 | - // (0x0B62 <= code && code <= 0x0B63) || // Mn [2] ORIYA VOWEL SIGN VOCALIC L..ORIYA VOWEL SIGN VOCALIC LL |
6105 | - // 0x0B82 == code || // Mn TAMIL SIGN ANUSVARA |
6106 | - // 0x0BBE == code || // Mc TAMIL VOWEL SIGN AA |
6107 | + // (0x0B62 <= code && code <= 0x0B63) || // Mn [2] ORIYA VOWEL SIGN |
6108 | + // VOCALIC L..ORIYA VOWEL SIGN VOCALIC LL 0x0B82 == code || // Mn |
6109 | + // TAMIL SIGN ANUSVARA 0x0BBE == code || // Mc TAMIL VOWEL SIGN AA |
6110 | // 0x0BC0 == code || // Mn TAMIL VOWEL SIGN II |
6111 | // 0x0BCD == code || // Mn TAMIL SIGN VIRAMA |
6112 | // 0x0BD7 == code || // Mc TAMIL AU LENGTH MARK |
6113 | // 0x0C00 == code || // Mn TELUGU SIGN COMBINING CANDRABINDU ABOVE |
6114 | - // (0x0C3E <= code && code <= 0x0C40) || // Mn [3] TELUGU VOWEL SIGN AA..TELUGU VOWEL SIGN II |
6115 | - // (0x0C46 <= code && code <= 0x0C48) || // Mn [3] TELUGU VOWEL SIGN E..TELUGU VOWEL SIGN AI |
6116 | - // (0x0C4A <= code && code <= 0x0C4D) || // Mn [4] TELUGU VOWEL SIGN O..TELUGU SIGN VIRAMA |
6117 | - // (0x0C55 <= code && code <= 0x0C56) || // Mn [2] TELUGU LENGTH MARK..TELUGU AI LENGTH MARK |
6118 | - // (0x0C62 <= code && code <= 0x0C63) || // Mn [2] TELUGU VOWEL SIGN VOCALIC L..TELUGU VOWEL SIGN VOCALIC LL |
6119 | + // (0x0C3E <= code && code <= 0x0C40) || // Mn [3] TELUGU VOWEL SIGN |
6120 | + // AA..TELUGU VOWEL SIGN II (0x0C46 <= code && code <= 0x0C48) || // Mn |
6121 | + // [3] TELUGU VOWEL SIGN E..TELUGU VOWEL SIGN AI (0x0C4A <= code && code |
6122 | + // <= 0x0C4D) || // Mn [4] TELUGU VOWEL SIGN O..TELUGU SIGN VIRAMA |
6123 | + // (0x0C55 <= code && code <= 0x0C56) || // Mn [2] TELUGU LENGTH |
6124 | + // MARK..TELUGU AI LENGTH MARK (0x0C62 <= code && code <= 0x0C63) || // |
6125 | + // Mn [2] TELUGU VOWEL SIGN VOCALIC L..TELUGU VOWEL SIGN VOCALIC LL |
6126 | // 0x0C81 == code || // Mn KANNADA SIGN CANDRABINDU |
6127 | // 0x0CBC == code || // Mn KANNADA SIGN NUKTA |
6128 | // 0x0CBF == code || // Mn KANNADA VOWEL SIGN I |
6129 | // 0x0CC2 == code || // Mc KANNADA VOWEL SIGN UU |
6130 | // 0x0CC6 == code || // Mn KANNADA VOWEL SIGN E |
6131 | - // (0x0CCC <= code && code <= 0x0CCD) || // Mn [2] KANNADA VOWEL SIGN AU..KANNADA SIGN VIRAMA |
6132 | - // (0x0CD5 <= code && code <= 0x0CD6) || // Mc [2] KANNADA LENGTH MARK..KANNADA AI LENGTH MARK |
6133 | - // (0x0CE2 <= code && code <= 0x0CE3) || // Mn [2] KANNADA VOWEL SIGN VOCALIC L..KANNADA VOWEL SIGN VOCALIC LL |
6134 | - // (0x0D00 <= code && code <= 0x0D01) || // Mn [2] MALAYALAM SIGN COMBINING ANUSVARA ABOVE..MALAYALAM SIGN CANDRABINDU |
6135 | - // (0x0D3B <= code && code <= 0x0D3C) || // Mn [2] MALAYALAM SIGN VERTICAL BAR VIRAMA..MALAYALAM SIGN CIRCULAR VIRAMA |
6136 | - // 0x0D3E == code || // Mc MALAYALAM VOWEL SIGN AA |
6137 | - // (0x0D41 <= code && code <= 0x0D44) || // Mn [4] MALAYALAM VOWEL SIGN U..MALAYALAM VOWEL SIGN VOCALIC RR |
6138 | + // (0x0CCC <= code && code <= 0x0CCD) || // Mn [2] KANNADA VOWEL SIGN |
6139 | + // AU..KANNADA SIGN VIRAMA (0x0CD5 <= code && code <= 0x0CD6) || // Mc |
6140 | + // [2] KANNADA LENGTH MARK..KANNADA AI LENGTH MARK (0x0CE2 <= code && |
6141 | + // code <= 0x0CE3) || // Mn [2] KANNADA VOWEL SIGN VOCALIC L..KANNADA VOWEL |
6142 | + // SIGN VOCALIC LL (0x0D00 <= code && code <= 0x0D01) || // Mn [2] |
6143 | + // MALAYALAM SIGN COMBINING ANUSVARA ABOVE..MALAYALAM SIGN CANDRABINDU |
6144 | + // (0x0D3B <= code && code <= 0x0D3C) || // Mn [2] MALAYALAM SIGN |
6145 | + // VERTICAL BAR VIRAMA..MALAYALAM SIGN CIRCULAR VIRAMA 0x0D3E == code || |
6146 | + // // Mc MALAYALAM VOWEL SIGN AA (0x0D41 <= code && code <= 0x0D44) |
6147 | + // || // Mn [4] MALAYALAM VOWEL SIGN U..MALAYALAM VOWEL SIGN VOCALIC RR |
6148 | // 0x0D4D == code || // Mn MALAYALAM SIGN VIRAMA |
6149 | // 0x0D57 == code || // Mc MALAYALAM AU LENGTH MARK |
6150 | - // (0x0D62 <= code && code <= 0x0D63) || // Mn [2] MALAYALAM VOWEL SIGN VOCALIC L..MALAYALAM VOWEL SIGN VOCALIC LL |
6151 | - // 0x0DCA == code || // Mn SINHALA SIGN AL-LAKUNA |
6152 | - // 0x0DCF == code || // Mc SINHALA VOWEL SIGN AELA-PILLA |
6153 | - // (0x0DD2 <= code && code <= 0x0DD4) || // Mn [3] SINHALA VOWEL SIGN KETTI IS-PILLA..SINHALA VOWEL SIGN KETTI PAA-PILLA |
6154 | + // (0x0D62 <= code && code <= 0x0D63) || // Mn [2] MALAYALAM VOWEL SIGN |
6155 | + // VOCALIC L..MALAYALAM VOWEL SIGN VOCALIC LL 0x0DCA == code || // Mn |
6156 | + // SINHALA SIGN AL-LAKUNA 0x0DCF == code || // Mc SINHALA VOWEL |
6157 | + // SIGN AELA-PILLA (0x0DD2 <= code && code <= 0x0DD4) || // Mn [3] |
6158 | + // SINHALA VOWEL SIGN KETTI IS-PILLA..SINHALA VOWEL SIGN KETTI PAA-PILLA |
6159 | // 0x0DD6 == code || // Mn SINHALA VOWEL SIGN DIGA PAA-PILLA |
6160 | // 0x0DDF == code || // Mc SINHALA VOWEL SIGN GAYANUKITTA |
6161 | // 0x0E31 == code || // Mn THAI CHARACTER MAI HAN-AKAT |
6162 | - // (0x0E34 <= code && code <= 0x0E3A) || // Mn [7] THAI CHARACTER SARA I..THAI CHARACTER PHINTHU |
6163 | - // (0x0E47 <= code && code <= 0x0E4E) || // Mn [8] THAI CHARACTER MAITAIKHU..THAI CHARACTER YAMAKKAN |
6164 | - // 0x0EB1 == code || // Mn LAO VOWEL SIGN MAI KAN |
6165 | - // (0x0EB4 <= code && code <= 0x0EB9) || // Mn [6] LAO VOWEL SIGN I..LAO VOWEL SIGN UU |
6166 | - // (0x0EBB <= code && code <= 0x0EBC) || // Mn [2] LAO VOWEL SIGN MAI KON..LAO SEMIVOWEL SIGN LO |
6167 | - // (0x0EC8 <= code && code <= 0x0ECD) || // Mn [6] LAO TONE MAI EK..LAO NIGGAHITA |
6168 | - // (0x0F18 <= code && code <= 0x0F19) || // Mn [2] TIBETAN ASTROLOGICAL SIGN -KHYUD PA..TIBETAN ASTROLOGICAL SIGN SDONG TSHUGS |
6169 | + // (0x0E34 <= code && code <= 0x0E3A) || // Mn [7] THAI CHARACTER SARA |
6170 | + // I..THAI CHARACTER PHINTHU (0x0E47 <= code && code <= 0x0E4E) || // Mn |
6171 | + // [8] THAI CHARACTER MAITAIKHU..THAI CHARACTER YAMAKKAN 0x0EB1 == code |
6172 | + // || // Mn LAO VOWEL SIGN MAI KAN (0x0EB4 <= code && code <= |
6173 | + // 0x0EB9) || // Mn [6] LAO VOWEL SIGN I..LAO VOWEL SIGN UU (0x0EBB <= |
6174 | + // code && code <= 0x0EBC) || // Mn [2] LAO VOWEL SIGN MAI KON..LAO SEMIVOWEL |
6175 | + // SIGN LO (0x0EC8 <= code && code <= 0x0ECD) || // Mn [6] LAO TONE MAI |
6176 | + // EK..LAO NIGGAHITA (0x0F18 <= code && code <= 0x0F19) || // Mn [2] |
6177 | + // TIBETAN ASTROLOGICAL SIGN -KHYUD PA..TIBETAN ASTROLOGICAL SIGN SDONG TSHUGS |
6178 | // 0x0F35 == code || // Mn TIBETAN MARK NGAS BZUNG NYI ZLA |
6179 | // 0x0F37 == code || // Mn TIBETAN MARK NGAS BZUNG SGOR RTAGS |
6180 | // 0x0F39 == code || // Mn TIBETAN MARK TSA -PHRU |
6181 | - // (0x0F71 <= code && code <= 0x0F7E) || // Mn [14] TIBETAN VOWEL SIGN AA..TIBETAN SIGN RJES SU NGA RO |
6182 | - // (0x0F80 <= code && code <= 0x0F84) || // Mn [5] TIBETAN VOWEL SIGN REVERSED I..TIBETAN MARK HALANTA |
6183 | - // (0x0F86 <= code && code <= 0x0F87) || // Mn [2] TIBETAN SIGN LCI RTAGS..TIBETAN SIGN YANG RTAGS |
6184 | - // (0x0F8D <= code && code <= 0x0F97) || // Mn [11] TIBETAN SUBJOINED SIGN LCE TSA CAN..TIBETAN SUBJOINED LETTER JA |
6185 | - // (0x0F99 <= code && code <= 0x0FBC) || // Mn [36] TIBETAN SUBJOINED LETTER NYA..TIBETAN SUBJOINED LETTER FIXED-FORM RA |
6186 | - // 0x0FC6 == code || // Mn TIBETAN SYMBOL PADMA GDAN |
6187 | - // (0x102D <= code && code <= 0x1030) || // Mn [4] MYANMAR VOWEL SIGN I..MYANMAR VOWEL SIGN UU |
6188 | - // (0x1032 <= code && code <= 0x1037) || // Mn [6] MYANMAR VOWEL SIGN AI..MYANMAR SIGN DOT BELOW |
6189 | - // (0x1039 <= code && code <= 0x103A) || // Mn [2] MYANMAR SIGN VIRAMA..MYANMAR SIGN ASAT |
6190 | - // (0x103D <= code && code <= 0x103E) || // Mn [2] MYANMAR CONSONANT SIGN MEDIAL WA..MYANMAR CONSONANT SIGN MEDIAL HA |
6191 | - // (0x1058 <= code && code <= 0x1059) || // Mn [2] MYANMAR VOWEL SIGN VOCALIC L..MYANMAR VOWEL SIGN VOCALIC LL |
6192 | - // (0x105E <= code && code <= 0x1060) || // Mn [3] MYANMAR CONSONANT SIGN MON MEDIAL NA..MYANMAR CONSONANT SIGN MON MEDIAL LA |
6193 | - // (0x1071 <= code && code <= 0x1074) || // Mn [4] MYANMAR VOWEL SIGN GEBA KAREN I..MYANMAR VOWEL SIGN KAYAH EE |
6194 | - // 0x1082 == code || // Mn MYANMAR CONSONANT SIGN SHAN MEDIAL WA |
6195 | - // (0x1085 <= code && code <= 0x1086) || // Mn [2] MYANMAR VOWEL SIGN SHAN E ABOVE..MYANMAR VOWEL SIGN SHAN FINAL Y |
6196 | - // 0x108D == code || // Mn MYANMAR SIGN SHAN COUNCIL EMPHATIC TONE |
6197 | - // 0x109D == code || // Mn MYANMAR VOWEL SIGN AITON AI |
6198 | - // (0x135D <= code && code <= 0x135F) || // Mn [3] ETHIOPIC COMBINING GEMINATION AND VOWEL LENGTH MARK..ETHIOPIC COMBINING GEMINATION MARK |
6199 | - // (0x1712 <= code && code <= 0x1714) || // Mn [3] TAGALOG VOWEL SIGN I..TAGALOG SIGN VIRAMA |
6200 | - // (0x1732 <= code && code <= 0x1734) || // Mn [3] HANUNOO VOWEL SIGN I..HANUNOO SIGN PAMUDPOD |
6201 | - // (0x1752 <= code && code <= 0x1753) || // Mn [2] BUHID VOWEL SIGN I..BUHID VOWEL SIGN U |
6202 | - // (0x1772 <= code && code <= 0x1773) || // Mn [2] TAGBANWA VOWEL SIGN I..TAGBANWA VOWEL SIGN U |
6203 | - // (0x17B4 <= code && code <= 0x17B5) || // Mn [2] KHMER VOWEL INHERENT AQ..KHMER VOWEL INHERENT AA |
6204 | - // (0x17B7 <= code && code <= 0x17BD) || // Mn [7] KHMER VOWEL SIGN I..KHMER VOWEL SIGN UA |
6205 | - // 0x17C6 == code || // Mn KHMER SIGN NIKAHIT |
6206 | - // (0x17C9 <= code && code <= 0x17D3) || // Mn [11] KHMER SIGN MUUSIKATOAN..KHMER SIGN BATHAMASAT |
6207 | - // 0x17DD == code || // Mn KHMER SIGN ATTHACAN |
6208 | - // (0x180B <= code && code <= 0x180D) || // Mn [3] MONGOLIAN FREE VARIATION SELECTOR ONE..MONGOLIAN FREE VARIATION SELECTOR THREE |
6209 | - // (0x1885 <= code && code <= 0x1886) || // Mn [2] MONGOLIAN LETTER ALI GALI BALUDA..MONGOLIAN LETTER ALI GALI THREE BALUDA |
6210 | + // (0x0F71 <= code && code <= 0x0F7E) || // Mn [14] TIBETAN VOWEL SIGN |
6211 | + // AA..TIBETAN SIGN RJES SU NGA RO (0x0F80 <= code && code <= 0x0F84) || |
6212 | + // // Mn [5] TIBETAN VOWEL SIGN REVERSED I..TIBETAN MARK HALANTA |
6213 | + // (0x0F86 <= code && code <= 0x0F87) || // Mn [2] TIBETAN SIGN LCI |
6214 | + // RTAGS..TIBETAN SIGN YANG RTAGS (0x0F8D <= code && code <= 0x0F97) || |
6215 | + // // Mn [11] TIBETAN SUBJOINED SIGN LCE TSA CAN..TIBETAN SUBJOINED LETTER JA |
6216 | + // (0x0F99 <= code && code <= 0x0FBC) || // Mn [36] TIBETAN SUBJOINED |
6217 | + // LETTER NYA..TIBETAN SUBJOINED LETTER FIXED-FORM RA 0x0FC6 == code || |
6218 | + // // Mn TIBETAN SYMBOL PADMA GDAN (0x102D <= code && code <= |
6219 | + // 0x1030) || // Mn [4] MYANMAR VOWEL SIGN I..MYANMAR VOWEL SIGN UU |
6220 | + // (0x1032 <= code && code <= 0x1037) || // Mn [6] MYANMAR VOWEL SIGN |
6221 | + // AI..MYANMAR SIGN DOT BELOW (0x1039 <= code && code <= 0x103A) || // Mn |
6222 | + // [2] MYANMAR SIGN VIRAMA..MYANMAR SIGN ASAT (0x103D <= code && code <= |
6223 | + // 0x103E) || // Mn [2] MYANMAR CONSONANT SIGN MEDIAL WA..MYANMAR CONSONANT |
6224 | + // SIGN MEDIAL HA (0x1058 <= code && code <= 0x1059) || // Mn [2] |
6225 | + // MYANMAR VOWEL SIGN VOCALIC L..MYANMAR VOWEL SIGN VOCALIC LL (0x105E <= |
6226 | + // code && code <= 0x1060) || // Mn [3] MYANMAR CONSONANT SIGN MON MEDIAL |
6227 | + // NA..MYANMAR CONSONANT SIGN MON MEDIAL LA (0x1071 <= code && code <= |
6228 | + // 0x1074) || // Mn [4] MYANMAR VOWEL SIGN GEBA KAREN I..MYANMAR VOWEL SIGN |
6229 | + // KAYAH EE 0x1082 == code || // Mn MYANMAR CONSONANT SIGN SHAN |
6230 | + // MEDIAL WA (0x1085 <= code && code <= 0x1086) || // Mn [2] MYANMAR |
6231 | + // VOWEL SIGN SHAN E ABOVE..MYANMAR VOWEL SIGN SHAN FINAL Y 0x108D == |
6232 | + // code || // Mn MYANMAR SIGN SHAN COUNCIL EMPHATIC TONE 0x109D == |
6233 | + // code || // Mn MYANMAR VOWEL SIGN AITON AI (0x135D <= code && |
6234 | + // code <= 0x135F) || // Mn [3] ETHIOPIC COMBINING GEMINATION AND VOWEL LENGTH |
6235 | + // MARK..ETHIOPIC COMBINING GEMINATION MARK (0x1712 <= code && code <= |
6236 | + // 0x1714) || // Mn [3] TAGALOG VOWEL SIGN I..TAGALOG SIGN VIRAMA |
6237 | + // (0x1732 <= code && code <= 0x1734) || // Mn [3] HANUNOO VOWEL SIGN |
6238 | + // I..HANUNOO SIGN PAMUDPOD (0x1752 <= code && code <= 0x1753) || // Mn |
6239 | + // [2] BUHID VOWEL SIGN I..BUHID VOWEL SIGN U (0x1772 <= code && code <= |
6240 | + // 0x1773) || // Mn [2] TAGBANWA VOWEL SIGN I..TAGBANWA VOWEL SIGN U |
6241 | + // (0x17B4 <= code && code <= 0x17B5) || // Mn [2] KHMER VOWEL INHERENT |
6242 | + // AQ..KHMER VOWEL INHERENT AA (0x17B7 <= code && code <= 0x17BD) || // |
6243 | + // Mn [7] KHMER VOWEL SIGN I..KHMER VOWEL SIGN UA 0x17C6 == code || // |
6244 | + // Mn KHMER SIGN NIKAHIT (0x17C9 <= code && code <= 0x17D3) || // |
6245 | + // Mn [11] KHMER SIGN MUUSIKATOAN..KHMER SIGN BATHAMASAT 0x17DD == code |
6246 | + // || // Mn KHMER SIGN ATTHACAN (0x180B <= code && code <= 0x180D) |
6247 | + // || // Mn [3] MONGOLIAN FREE VARIATION SELECTOR ONE..MONGOLIAN FREE |
6248 | + // VARIATION SELECTOR THREE (0x1885 <= code && code <= 0x1886) || // Mn |
6249 | + // [2] MONGOLIAN LETTER ALI GALI BALUDA..MONGOLIAN LETTER ALI GALI THREE BALUDA |
6250 | // 0x18A9 == code || // Mn MONGOLIAN LETTER ALI GALI DAGALGA |
6251 | - // (0x1920 <= code && code <= 0x1922) || // Mn [3] LIMBU VOWEL SIGN A..LIMBU VOWEL SIGN U |
6252 | - // (0x1927 <= code && code <= 0x1928) || // Mn [2] LIMBU VOWEL SIGN E..LIMBU VOWEL SIGN O |
6253 | - // 0x1932 == code || // Mn LIMBU SMALL LETTER ANUSVARA |
6254 | - // (0x1939 <= code && code <= 0x193B) || // Mn [3] LIMBU SIGN MUKPHRENG..LIMBU SIGN SA-I |
6255 | - // (0x1A17 <= code && code <= 0x1A18) || // Mn [2] BUGINESE VOWEL SIGN I..BUGINESE VOWEL SIGN U |
6256 | + // (0x1920 <= code && code <= 0x1922) || // Mn [3] LIMBU VOWEL SIGN |
6257 | + // A..LIMBU VOWEL SIGN U (0x1927 <= code && code <= 0x1928) || // Mn |
6258 | + // [2] LIMBU VOWEL SIGN E..LIMBU VOWEL SIGN O 0x1932 == code || // Mn |
6259 | + // LIMBU SMALL LETTER ANUSVARA (0x1939 <= code && code <= 0x193B) || // |
6260 | + // Mn [3] LIMBU SIGN MUKPHRENG..LIMBU SIGN SA-I (0x1A17 <= code && code |
6261 | + // <= 0x1A18) || // Mn [2] BUGINESE VOWEL SIGN I..BUGINESE VOWEL SIGN U |
6262 | // 0x1A1B == code || // Mn BUGINESE VOWEL SIGN AE |
6263 | // 0x1A56 == code || // Mn TAI THAM CONSONANT SIGN MEDIAL LA |
6264 | - // (0x1A58 <= code && code <= 0x1A5E) || // Mn [7] TAI THAM SIGN MAI KANG LAI..TAI THAM CONSONANT SIGN SA |
6265 | - // 0x1A60 == code || // Mn TAI THAM SIGN SAKOT |
6266 | - // 0x1A62 == code || // Mn TAI THAM VOWEL SIGN MAI SAT |
6267 | - // (0x1A65 <= code && code <= 0x1A6C) || // Mn [8] TAI THAM VOWEL SIGN I..TAI THAM VOWEL SIGN OA BELOW |
6268 | - // (0x1A73 <= code && code <= 0x1A7C) || // Mn [10] TAI THAM VOWEL SIGN OA ABOVE..TAI THAM SIGN KHUEN-LUE KARAN |
6269 | - // 0x1A7F == code || // Mn TAI THAM COMBINING CRYPTOGRAMMIC DOT |
6270 | - // (0x1AB0 <= code && code <= 0x1ABD) || // Mn [14] COMBINING DOUBLED CIRCUMFLEX ACCENT..COMBINING PARENTHESES BELOW |
6271 | - // 0x1ABE == code || // Me COMBINING PARENTHESES OVERLAY |
6272 | - // (0x1B00 <= code && code <= 0x1B03) || // Mn [4] BALINESE SIGN ULU RICEM..BALINESE SIGN SURANG |
6273 | + // (0x1A58 <= code && code <= 0x1A5E) || // Mn [7] TAI THAM SIGN MAI |
6274 | + // KANG LAI..TAI THAM CONSONANT SIGN SA 0x1A60 == code || // Mn TAI |
6275 | + // THAM SIGN SAKOT 0x1A62 == code || // Mn TAI THAM VOWEL SIGN MAI |
6276 | + // SAT (0x1A65 <= code && code <= 0x1A6C) || // Mn [8] TAI THAM VOWEL |
6277 | + // SIGN I..TAI THAM VOWEL SIGN OA BELOW (0x1A73 <= code && code <= |
6278 | + // 0x1A7C) || // Mn [10] TAI THAM VOWEL SIGN OA ABOVE..TAI THAM SIGN KHUEN-LUE |
6279 | + // KARAN 0x1A7F == code || // Mn TAI THAM COMBINING CRYPTOGRAMMIC |
6280 | + // DOT (0x1AB0 <= code && code <= 0x1ABD) || // Mn [14] COMBINING |
6281 | + // DOUBLED CIRCUMFLEX ACCENT..COMBINING PARENTHESES BELOW 0x1ABE == code |
6282 | + // || // Me COMBINING PARENTHESES OVERLAY (0x1B00 <= code && code |
6283 | + // <= 0x1B03) || // Mn [4] BALINESE SIGN ULU RICEM..BALINESE SIGN SURANG |
6284 | // 0x1B34 == code || // Mn BALINESE SIGN REREKAN |
6285 | - // (0x1B36 <= code && code <= 0x1B3A) || // Mn [5] BALINESE VOWEL SIGN ULU..BALINESE VOWEL SIGN RA REPA |
6286 | - // 0x1B3C == code || // Mn BALINESE VOWEL SIGN LA LENGA |
6287 | - // 0x1B42 == code || // Mn BALINESE VOWEL SIGN PEPET |
6288 | - // (0x1B6B <= code && code <= 0x1B73) || // Mn [9] BALINESE MUSICAL SYMBOL COMBINING TEGEH..BALINESE MUSICAL SYMBOL COMBINING GONG |
6289 | - // (0x1B80 <= code && code <= 0x1B81) || // Mn [2] SUNDANESE SIGN PANYECEK..SUNDANESE SIGN PANGLAYAR |
6290 | - // (0x1BA2 <= code && code <= 0x1BA5) || // Mn [4] SUNDANESE CONSONANT SIGN PANYAKRA..SUNDANESE VOWEL SIGN PANYUKU |
6291 | - // (0x1BA8 <= code && code <= 0x1BA9) || // Mn [2] SUNDANESE VOWEL SIGN PAMEPET..SUNDANESE VOWEL SIGN PANEULEUNG |
6292 | - // (0x1BAB <= code && code <= 0x1BAD) || // Mn [3] SUNDANESE SIGN VIRAMA..SUNDANESE CONSONANT SIGN PASANGAN WA |
6293 | - // 0x1BE6 == code || // Mn BATAK SIGN TOMPI |
6294 | - // (0x1BE8 <= code && code <= 0x1BE9) || // Mn [2] BATAK VOWEL SIGN PAKPAK E..BATAK VOWEL SIGN EE |
6295 | - // 0x1BED == code || // Mn BATAK VOWEL SIGN KARO O |
6296 | - // (0x1BEF <= code && code <= 0x1BF1) || // Mn [3] BATAK VOWEL SIGN U FOR SIMALUNGUN SA..BATAK CONSONANT SIGN H |
6297 | - // (0x1C2C <= code && code <= 0x1C33) || // Mn [8] LEPCHA VOWEL SIGN E..LEPCHA CONSONANT SIGN T |
6298 | - // (0x1C36 <= code && code <= 0x1C37) || // Mn [2] LEPCHA SIGN RAN..LEPCHA SIGN NUKTA |
6299 | - // (0x1CD0 <= code && code <= 0x1CD2) || // Mn [3] VEDIC TONE KARSHANA..VEDIC TONE PRENKHA |
6300 | - // (0x1CD4 <= code && code <= 0x1CE0) || // Mn [13] VEDIC SIGN YAJURVEDIC MIDLINE SVARITA..VEDIC TONE RIGVEDIC KASHMIRI INDEPENDENT SVARITA |
6301 | - // (0x1CE2 <= code && code <= 0x1CE8) || // Mn [7] VEDIC SIGN VISARGA SVARITA..VEDIC SIGN VISARGA ANUDATTA WITH TAIL |
6302 | - // 0x1CED == code || // Mn VEDIC SIGN TIRYAK |
6303 | - // 0x1CF4 == code || // Mn VEDIC TONE CANDRA ABOVE |
6304 | - // (0x1CF8 <= code && code <= 0x1CF9) || // Mn [2] VEDIC TONE RING ABOVE..VEDIC TONE DOUBLE RING ABOVE |
6305 | - // (0x1DC0 <= code && code <= 0x1DF9) || // Mn [58] COMBINING DOTTED GRAVE ACCENT..COMBINING WIDE INVERTED BRIDGE BELOW |
6306 | - // (0x1DFB <= code && code <= 0x1DFF) || // Mn [5] COMBINING DELETION MARK..COMBINING RIGHT ARROWHEAD AND DOWN ARROWHEAD BELOW |
6307 | + // (0x1B36 <= code && code <= 0x1B3A) || // Mn [5] BALINESE VOWEL SIGN |
6308 | + // ULU..BALINESE VOWEL SIGN RA REPA 0x1B3C == code || // Mn |
6309 | + // BALINESE VOWEL SIGN LA LENGA 0x1B42 == code || // Mn BALINESE |
6310 | + // VOWEL SIGN PEPET (0x1B6B <= code && code <= 0x1B73) || // Mn [9] |
6311 | + // BALINESE MUSICAL SYMBOL COMBINING TEGEH..BALINESE MUSICAL SYMBOL COMBINING |
6312 | + // GONG (0x1B80 <= code && code <= 0x1B81) || // Mn [2] SUNDANESE SIGN |
6313 | + // PANYECEK..SUNDANESE SIGN PANGLAYAR (0x1BA2 <= code && code <= 0x1BA5) |
6314 | + // || // Mn [4] SUNDANESE CONSONANT SIGN PANYAKRA..SUNDANESE VOWEL SIGN |
6315 | + // PANYUKU (0x1BA8 <= code && code <= 0x1BA9) || // Mn [2] SUNDANESE |
6316 | + // VOWEL SIGN PAMEPET..SUNDANESE VOWEL SIGN PANEULEUNG (0x1BAB <= code && |
6317 | + // code <= 0x1BAD) || // Mn [3] SUNDANESE SIGN VIRAMA..SUNDANESE CONSONANT |
6318 | + // SIGN PASANGAN WA 0x1BE6 == code || // Mn BATAK SIGN TOMPI |
6319 | + // (0x1BE8 <= code && code <= 0x1BE9) || // Mn [2] BATAK VOWEL SIGN |
6320 | + // PAKPAK E..BATAK VOWEL SIGN EE 0x1BED == code || // Mn BATAK |
6321 | + // VOWEL SIGN KARO O (0x1BEF <= code && code <= 0x1BF1) || // Mn [3] |
6322 | + // BATAK VOWEL SIGN U FOR SIMALUNGUN SA..BATAK CONSONANT SIGN H (0x1C2C |
6323 | + // <= code && code <= 0x1C33) || // Mn [8] LEPCHA VOWEL SIGN E..LEPCHA |
6324 | + // CONSONANT SIGN T (0x1C36 <= code && code <= 0x1C37) || // Mn [2] |
6325 | + // LEPCHA SIGN RAN..LEPCHA SIGN NUKTA (0x1CD0 <= code && code <= 0x1CD2) |
6326 | + // || // Mn [3] VEDIC TONE KARSHANA..VEDIC TONE PRENKHA (0x1CD4 <= code |
6327 | + // && code <= 0x1CE0) || // Mn [13] VEDIC SIGN YAJURVEDIC MIDLINE |
6328 | + // SVARITA..VEDIC TONE RIGVEDIC KASHMIRI INDEPENDENT SVARITA (0x1CE2 <= |
6329 | + // code && code <= 0x1CE8) || // Mn [7] VEDIC SIGN VISARGA SVARITA..VEDIC SIGN |
6330 | + // VISARGA ANUDATTA WITH TAIL 0x1CED == code || // Mn VEDIC SIGN |
6331 | + // TIRYAK 0x1CF4 == code || // Mn VEDIC TONE CANDRA ABOVE |
6332 | + // (0x1CF8 <= code && code <= 0x1CF9) || // Mn [2] VEDIC TONE RING |
6333 | + // ABOVE..VEDIC TONE DOUBLE RING ABOVE (0x1DC0 <= code && code <= 0x1DF9) |
6334 | + // || // Mn [58] COMBINING DOTTED GRAVE ACCENT..COMBINING WIDE INVERTED BRIDGE |
6335 | + // BELOW (0x1DFB <= code && code <= 0x1DFF) || // Mn [5] COMBINING |
6336 | + // DELETION MARK..COMBINING RIGHT ARROWHEAD AND DOWN ARROWHEAD BELOW |
6337 | // 0x200C == code || // Cf ZERO WIDTH NON-JOINER |
6338 | - // (0x20D0 <= code && code <= 0x20DC) || // Mn [13] COMBINING LEFT HARPOON ABOVE..COMBINING FOUR DOTS ABOVE |
6339 | - // (0x20DD <= code && code <= 0x20E0) || // Me [4] COMBINING ENCLOSING CIRCLE..COMBINING ENCLOSING CIRCLE BACKSLASH |
6340 | - // 0x20E1 == code || // Mn COMBINING LEFT RIGHT ARROW ABOVE |
6341 | - // (0x20E2 <= code && code <= 0x20E4) || // Me [3] COMBINING ENCLOSING SCREEN..COMBINING ENCLOSING UPWARD POINTING TRIANGLE |
6342 | - // (0x20E5 <= code && code <= 0x20F0) || // Mn [12] COMBINING REVERSE SOLIDUS OVERLAY..COMBINING ASTERISK ABOVE |
6343 | - // (0x2CEF <= code && code <= 0x2CF1) || // Mn [3] COPTIC COMBINING NI ABOVE..COPTIC COMBINING SPIRITUS LENIS |
6344 | + // (0x20D0 <= code && code <= 0x20DC) || // Mn [13] COMBINING LEFT |
6345 | + // HARPOON ABOVE..COMBINING FOUR DOTS ABOVE (0x20DD <= code && code <= |
6346 | + // 0x20E0) || // Me [4] COMBINING ENCLOSING CIRCLE..COMBINING ENCLOSING CIRCLE |
6347 | + // BACKSLASH 0x20E1 == code || // Mn COMBINING LEFT RIGHT ARROW |
6348 | + // ABOVE (0x20E2 <= code && code <= 0x20E4) || // Me [3] COMBINING |
6349 | + // ENCLOSING SCREEN..COMBINING ENCLOSING UPWARD POINTING TRIANGLE (0x20E5 |
6350 | + // <= code && code <= 0x20F0) || // Mn [12] COMBINING REVERSE SOLIDUS |
6351 | + // OVERLAY..COMBINING ASTERISK ABOVE (0x2CEF <= code && code <= 0x2CF1) |
6352 | + // || // Mn [3] COPTIC COMBINING NI ABOVE..COPTIC COMBINING SPIRITUS LENIS |
6353 | // 0x2D7F == code || // Mn TIFINAGH CONSONANT JOINER |
6354 | - // (0x2DE0 <= code && code <= 0x2DFF) || // Mn [32] COMBINING CYRILLIC LETTER BE..COMBINING CYRILLIC LETTER IOTIFIED BIG YUS |
6355 | - // (0x302A <= code && code <= 0x302D) || // Mn [4] IDEOGRAPHIC LEVEL TONE MARK..IDEOGRAPHIC ENTERING TONE MARK |
6356 | - // (0x302E <= code && code <= 0x302F) || // Mc [2] HANGUL SINGLE DOT TONE MARK..HANGUL DOUBLE DOT TONE MARK |
6357 | - // (0x3099 <= code && code <= 0x309A) || // Mn [2] COMBINING KATAKANA-HIRAGANA VOICED SOUND MARK..COMBINING KATAKANA-HIRAGANA SEMI-VOICED SOUND MARK |
6358 | - // 0x_a66F == code || // Mn COMBINING CYRILLIC VZMET |
6359 | - // (0x_a670 <= code && code <= 0x_a672) || // Me [3] COMBINING CYRILLIC TEN MILLIONS SIGN..COMBINING CYRILLIC THOUSAND MILLIONS SIGN |
6360 | - // (0x_a674 <= code && code <= 0x_a67D) || // Mn [10] COMBINING CYRILLIC LETTER UKRAINIAN IE..COMBINING CYRILLIC PAYEROK |
6361 | - // (0x_a69E <= code && code <= 0x_a69F) || // Mn [2] COMBINING CYRILLIC LETTER EF..COMBINING CYRILLIC LETTER IOTIFIED E |
6362 | - // (0x_a6F0 <= code && code <= 0x_a6F1) || // Mn [2] BAMUM COMBINING MARK KOQNDON..BAMUM COMBINING MARK TUKWENTIS |
6363 | - // 0x_a802 == code || // Mn SYLOTI NAGRI SIGN DVISVARA |
6364 | - // 0x_a806 == code || // Mn SYLOTI NAGRI SIGN HASANTA |
6365 | - // 0x_a80B == code || // Mn SYLOTI NAGRI SIGN ANUSVARA |
6366 | - // (0x_a825 <= code && code <= 0x_a826) || // Mn [2] SYLOTI NAGRI VOWEL SIGN U..SYLOTI NAGRI VOWEL SIGN E |
6367 | - // (0x_a8C4 <= code && code <= 0x_a8C5) || // Mn [2] SAURASHTRA SIGN VIRAMA..SAURASHTRA SIGN CANDRABINDU |
6368 | - // (0x_a8E0 <= code && code <= 0x_a8F1) || // Mn [18] COMBINING DEVANAGARI DIGIT ZERO..COMBINING DEVANAGARI SIGN AVAGRAHA |
6369 | - // (0x_a926 <= code && code <= 0x_a92D) || // Mn [8] KAYAH LI VOWEL UE..KAYAH LI TONE CALYA PLOPHU |
6370 | - // (0x_a947 <= code && code <= 0x_a951) || // Mn [11] REJANG VOWEL SIGN I..REJANG CONSONANT SIGN R |
6371 | - // (0x_a980 <= code && code <= 0x_a982) || // Mn [3] JAVANESE SIGN PANYANGGA..JAVANESE SIGN LAYAR |
6372 | + // (0x2DE0 <= code && code <= 0x2DFF) || // Mn [32] COMBINING CYRILLIC |
6373 | + // LETTER BE..COMBINING CYRILLIC LETTER IOTIFIED BIG YUS (0x302A <= code |
6374 | + // && code <= 0x302D) || // Mn [4] IDEOGRAPHIC LEVEL TONE MARK..IDEOGRAPHIC |
6375 | + // ENTERING TONE MARK (0x302E <= code && code <= 0x302F) || // Mc [2] |
6376 | + // HANGUL SINGLE DOT TONE MARK..HANGUL DOUBLE DOT TONE MARK (0x3099 <= |
6377 | + // code && code <= 0x309A) || // Mn [2] COMBINING KATAKANA-HIRAGANA VOICED |
6378 | + // SOUND MARK..COMBINING KATAKANA-HIRAGANA SEMI-VOICED SOUND MARK 0x_a66F |
6379 | + // == code || // Mn COMBINING CYRILLIC VZMET (0x_a670 <= code && |
6380 | + // code <= 0x_a672) || // Me [3] COMBINING CYRILLIC TEN MILLIONS |
6381 | + // SIGN..COMBINING CYRILLIC THOUSAND MILLIONS SIGN (0x_a674 <= code && |
6382 | + // code <= 0x_a67D) || // Mn [10] COMBINING CYRILLIC LETTER UKRAINIAN |
6383 | + // IE..COMBINING CYRILLIC PAYEROK (0x_a69E <= code && code <= 0x_a69F) || |
6384 | + // // Mn [2] COMBINING CYRILLIC LETTER EF..COMBINING CYRILLIC LETTER IOTIFIED |
6385 | + // E (0x_a6F0 <= code && code <= 0x_a6F1) || // Mn [2] BAMUM COMBINING |
6386 | + // MARK KOQNDON..BAMUM COMBINING MARK TUKWENTIS 0x_a802 == code || // Mn |
6387 | + // SYLOTI NAGRI SIGN DVISVARA 0x_a806 == code || // Mn SYLOTI NAGRI |
6388 | + // SIGN HASANTA 0x_a80B == code || // Mn SYLOTI NAGRI SIGN ANUSVARA |
6389 | + // (0x_a825 <= code && code <= 0x_a826) || // Mn [2] SYLOTI NAGRI VOWEL |
6390 | + // SIGN U..SYLOTI NAGRI VOWEL SIGN E (0x_a8C4 <= code && code <= 0x_a8C5) |
6391 | + // || // Mn [2] SAURASHTRA SIGN VIRAMA..SAURASHTRA SIGN CANDRABINDU |
6392 | + // (0x_a8E0 <= code && code <= 0x_a8F1) || // Mn [18] COMBINING |
6393 | + // DEVANAGARI DIGIT ZERO..COMBINING DEVANAGARI SIGN AVAGRAHA (0x_a926 <= |
6394 | + // code && code <= 0x_a92D) || // Mn [8] KAYAH LI VOWEL UE..KAYAH LI TONE |
6395 | + // CALYA PLOPHU (0x_a947 <= code && code <= 0x_a951) || // Mn [11] |
6396 | + // REJANG VOWEL SIGN I..REJANG CONSONANT SIGN R (0x_a980 <= code && code |
6397 | + // <= 0x_a982) || // Mn [3] JAVANESE SIGN PANYANGGA..JAVANESE SIGN LAYAR |
6398 | // 0x_a9B3 == code || // Mn JAVANESE SIGN CECAK TELU |
6399 | - // (0x_a9B6 <= code && code <= 0x_a9B9) || // Mn [4] JAVANESE VOWEL SIGN WULU..JAVANESE VOWEL SIGN SUKU MENDUT |
6400 | - // 0x_a9BC == code || // Mn JAVANESE VOWEL SIGN PEPET |
6401 | - // 0x_a9E5 == code || // Mn MYANMAR SIGN SHAN SAW |
6402 | - // (0x_aA29 <= code && code <= 0x_aA2E) || // Mn [6] CHAM VOWEL SIGN AA..CHAM VOWEL SIGN OE |
6403 | - // (0x_aA31 <= code && code <= 0x_aA32) || // Mn [2] CHAM VOWEL SIGN AU..CHAM VOWEL SIGN UE |
6404 | - // (0x_aA35 <= code && code <= 0x_aA36) || // Mn [2] CHAM CONSONANT SIGN LA..CHAM CONSONANT SIGN WA |
6405 | - // 0x_aA43 == code || // Mn CHAM CONSONANT SIGN FINAL NG |
6406 | + // (0x_a9B6 <= code && code <= 0x_a9B9) || // Mn [4] JAVANESE VOWEL |
6407 | + // SIGN WULU..JAVANESE VOWEL SIGN SUKU MENDUT 0x_a9BC == code || // Mn |
6408 | + // JAVANESE VOWEL SIGN PEPET 0x_a9E5 == code || // Mn MYANMAR SIGN |
6409 | + // SHAN SAW (0x_aA29 <= code && code <= 0x_aA2E) || // Mn [6] CHAM |
6410 | + // VOWEL SIGN AA..CHAM VOWEL SIGN OE (0x_aA31 <= code && code <= 0x_aA32) |
6411 | + // || // Mn [2] CHAM VOWEL SIGN AU..CHAM VOWEL SIGN UE (0x_aA35 <= code |
6412 | + // && code <= 0x_aA36) || // Mn [2] CHAM CONSONANT SIGN LA..CHAM CONSONANT |
6413 | + // SIGN WA 0x_aA43 == code || // Mn CHAM CONSONANT SIGN FINAL NG |
6414 | // 0x_aA4C == code || // Mn CHAM CONSONANT SIGN FINAL M |
6415 | // 0x_aA7C == code || // Mn MYANMAR SIGN TAI LAING TONE-2 |
6416 | // 0x_aAB0 == code || // Mn TAI VIET MAI KANG |
6417 | - // (0x_aAB2 <= code && code <= 0x_aAB4) || // Mn [3] TAI VIET VOWEL I..TAI VIET VOWEL U |
6418 | - // (0x_aAB7 <= code && code <= 0x_aAB8) || // Mn [2] TAI VIET MAI KHIT..TAI VIET VOWEL IA |
6419 | - // (0x_aABE <= code && code <= 0x_aABF) || // Mn [2] TAI VIET VOWEL AM..TAI VIET TONE MAI EK |
6420 | + // (0x_aAB2 <= code && code <= 0x_aAB4) || // Mn [3] TAI VIET VOWEL |
6421 | + // I..TAI VIET VOWEL U (0x_aAB7 <= code && code <= 0x_aAB8) || // Mn |
6422 | + // [2] TAI VIET MAI KHIT..TAI VIET VOWEL IA (0x_aABE <= code && code <= |
6423 | + // 0x_aABF) || // Mn [2] TAI VIET VOWEL AM..TAI VIET TONE MAI EK |
6424 | // 0x_aAC1 == code || // Mn TAI VIET TONE MAI THO |
6425 | - // (0x_aAEC <= code && code <= 0x_aAED) || // Mn [2] MEETEI MAYEK VOWEL SIGN UU..MEETEI MAYEK VOWEL SIGN AAI |
6426 | - // 0x_aAF6 == code || // Mn MEETEI MAYEK VIRAMA |
6427 | - // 0x_aBE5 == code || // Mn MEETEI MAYEK VOWEL SIGN ANAP |
6428 | - // 0x_aBE8 == code || // Mn MEETEI MAYEK VOWEL SIGN UNAP |
6429 | + // (0x_aAEC <= code && code <= 0x_aAED) || // Mn [2] MEETEI MAYEK VOWEL |
6430 | + // SIGN UU..MEETEI MAYEK VOWEL SIGN AAI 0x_aAF6 == code || // Mn |
6431 | + // MEETEI MAYEK VIRAMA 0x_aBE5 == code || // Mn MEETEI MAYEK VOWEL |
6432 | + // SIGN ANAP 0x_aBE8 == code || // Mn MEETEI MAYEK VOWEL SIGN UNAP |
6433 | // 0x_aBED == code || // Mn MEETEI MAYEK APUN IYEK |
6434 | // 0x_fB1E == code || // Mn HEBREW POINT JUDEO-SPANISH VARIKA |
6435 | - // (0x_fE00 <= code && code <= 0x_fE0F) || // Mn [16] VARIATION SELECTOR-1..VARIATION SELECTOR-16 |
6436 | - // (0x_fE20 <= code && code <= 0x_fE2F) || // Mn [16] COMBINING LIGATURE LEFT HALF..COMBINING CYRILLIC TITLO RIGHT HALF |
6437 | - // (0x_fF9E <= code && code <= 0x_fF9F) || // Lm [2] HALFWIDTH KATAKANA VOICED SOUND MARK..HALFWIDTH KATAKANA SEMI-VOICED SOUND MARK |
6438 | - // 0x101FD == code || // Mn PHAISTOS DISC SIGN COMBINING OBLIQUE STROKE |
6439 | - // 0x102E0 == code || // Mn COPTIC EPACT THOUSANDS MARK |
6440 | - // (0x10376 <= code && code <= 0x1037A) || // Mn [5] COMBINING OLD PERMIC LETTER AN..COMBINING OLD PERMIC LETTER SII |
6441 | - // (0x10A01 <= code && code <= 0x10A03) || // Mn [3] KHAROSHTHI VOWEL SIGN I..KHAROSHTHI VOWEL SIGN VOCALIC R |
6442 | - // (0x10A05 <= code && code <= 0x10A06) || // Mn [2] KHAROSHTHI VOWEL SIGN E..KHAROSHTHI VOWEL SIGN O |
6443 | - // (0x10A0C <= code && code <= 0x10A0F) || // Mn [4] KHAROSHTHI VOWEL LENGTH MARK..KHAROSHTHI SIGN VISARGA |
6444 | - // (0x10A38 <= code && code <= 0x10A3A) || // Mn [3] KHAROSHTHI SIGN BAR ABOVE..KHAROSHTHI SIGN DOT BELOW |
6445 | - // 0x10A3F == code || // Mn KHAROSHTHI VIRAMA |
6446 | - // (0x10AE5 <= code && code <= 0x10AE6) || // Mn [2] MANICHAEAN ABBREVIATION MARK ABOVE..MANICHAEAN ABBREVIATION MARK BELOW |
6447 | + // (0x_fE00 <= code && code <= 0x_fE0F) || // Mn [16] VARIATION |
6448 | + // SELECTOR-1..VARIATION SELECTOR-16 (0x_fE20 <= code && code <= 0x_fE2F) |
6449 | + // || // Mn [16] COMBINING LIGATURE LEFT HALF..COMBINING CYRILLIC TITLO RIGHT |
6450 | + // HALF (0x_fF9E <= code && code <= 0x_fF9F) || // Lm [2] HALFWIDTH |
6451 | + // KATAKANA VOICED SOUND MARK..HALFWIDTH KATAKANA SEMI-VOICED SOUND MARK |
6452 | + // 0x101FD == code || // Mn PHAISTOS DISC SIGN COMBINING OBLIQUE |
6453 | + // STROKE 0x102E0 == code || // Mn COPTIC EPACT THOUSANDS MARK |
6454 | + // (0x10376 <= code && code <= 0x1037A) || // Mn [5] COMBINING OLD |
6455 | + // PERMIC LETTER AN..COMBINING OLD PERMIC LETTER SII (0x10A01 <= code && |
6456 | + // code <= 0x10A03) || // Mn [3] KHAROSHTHI VOWEL SIGN I..KHAROSHTHI VOWEL |
6457 | + // SIGN VOCALIC R (0x10A05 <= code && code <= 0x10A06) || // Mn [2] |
6458 | + // KHAROSHTHI VOWEL SIGN E..KHAROSHTHI VOWEL SIGN O (0x10A0C <= code && |
6459 | + // code <= 0x10A0F) || // Mn [4] KHAROSHTHI VOWEL LENGTH MARK..KHAROSHTHI SIGN |
6460 | + // VISARGA (0x10A38 <= code && code <= 0x10A3A) || // Mn [3] KHAROSHTHI |
6461 | + // SIGN BAR ABOVE..KHAROSHTHI SIGN DOT BELOW 0x10A3F == code || // Mn |
6462 | + // KHAROSHTHI VIRAMA (0x10AE5 <= code && code <= 0x10AE6) || // Mn [2] |
6463 | + // MANICHAEAN ABBREVIATION MARK ABOVE..MANICHAEAN ABBREVIATION MARK BELOW |
6464 | // 0x11001 == code || // Mn BRAHMI SIGN ANUSVARA |
6465 | - // (0x11038 <= code && code <= 0x11046) || // Mn [15] BRAHMI VOWEL SIGN AA..BRAHMI VIRAMA |
6466 | - // (0x1107F <= code && code <= 0x11081) || // Mn [3] BRAHMI NUMBER JOINER..KAITHI SIGN ANUSVARA |
6467 | - // (0x110B3 <= code && code <= 0x110B6) || // Mn [4] KAITHI VOWEL SIGN U..KAITHI VOWEL SIGN AI |
6468 | - // (0x110B9 <= code && code <= 0x110BA) || // Mn [2] KAITHI SIGN VIRAMA..KAITHI SIGN NUKTA |
6469 | - // (0x11100 <= code && code <= 0x11102) || // Mn [3] CHAKMA SIGN CANDRABINDU..CHAKMA SIGN VISARGA |
6470 | - // (0x11127 <= code && code <= 0x1112B) || // Mn [5] CHAKMA VOWEL SIGN A..CHAKMA VOWEL SIGN UU |
6471 | - // (0x1112D <= code && code <= 0x11134) || // Mn [8] CHAKMA VOWEL SIGN AI..CHAKMA MAAYYAA |
6472 | - // 0x11173 == code || // Mn MAHAJANI SIGN NUKTA |
6473 | - // (0x11180 <= code && code <= 0x11181) || // Mn [2] SHARADA SIGN CANDRABINDU..SHARADA SIGN ANUSVARA |
6474 | - // (0x111B6 <= code && code <= 0x111BE) || // Mn [9] SHARADA VOWEL SIGN U..SHARADA VOWEL SIGN O |
6475 | - // (0x111CA <= code && code <= 0x111CC) || // Mn [3] SHARADA SIGN NUKTA..SHARADA EXTRA SHORT VOWEL MARK |
6476 | - // (0x1122F <= code && code <= 0x11231) || // Mn [3] KHOJKI VOWEL SIGN U..KHOJKI VOWEL SIGN AI |
6477 | + // (0x11038 <= code && code <= 0x11046) || // Mn [15] BRAHMI VOWEL SIGN |
6478 | + // AA..BRAHMI VIRAMA (0x1107F <= code && code <= 0x11081) || // Mn [3] |
6479 | + // BRAHMI NUMBER JOINER..KAITHI SIGN ANUSVARA (0x110B3 <= code && code <= |
6480 | + // 0x110B6) || // Mn [4] KAITHI VOWEL SIGN U..KAITHI VOWEL SIGN AI |
6481 | + // (0x110B9 <= code && code <= 0x110BA) || // Mn [2] KAITHI SIGN |
6482 | + // VIRAMA..KAITHI SIGN NUKTA (0x11100 <= code && code <= 0x11102) || // |
6483 | + // Mn [3] CHAKMA SIGN CANDRABINDU..CHAKMA SIGN VISARGA (0x11127 <= code |
6484 | + // && code <= 0x1112B) || // Mn [5] CHAKMA VOWEL SIGN A..CHAKMA VOWEL SIGN UU |
6485 | + // (0x1112D <= code && code <= 0x11134) || // Mn [8] CHAKMA VOWEL SIGN |
6486 | + // AI..CHAKMA MAAYYAA 0x11173 == code || // Mn MAHAJANI SIGN NUKTA |
6487 | + // (0x11180 <= code && code <= 0x11181) || // Mn [2] SHARADA SIGN |
6488 | + // CANDRABINDU..SHARADA SIGN ANUSVARA (0x111B6 <= code && code <= |
6489 | + // 0x111BE) || // Mn [9] SHARADA VOWEL SIGN U..SHARADA VOWEL SIGN O |
6490 | + // (0x111CA <= code && code <= 0x111CC) || // Mn [3] SHARADA SIGN |
6491 | + // NUKTA..SHARADA EXTRA SHORT VOWEL MARK (0x1122F <= code && code <= |
6492 | + // 0x11231) || // Mn [3] KHOJKI VOWEL SIGN U..KHOJKI VOWEL SIGN AI |
6493 | // 0x11234 == code || // Mn KHOJKI SIGN ANUSVARA |
6494 | - // (0x11236 <= code && code <= 0x11237) || // Mn [2] KHOJKI SIGN NUKTA..KHOJKI SIGN SHADDA |
6495 | - // 0x1123E == code || // Mn KHOJKI SIGN SUKUN |
6496 | - // 0x112DF == code || // Mn KHUDAWADI SIGN ANUSVARA |
6497 | - // (0x112E3 <= code && code <= 0x112EA) || // Mn [8] KHUDAWADI VOWEL SIGN U..KHUDAWADI SIGN VIRAMA |
6498 | - // (0x11300 <= code && code <= 0x11301) || // Mn [2] GRANTHA SIGN COMBINING ANUSVARA ABOVE..GRANTHA SIGN CANDRABINDU |
6499 | + // (0x11236 <= code && code <= 0x11237) || // Mn [2] KHOJKI SIGN |
6500 | + // NUKTA..KHOJKI SIGN SHADDA 0x1123E == code || // Mn KHOJKI SIGN |
6501 | + // SUKUN 0x112DF == code || // Mn KHUDAWADI SIGN ANUSVARA |
6502 | + // (0x112E3 <= code && code <= 0x112EA) || // Mn [8] KHUDAWADI VOWEL |
6503 | + // SIGN U..KHUDAWADI SIGN VIRAMA (0x11300 <= code && code <= 0x11301) || |
6504 | + // // Mn [2] GRANTHA SIGN COMBINING ANUSVARA ABOVE..GRANTHA SIGN CANDRABINDU |
6505 | // 0x1133C == code || // Mn GRANTHA SIGN NUKTA |
6506 | // 0x1133E == code || // Mc GRANTHA VOWEL SIGN AA |
6507 | // 0x11340 == code || // Mn GRANTHA VOWEL SIGN II |
6508 | // 0x11357 == code || // Mc GRANTHA AU LENGTH MARK |
6509 | - // (0x11366 <= code && code <= 0x1136C) || // Mn [7] COMBINING GRANTHA DIGIT ZERO..COMBINING GRANTHA DIGIT SIX |
6510 | - // (0x11370 <= code && code <= 0x11374) || // Mn [5] COMBINING GRANTHA LETTER A..COMBINING GRANTHA LETTER PA |
6511 | - // (0x11438 <= code && code <= 0x1143F) || // Mn [8] NEWA VOWEL SIGN U..NEWA VOWEL SIGN AI |
6512 | - // (0x11442 <= code && code <= 0x11444) || // Mn [3] NEWA SIGN VIRAMA..NEWA SIGN ANUSVARA |
6513 | - // 0x11446 == code || // Mn NEWA SIGN NUKTA |
6514 | - // 0x114B0 == code || // Mc TIRHUTA VOWEL SIGN AA |
6515 | - // (0x114B3 <= code && code <= 0x114B8) || // Mn [6] TIRHUTA VOWEL SIGN U..TIRHUTA VOWEL SIGN VOCALIC LL |
6516 | - // 0x114BA == code || // Mn TIRHUTA VOWEL SIGN SHORT E |
6517 | - // 0x114BD == code || // Mc TIRHUTA VOWEL SIGN SHORT O |
6518 | - // (0x114BF <= code && code <= 0x114C0) || // Mn [2] TIRHUTA SIGN CANDRABINDU..TIRHUTA SIGN ANUSVARA |
6519 | - // (0x114C2 <= code && code <= 0x114C3) || // Mn [2] TIRHUTA SIGN VIRAMA..TIRHUTA SIGN NUKTA |
6520 | + // (0x11366 <= code && code <= 0x1136C) || // Mn [7] COMBINING GRANTHA |
6521 | + // DIGIT ZERO..COMBINING GRANTHA DIGIT SIX (0x11370 <= code && code <= |
6522 | + // 0x11374) || // Mn [5] COMBINING GRANTHA LETTER A..COMBINING GRANTHA LETTER |
6523 | + // PA (0x11438 <= code && code <= 0x1143F) || // Mn [8] NEWA VOWEL SIGN |
6524 | + // U..NEWA VOWEL SIGN AI (0x11442 <= code && code <= 0x11444) || // Mn |
6525 | + // [3] NEWA SIGN VIRAMA..NEWA SIGN ANUSVARA 0x11446 == code || // Mn |
6526 | + // NEWA SIGN NUKTA 0x114B0 == code || // Mc TIRHUTA VOWEL SIGN AA |
6527 | + // (0x114B3 <= code && code <= 0x114B8) || // Mn [6] TIRHUTA VOWEL SIGN |
6528 | + // U..TIRHUTA VOWEL SIGN VOCALIC LL 0x114BA == code || // Mn |
6529 | + // TIRHUTA VOWEL SIGN SHORT E 0x114BD == code || // Mc TIRHUTA |
6530 | + // VOWEL SIGN SHORT O (0x114BF <= code && code <= 0x114C0) || // Mn [2] |
6531 | + // TIRHUTA SIGN CANDRABINDU..TIRHUTA SIGN ANUSVARA (0x114C2 <= code && |
6532 | + // code <= 0x114C3) || // Mn [2] TIRHUTA SIGN VIRAMA..TIRHUTA SIGN NUKTA |
6533 | // 0x115AF == code || // Mc SIDDHAM VOWEL SIGN AA |
6534 | - // (0x115B2 <= code && code <= 0x115B5) || // Mn [4] SIDDHAM VOWEL SIGN U..SIDDHAM VOWEL SIGN VOCALIC RR |
6535 | - // (0x115BC <= code && code <= 0x115BD) || // Mn [2] SIDDHAM SIGN CANDRABINDU..SIDDHAM SIGN ANUSVARA |
6536 | - // (0x115BF <= code && code <= 0x115C0) || // Mn [2] SIDDHAM SIGN VIRAMA..SIDDHAM SIGN NUKTA |
6537 | - // (0x115DC <= code && code <= 0x115DD) || // Mn [2] SIDDHAM VOWEL SIGN ALTERNATE U..SIDDHAM VOWEL SIGN ALTERNATE UU |
6538 | - // (0x11633 <= code && code <= 0x1163A) || // Mn [8] MODI VOWEL SIGN U..MODI VOWEL SIGN AI |
6539 | - // 0x1163D == code || // Mn MODI SIGN ANUSVARA |
6540 | - // (0x1163F <= code && code <= 0x11640) || // Mn [2] MODI SIGN VIRAMA..MODI SIGN ARDHACANDRA |
6541 | - // 0x116AB == code || // Mn TAKRI SIGN ANUSVARA |
6542 | - // 0x116AD == code || // Mn TAKRI VOWEL SIGN AA |
6543 | - // (0x116B0 <= code && code <= 0x116B5) || // Mn [6] TAKRI VOWEL SIGN U..TAKRI VOWEL SIGN AU |
6544 | - // 0x116B7 == code || // Mn TAKRI SIGN NUKTA |
6545 | - // (0x1171D <= code && code <= 0x1171F) || // Mn [3] AHOM CONSONANT SIGN MEDIAL LA..AHOM CONSONANT SIGN MEDIAL LIGATING RA |
6546 | - // (0x11722 <= code && code <= 0x11725) || // Mn [4] AHOM VOWEL SIGN I..AHOM VOWEL SIGN UU |
6547 | - // (0x11727 <= code && code <= 0x1172B) || // Mn [5] AHOM VOWEL SIGN AW..AHOM SIGN KILLER |
6548 | - // (0x11A01 <= code && code <= 0x11A06) || // Mn [6] ZANABAZAR SQUARE VOWEL SIGN I..ZANABAZAR SQUARE VOWEL SIGN O |
6549 | - // (0x11A09 <= code && code <= 0x11A0A) || // Mn [2] ZANABAZAR SQUARE VOWEL SIGN REVERSED I..ZANABAZAR SQUARE VOWEL LENGTH MARK |
6550 | - // (0x11A33 <= code && code <= 0x11A38) || // Mn [6] ZANABAZAR SQUARE FINAL CONSONANT MARK..ZANABAZAR SQUARE SIGN ANUSVARA |
6551 | - // (0x11A3B <= code && code <= 0x11A3E) || // Mn [4] ZANABAZAR SQUARE CLUSTER-FINAL LETTER YA..ZANABAZAR SQUARE CLUSTER-FINAL LETTER VA |
6552 | - // 0x11A47 == code || // Mn ZANABAZAR SQUARE SUBJOINER |
6553 | - // (0x11A51 <= code && code <= 0x11A56) || // Mn [6] SOYOMBO VOWEL SIGN I..SOYOMBO VOWEL SIGN OE |
6554 | - // (0x11A59 <= code && code <= 0x11A5B) || // Mn [3] SOYOMBO VOWEL SIGN VOCALIC R..SOYOMBO VOWEL LENGTH MARK |
6555 | - // (0x11A8A <= code && code <= 0x11A96) || // Mn [13] SOYOMBO FINAL CONSONANT SIGN G..SOYOMBO SIGN ANUSVARA |
6556 | - // (0x11A98 <= code && code <= 0x11A99) || // Mn [2] SOYOMBO GEMINATION MARK..SOYOMBO SUBJOINER |
6557 | - // (0x11C30 <= code && code <= 0x11C36) || // Mn [7] BHAIKSUKI VOWEL SIGN I..BHAIKSUKI VOWEL SIGN VOCALIC L |
6558 | - // (0x11C38 <= code && code <= 0x11C3D) || // Mn [6] BHAIKSUKI VOWEL SIGN E..BHAIKSUKI SIGN ANUSVARA |
6559 | + // (0x115B2 <= code && code <= 0x115B5) || // Mn [4] SIDDHAM VOWEL SIGN |
6560 | + // U..SIDDHAM VOWEL SIGN VOCALIC RR (0x115BC <= code && code <= 0x115BD) |
6561 | + // || // Mn [2] SIDDHAM SIGN CANDRABINDU..SIDDHAM SIGN ANUSVARA |
6562 | + // (0x115BF <= code && code <= 0x115C0) || // Mn [2] SIDDHAM SIGN |
6563 | + // VIRAMA..SIDDHAM SIGN NUKTA (0x115DC <= code && code <= 0x115DD) || // |
6564 | + // Mn [2] SIDDHAM VOWEL SIGN ALTERNATE U..SIDDHAM VOWEL SIGN ALTERNATE UU |
6565 | + // (0x11633 <= code && code <= 0x1163A) || // Mn [8] MODI VOWEL SIGN |
6566 | + // U..MODI VOWEL SIGN AI 0x1163D == code || // Mn MODI SIGN |
6567 | + // ANUSVARA (0x1163F <= code && code <= 0x11640) || // Mn [2] MODI SIGN |
6568 | + // VIRAMA..MODI SIGN ARDHACANDRA 0x116AB == code || // Mn TAKRI |
6569 | + // SIGN ANUSVARA 0x116AD == code || // Mn TAKRI VOWEL SIGN AA |
6570 | + // (0x116B0 <= code && code <= 0x116B5) || // Mn [6] TAKRI VOWEL SIGN |
6571 | + // U..TAKRI VOWEL SIGN AU 0x116B7 == code || // Mn TAKRI SIGN NUKTA |
6572 | + // (0x1171D <= code && code <= 0x1171F) || // Mn [3] AHOM CONSONANT |
6573 | + // SIGN MEDIAL LA..AHOM CONSONANT SIGN MEDIAL LIGATING RA (0x11722 <= |
6574 | + // code && code <= 0x11725) || // Mn [4] AHOM VOWEL SIGN I..AHOM VOWEL SIGN UU |
6575 | + // (0x11727 <= code && code <= 0x1172B) || // Mn [5] AHOM VOWEL SIGN |
6576 | + // AW..AHOM SIGN KILLER (0x11A01 <= code && code <= 0x11A06) || // Mn |
6577 | + // [6] ZANABAZAR SQUARE VOWEL SIGN I..ZANABAZAR SQUARE VOWEL SIGN O |
6578 | + // (0x11A09 <= code && code <= 0x11A0A) || // Mn [2] ZANABAZAR SQUARE |
6579 | + // VOWEL SIGN REVERSED I..ZANABAZAR SQUARE VOWEL LENGTH MARK (0x11A33 <= |
6580 | + // code && code <= 0x11A38) || // Mn [6] ZANABAZAR SQUARE FINAL CONSONANT |
6581 | + // MARK..ZANABAZAR SQUARE SIGN ANUSVARA (0x11A3B <= code && code <= |
6582 | + // 0x11A3E) || // Mn [4] ZANABAZAR SQUARE CLUSTER-FINAL LETTER YA..ZANABAZAR |
6583 | + // SQUARE CLUSTER-FINAL LETTER VA 0x11A47 == code || // Mn |
6584 | + // ZANABAZAR SQUARE SUBJOINER (0x11A51 <= code && code <= 0x11A56) || // |
6585 | + // Mn [6] SOYOMBO VOWEL SIGN I..SOYOMBO VOWEL SIGN OE (0x11A59 <= code |
6586 | + // && code <= 0x11A5B) || // Mn [3] SOYOMBO VOWEL SIGN VOCALIC R..SOYOMBO |
6587 | + // VOWEL LENGTH MARK (0x11A8A <= code && code <= 0x11A96) || // Mn [13] |
6588 | + // SOYOMBO FINAL CONSONANT SIGN G..SOYOMBO SIGN ANUSVARA (0x11A98 <= code |
6589 | + // && code <= 0x11A99) || // Mn [2] SOYOMBO GEMINATION MARK..SOYOMBO SUBJOINER |
6590 | + // (0x11C30 <= code && code <= 0x11C36) || // Mn [7] BHAIKSUKI VOWEL |
6591 | + // SIGN I..BHAIKSUKI VOWEL SIGN VOCALIC L (0x11C38 <= code && code <= |
6592 | + // 0x11C3D) || // Mn [6] BHAIKSUKI VOWEL SIGN E..BHAIKSUKI SIGN ANUSVARA |
6593 | // 0x11C3F == code || // Mn BHAIKSUKI SIGN VIRAMA |
6594 | - // (0x11C92 <= code && code <= 0x11CA7) || // Mn [22] MARCHEN SUBJOINED LETTER KA..MARCHEN SUBJOINED LETTER ZA |
6595 | - // (0x11CAA <= code && code <= 0x11CB0) || // Mn [7] MARCHEN SUBJOINED LETTER RA..MARCHEN VOWEL SIGN AA |
6596 | - // (0x11CB2 <= code && code <= 0x11CB3) || // Mn [2] MARCHEN VOWEL SIGN U..MARCHEN VOWEL SIGN E |
6597 | - // (0x11CB5 <= code && code <= 0x11CB6) || // Mn [2] MARCHEN SIGN ANUSVARA..MARCHEN SIGN CANDRABINDU |
6598 | - // (0x11D31 <= code && code <= 0x11D36) || // Mn [6] MASARAM GONDI VOWEL SIGN AA..MASARAM GONDI VOWEL SIGN VOCALIC R |
6599 | - // 0x11D3A == code || // Mn MASARAM GONDI VOWEL SIGN E |
6600 | - // (0x11D3C <= code && code <= 0x11D3D) || // Mn [2] MASARAM GONDI VOWEL SIGN AI..MASARAM GONDI VOWEL SIGN O |
6601 | - // (0x11D3F <= code && code <= 0x11D45) || // Mn [7] MASARAM GONDI VOWEL SIGN AU..MASARAM GONDI VIRAMA |
6602 | - // 0x11D47 == code || // Mn MASARAM GONDI RA-KARA |
6603 | - // (0x16AF0 <= code && code <= 0x16AF4) || // Mn [5] BASSA VAH COMBINING HIGH TONE..BASSA VAH COMBINING HIGH-LOW TONE |
6604 | - // (0x16B30 <= code && code <= 0x16B36) || // Mn [7] PAHAWH HMONG MARK CIM TUB..PAHAWH HMONG MARK CIM TAUM |
6605 | - // (0x16F8F <= code && code <= 0x16F92) || // Mn [4] MIAO TONE RIGHT..MIAO TONE BELOW |
6606 | - // (0x1BC9D <= code && code <= 0x1BC9E) || // Mn [2] DUPLOYAN THICK LETTER SELECTOR..DUPLOYAN DOUBLE MARK |
6607 | + // (0x11C92 <= code && code <= 0x11CA7) || // Mn [22] MARCHEN SUBJOINED |
6608 | + // LETTER KA..MARCHEN SUBJOINED LETTER ZA (0x11CAA <= code && code <= |
6609 | + // 0x11CB0) || // Mn [7] MARCHEN SUBJOINED LETTER RA..MARCHEN VOWEL SIGN AA |
6610 | + // (0x11CB2 <= code && code <= 0x11CB3) || // Mn [2] MARCHEN VOWEL SIGN |
6611 | + // U..MARCHEN VOWEL SIGN E (0x11CB5 <= code && code <= 0x11CB6) || // Mn |
6612 | + // [2] MARCHEN SIGN ANUSVARA..MARCHEN SIGN CANDRABINDU (0x11D31 <= code |
6613 | + // && code <= 0x11D36) || // Mn [6] MASARAM GONDI VOWEL SIGN AA..MASARAM GONDI |
6614 | + // VOWEL SIGN VOCALIC R 0x11D3A == code || // Mn MASARAM GONDI |
6615 | + // VOWEL SIGN E (0x11D3C <= code && code <= 0x11D3D) || // Mn [2] |
6616 | + // MASARAM GONDI VOWEL SIGN AI..MASARAM GONDI VOWEL SIGN O (0x11D3F <= |
6617 | + // code && code <= 0x11D45) || // Mn [7] MASARAM GONDI VOWEL SIGN AU..MASARAM |
6618 | + // GONDI VIRAMA 0x11D47 == code || // Mn MASARAM GONDI RA-KARA |
6619 | + // (0x16AF0 <= code && code <= 0x16AF4) || // Mn [5] BASSA VAH |
6620 | + // COMBINING HIGH TONE..BASSA VAH COMBINING HIGH-LOW TONE (0x16B30 <= |
6621 | + // code && code <= 0x16B36) || // Mn [7] PAHAWH HMONG MARK CIM TUB..PAHAWH |
6622 | + // HMONG MARK CIM TAUM (0x16F8F <= code && code <= 0x16F92) || // Mn |
6623 | + // [4] MIAO TONE RIGHT..MIAO TONE BELOW (0x1BC9D <= code && code <= |
6624 | + // 0x1BC9E) || // Mn [2] DUPLOYAN THICK LETTER SELECTOR..DUPLOYAN DOUBLE MARK |
6625 | // 0x1D165 == code || // Mc MUSICAL SYMBOL COMBINING STEM |
6626 | - // (0x1D167 <= code && code <= 0x1D169) || // Mn [3] MUSICAL SYMBOL COMBINING TREMOLO-1..MUSICAL SYMBOL COMBINING TREMOLO-3 |
6627 | - // (0x1D16E <= code && code <= 0x1D172) || // Mc [5] MUSICAL SYMBOL COMBINING FLAG-1..MUSICAL SYMBOL COMBINING FLAG-5 |
6628 | - // (0x1D17B <= code && code <= 0x1D182) || // Mn [8] MUSICAL SYMBOL COMBINING ACCENT..MUSICAL SYMBOL COMBINING LOURE |
6629 | - // (0x1D185 <= code && code <= 0x1D18B) || // Mn [7] MUSICAL SYMBOL COMBINING DOIT..MUSICAL SYMBOL COMBINING TRIPLE TONGUE |
6630 | - // (0x1D1AA <= code && code <= 0x1D1AD) || // Mn [4] MUSICAL SYMBOL COMBINING DOWN BOW..MUSICAL SYMBOL COMBINING SNAP PIZZICATO |
6631 | - // (0x1D242 <= code && code <= 0x1D244) || // Mn [3] COMBINING GREEK MUSICAL TRISEME..COMBINING GREEK MUSICAL PENTASEME |
6632 | - // (0x1DA00 <= code && code <= 0x1DA36) || // Mn [55] SIGNWRITING HEAD RIM..SIGNWRITING AIR SUCKING IN |
6633 | - // (0x1DA3B <= code && code <= 0x1DA6C) || // Mn [50] SIGNWRITING MOUTH CLOSED NEUTRAL..SIGNWRITING EXCITEMENT |
6634 | - // 0x1DA75 == code || // Mn SIGNWRITING UPPER BODY TILTING FROM HIP JOINTS |
6635 | - // 0x1DA84 == code || // Mn SIGNWRITING LOCATION HEAD NECK |
6636 | - // (0x1DA9B <= code && code <= 0x1DA9F) || // Mn [5] SIGNWRITING FILL MODIFIER-2..SIGNWRITING FILL MODIFIER-6 |
6637 | - // (0x1DAA1 <= code && code <= 0x1DAAF) || // Mn [15] SIGNWRITING ROTATION MODIFIER-2..SIGNWRITING ROTATION MODIFIER-16 |
6638 | - // (0x1E000 <= code && code <= 0x1E006) || // Mn [7] COMBINING GLAGOLITIC LETTER AZU..COMBINING GLAGOLITIC LETTER ZHIVETE |
6639 | - // (0x1E008 <= code && code <= 0x1E018) || // Mn [17] COMBINING GLAGOLITIC LETTER ZEMLJA..COMBINING GLAGOLITIC LETTER HERU |
6640 | - // (0x1E01B <= code && code <= 0x1E021) || // Mn [7] COMBINING GLAGOLITIC LETTER SHTA..COMBINING GLAGOLITIC LETTER YATI |
6641 | - // (0x1E023 <= code && code <= 0x1E024) || // Mn [2] COMBINING GLAGOLITIC LETTER YU..COMBINING GLAGOLITIC LETTER SMALL YUS |
6642 | - // (0x1E026 <= code && code <= 0x1E02A) || // Mn [5] COMBINING GLAGOLITIC LETTER YO..COMBINING GLAGOLITIC LETTER FITA |
6643 | - // (0x1E8D0 <= code && code <= 0x1E8D6) || // Mn [7] MENDE KIKAKUI COMBINING NUMBER TEENS..MENDE KIKAKUI COMBINING NUMBER MILLIONS |
6644 | - // (0x1E944 <= code && code <= 0x1E94A) || // Mn [7] ADLAM ALIF LENGTHENER..ADLAM NUKTA |
6645 | - // (0x_e0020 <= code && code <= 0x_e007F) || // Cf [96] TAG SPACE..CANCEL TAG |
6646 | - // (0x_e0100 <= code && code <= 0x_e01EF) // Mn [240] VARIATION SELECTOR-17..VARIATION SELECTOR-256 |
6647 | - // ){ |
6648 | + // (0x1D167 <= code && code <= 0x1D169) || // Mn [3] MUSICAL SYMBOL |
6649 | + // COMBINING TREMOLO-1..MUSICAL SYMBOL COMBINING TREMOLO-3 (0x1D16E <= |
6650 | + // code && code <= 0x1D172) || // Mc [5] MUSICAL SYMBOL COMBINING |
6651 | + // FLAG-1..MUSICAL SYMBOL COMBINING FLAG-5 (0x1D17B <= code && code <= |
6652 | + // 0x1D182) || // Mn [8] MUSICAL SYMBOL COMBINING ACCENT..MUSICAL SYMBOL |
6653 | + // COMBINING LOURE (0x1D185 <= code && code <= 0x1D18B) || // Mn [7] |
6654 | + // MUSICAL SYMBOL COMBINING DOIT..MUSICAL SYMBOL COMBINING TRIPLE TONGUE |
6655 | + // (0x1D1AA <= code && code <= 0x1D1AD) || // Mn [4] MUSICAL SYMBOL |
6656 | + // COMBINING DOWN BOW..MUSICAL SYMBOL COMBINING SNAP PIZZICATO (0x1D242 |
6657 | + // <= code && code <= 0x1D244) || // Mn [3] COMBINING GREEK MUSICAL |
6658 | + // TRISEME..COMBINING GREEK MUSICAL PENTASEME (0x1DA00 <= code && code <= |
6659 | + // 0x1DA36) || // Mn [55] SIGNWRITING HEAD RIM..SIGNWRITING AIR SUCKING IN |
6660 | + // (0x1DA3B <= code && code <= 0x1DA6C) || // Mn [50] SIGNWRITING MOUTH |
6661 | + // CLOSED NEUTRAL..SIGNWRITING EXCITEMENT 0x1DA75 == code || // Mn |
6662 | + // SIGNWRITING UPPER BODY TILTING FROM HIP JOINTS 0x1DA84 == code || // |
6663 | + // Mn SIGNWRITING LOCATION HEAD NECK (0x1DA9B <= code && code <= |
6664 | + // 0x1DA9F) || // Mn [5] SIGNWRITING FILL MODIFIER-2..SIGNWRITING FILL |
6665 | + // MODIFIER-6 (0x1DAA1 <= code && code <= 0x1DAAF) || // Mn [15] |
6666 | + // SIGNWRITING ROTATION MODIFIER-2..SIGNWRITING ROTATION MODIFIER-16 |
6667 | + // (0x1E000 <= code && code <= 0x1E006) || // Mn [7] COMBINING |
6668 | + // GLAGOLITIC LETTER AZU..COMBINING GLAGOLITIC LETTER ZHIVETE (0x1E008 <= |
6669 | + // code && code <= 0x1E018) || // Mn [17] COMBINING GLAGOLITIC LETTER |
6670 | + // ZEMLJA..COMBINING GLAGOLITIC LETTER HERU (0x1E01B <= code && code <= |
6671 | + // 0x1E021) || // Mn [7] COMBINING GLAGOLITIC LETTER SHTA..COMBINING |
6672 | + // GLAGOLITIC LETTER YATI (0x1E023 <= code && code <= 0x1E024) || // Mn |
6673 | + // [2] COMBINING GLAGOLITIC LETTER YU..COMBINING GLAGOLITIC LETTER SMALL YUS |
6674 | + // (0x1E026 <= code && code <= 0x1E02A) || // Mn [5] COMBINING |
6675 | + // GLAGOLITIC LETTER YO..COMBINING GLAGOLITIC LETTER FITA (0x1E8D0 <= |
6676 | + // code && code <= 0x1E8D6) || // Mn [7] MENDE KIKAKUI COMBINING NUMBER |
6677 | + // TEENS..MENDE KIKAKUI COMBINING NUMBER MILLIONS (0x1E944 <= code && |
6678 | + // code <= 0x1E94A) || // Mn [7] ADLAM ALIF LENGTHENER..ADLAM NUKTA |
6679 | + // (0x_e0020 <= code && code <= 0x_e007F) || // Cf [96] TAG |
6680 | + // SPACE..CANCEL TAG (0x_e0100 <= code && code <= 0x_e01EF) // Mn [240] |
6681 | + // VARIATION SELECTOR-17..VARIATION SELECTOR-256 ){ |
6682 | // return Extend; |
6683 | // } |
6684 | // |
6685 | // |
6686 | // if( |
6687 | - // (0x1F1E6 <= code && code <= 0x1F1FF) // So [26] REGIONAL INDICATOR SYMBOL LETTER A..REGIONAL INDICATOR SYMBOL LETTER Z |
6688 | - // ){ |
6689 | + // (0x1F1E6 <= code && code <= 0x1F1FF) // So [26] REGIONAL INDICATOR |
6690 | + // SYMBOL LETTER A..REGIONAL INDICATOR SYMBOL LETTER Z ){ |
6691 | // return Regional_Indicator; |
6692 | // } |
6693 | // |
6694 | // if( |
6695 | // 0x0903 == code || // Mc DEVANAGARI SIGN VISARGA |
6696 | // 0x093B == code || // Mc DEVANAGARI VOWEL SIGN OOE |
6697 | - // (0x093E <= code && code <= 0x0940) || // Mc [3] DEVANAGARI VOWEL SIGN AA..DEVANAGARI VOWEL SIGN II |
6698 | - // (0x0949 <= code && code <= 0x094C) || // Mc [4] DEVANAGARI VOWEL SIGN CANDRA O..DEVANAGARI VOWEL SIGN AU |
6699 | - // (0x094E <= code && code <= 0x094F) || // Mc [2] DEVANAGARI VOWEL SIGN PRISHTHAMATRA E..DEVANAGARI VOWEL SIGN AW |
6700 | - // (0x0982 <= code && code <= 0x0983) || // Mc [2] BENGALI SIGN ANUSVARA..BENGALI SIGN VISARGA |
6701 | - // (0x09BF <= code && code <= 0x09C0) || // Mc [2] BENGALI VOWEL SIGN I..BENGALI VOWEL SIGN II |
6702 | - // (0x09C7 <= code && code <= 0x09C8) || // Mc [2] BENGALI VOWEL SIGN E..BENGALI VOWEL SIGN AI |
6703 | - // (0x09CB <= code && code <= 0x09CC) || // Mc [2] BENGALI VOWEL SIGN O..BENGALI VOWEL SIGN AU |
6704 | + // (0x093E <= code && code <= 0x0940) || // Mc [3] DEVANAGARI VOWEL |
6705 | + // SIGN AA..DEVANAGARI VOWEL SIGN II (0x0949 <= code && code <= 0x094C) |
6706 | + // || // Mc [4] DEVANAGARI VOWEL SIGN CANDRA O..DEVANAGARI VOWEL SIGN AU |
6707 | + // (0x094E <= code && code <= 0x094F) || // Mc [2] DEVANAGARI VOWEL |
6708 | + // SIGN PRISHTHAMATRA E..DEVANAGARI VOWEL SIGN AW (0x0982 <= code && code |
6709 | + // <= 0x0983) || // Mc [2] BENGALI SIGN ANUSVARA..BENGALI SIGN VISARGA |
6710 | + // (0x09BF <= code && code <= 0x09C0) || // Mc [2] BENGALI VOWEL SIGN |
6711 | + // I..BENGALI VOWEL SIGN II (0x09C7 <= code && code <= 0x09C8) || // Mc |
6712 | + // [2] BENGALI VOWEL SIGN E..BENGALI VOWEL SIGN AI (0x09CB <= code && |
6713 | + // code <= 0x09CC) || // Mc [2] BENGALI VOWEL SIGN O..BENGALI VOWEL SIGN AU |
6714 | // 0x0A03 == code || // Mc GURMUKHI SIGN VISARGA |
6715 | - // (0x0A3E <= code && code <= 0x0A40) || // Mc [3] GURMUKHI VOWEL SIGN AA..GURMUKHI VOWEL SIGN II |
6716 | - // 0x0A83 == code || // Mc GUJARATI SIGN VISARGA |
6717 | - // (0x0ABE <= code && code <= 0x0AC0) || // Mc [3] GUJARATI VOWEL SIGN AA..GUJARATI VOWEL SIGN II |
6718 | - // 0x0AC9 == code || // Mc GUJARATI VOWEL SIGN CANDRA O |
6719 | - // (0x0ACB <= code && code <= 0x0ACC) || // Mc [2] GUJARATI VOWEL SIGN O..GUJARATI VOWEL SIGN AU |
6720 | - // (0x0B02 <= code && code <= 0x0B03) || // Mc [2] ORIYA SIGN ANUSVARA..ORIYA SIGN VISARGA |
6721 | + // (0x0A3E <= code && code <= 0x0A40) || // Mc [3] GURMUKHI VOWEL SIGN |
6722 | + // AA..GURMUKHI VOWEL SIGN II 0x0A83 == code || // Mc GUJARATI SIGN |
6723 | + // VISARGA (0x0ABE <= code && code <= 0x0AC0) || // Mc [3] GUJARATI |
6724 | + // VOWEL SIGN AA..GUJARATI VOWEL SIGN II 0x0AC9 == code || // Mc |
6725 | + // GUJARATI VOWEL SIGN CANDRA O (0x0ACB <= code && code <= 0x0ACC) || // |
6726 | + // Mc [2] GUJARATI VOWEL SIGN O..GUJARATI VOWEL SIGN AU (0x0B02 <= code |
6727 | + // && code <= 0x0B03) || // Mc [2] ORIYA SIGN ANUSVARA..ORIYA SIGN VISARGA |
6728 | // 0x0B40 == code || // Mc ORIYA VOWEL SIGN II |
6729 | - // (0x0B47 <= code && code <= 0x0B48) || // Mc [2] ORIYA VOWEL SIGN E..ORIYA VOWEL SIGN AI |
6730 | - // (0x0B4B <= code && code <= 0x0B4C) || // Mc [2] ORIYA VOWEL SIGN O..ORIYA VOWEL SIGN AU |
6731 | - // 0x0BBF == code || // Mc TAMIL VOWEL SIGN I |
6732 | - // (0x0BC1 <= code && code <= 0x0BC2) || // Mc [2] TAMIL VOWEL SIGN U..TAMIL VOWEL SIGN UU |
6733 | - // (0x0BC6 <= code && code <= 0x0BC8) || // Mc [3] TAMIL VOWEL SIGN E..TAMIL VOWEL SIGN AI |
6734 | - // (0x0BCA <= code && code <= 0x0BCC) || // Mc [3] TAMIL VOWEL SIGN O..TAMIL VOWEL SIGN AU |
6735 | - // (0x0C01 <= code && code <= 0x0C03) || // Mc [3] TELUGU SIGN CANDRABINDU..TELUGU SIGN VISARGA |
6736 | - // (0x0C41 <= code && code <= 0x0C44) || // Mc [4] TELUGU VOWEL SIGN U..TELUGU VOWEL SIGN VOCALIC RR |
6737 | - // (0x0C82 <= code && code <= 0x0C83) || // Mc [2] KANNADA SIGN ANUSVARA..KANNADA SIGN VISARGA |
6738 | - // 0x0CBE == code || // Mc KANNADA VOWEL SIGN AA |
6739 | - // (0x0CC0 <= code && code <= 0x0CC1) || // Mc [2] KANNADA VOWEL SIGN II..KANNADA VOWEL SIGN U |
6740 | - // (0x0CC3 <= code && code <= 0x0CC4) || // Mc [2] KANNADA VOWEL SIGN VOCALIC R..KANNADA VOWEL SIGN VOCALIC RR |
6741 | - // (0x0CC7 <= code && code <= 0x0CC8) || // Mc [2] KANNADA VOWEL SIGN EE..KANNADA VOWEL SIGN AI |
6742 | - // (0x0CCA <= code && code <= 0x0CCB) || // Mc [2] KANNADA VOWEL SIGN O..KANNADA VOWEL SIGN OO |
6743 | - // (0x0D02 <= code && code <= 0x0D03) || // Mc [2] MALAYALAM SIGN ANUSVARA..MALAYALAM SIGN VISARGA |
6744 | - // (0x0D3F <= code && code <= 0x0D40) || // Mc [2] MALAYALAM VOWEL SIGN I..MALAYALAM VOWEL SIGN II |
6745 | - // (0x0D46 <= code && code <= 0x0D48) || // Mc [3] MALAYALAM VOWEL SIGN E..MALAYALAM VOWEL SIGN AI |
6746 | - // (0x0D4A <= code && code <= 0x0D4C) || // Mc [3] MALAYALAM VOWEL SIGN O..MALAYALAM VOWEL SIGN AU |
6747 | - // (0x0D82 <= code && code <= 0x0D83) || // Mc [2] SINHALA SIGN ANUSVARAYA..SINHALA SIGN VISARGAYA |
6748 | - // (0x0DD0 <= code && code <= 0x0DD1) || // Mc [2] SINHALA VOWEL SIGN KETTI AEDA-PILLA..SINHALA VOWEL SIGN DIGA AEDA-PILLA |
6749 | - // (0x0DD8 <= code && code <= 0x0DDE) || // Mc [7] SINHALA VOWEL SIGN GAETTA-PILLA..SINHALA VOWEL SIGN KOMBUVA HAA GAYANUKITTA |
6750 | - // (0x0DF2 <= code && code <= 0x0DF3) || // Mc [2] SINHALA VOWEL SIGN DIGA GAETTA-PILLA..SINHALA VOWEL SIGN DIGA GAYANUKITTA |
6751 | + // (0x0B47 <= code && code <= 0x0B48) || // Mc [2] ORIYA VOWEL SIGN |
6752 | + // E..ORIYA VOWEL SIGN AI (0x0B4B <= code && code <= 0x0B4C) || // Mc |
6753 | + // [2] ORIYA VOWEL SIGN O..ORIYA VOWEL SIGN AU 0x0BBF == code || // Mc |
6754 | + // TAMIL VOWEL SIGN I (0x0BC1 <= code && code <= 0x0BC2) || // Mc [2] |
6755 | + // TAMIL VOWEL SIGN U..TAMIL VOWEL SIGN UU (0x0BC6 <= code && code <= |
6756 | + // 0x0BC8) || // Mc [3] TAMIL VOWEL SIGN E..TAMIL VOWEL SIGN AI (0x0BCA |
6757 | + // <= code && code <= 0x0BCC) || // Mc [3] TAMIL VOWEL SIGN O..TAMIL VOWEL |
6758 | + // SIGN AU (0x0C01 <= code && code <= 0x0C03) || // Mc [3] TELUGU SIGN |
6759 | + // CANDRABINDU..TELUGU SIGN VISARGA (0x0C41 <= code && code <= 0x0C44) || |
6760 | + // // Mc [4] TELUGU VOWEL SIGN U..TELUGU VOWEL SIGN VOCALIC RR (0x0C82 |
6761 | + // <= code && code <= 0x0C83) || // Mc [2] KANNADA SIGN ANUSVARA..KANNADA SIGN |
6762 | + // VISARGA 0x0CBE == code || // Mc KANNADA VOWEL SIGN AA |
6763 | + // (0x0CC0 <= code && code <= 0x0CC1) || // Mc [2] KANNADA VOWEL SIGN |
6764 | + // II..KANNADA VOWEL SIGN U (0x0CC3 <= code && code <= 0x0CC4) || // Mc |
6765 | + // [2] KANNADA VOWEL SIGN VOCALIC R..KANNADA VOWEL SIGN VOCALIC RR |
6766 | + // (0x0CC7 <= code && code <= 0x0CC8) || // Mc [2] KANNADA VOWEL SIGN |
6767 | + // EE..KANNADA VOWEL SIGN AI (0x0CCA <= code && code <= 0x0CCB) || // Mc |
6768 | + // [2] KANNADA VOWEL SIGN O..KANNADA VOWEL SIGN OO (0x0D02 <= code && |
6769 | + // code <= 0x0D03) || // Mc [2] MALAYALAM SIGN ANUSVARA..MALAYALAM SIGN |
6770 | + // VISARGA (0x0D3F <= code && code <= 0x0D40) || // Mc [2] MALAYALAM |
6771 | + // VOWEL SIGN I..MALAYALAM VOWEL SIGN II (0x0D46 <= code && code <= |
6772 | + // 0x0D48) || // Mc [3] MALAYALAM VOWEL SIGN E..MALAYALAM VOWEL SIGN AI |
6773 | + // (0x0D4A <= code && code <= 0x0D4C) || // Mc [3] MALAYALAM VOWEL SIGN |
6774 | + // O..MALAYALAM VOWEL SIGN AU (0x0D82 <= code && code <= 0x0D83) || // Mc |
6775 | + // [2] SINHALA SIGN ANUSVARAYA..SINHALA SIGN VISARGAYA (0x0DD0 <= code && |
6776 | + // code <= 0x0DD1) || // Mc [2] SINHALA VOWEL SIGN KETTI AEDA-PILLA..SINHALA |
6777 | + // VOWEL SIGN DIGA AEDA-PILLA (0x0DD8 <= code && code <= 0x0DDE) || // Mc |
6778 | + // [7] SINHALA VOWEL SIGN GAETTA-PILLA..SINHALA VOWEL SIGN KOMBUVA HAA |
6779 | + // GAYANUKITTA (0x0DF2 <= code && code <= 0x0DF3) || // Mc [2] SINHALA |
6780 | + // VOWEL SIGN DIGA GAETTA-PILLA..SINHALA VOWEL SIGN DIGA GAYANUKITTA |
6781 | // 0x0E33 == code || // Lo THAI CHARACTER SARA AM |
6782 | // 0x0EB3 == code || // Lo LAO VOWEL SIGN AM |
6783 | - // (0x0F3E <= code && code <= 0x0F3F) || // Mc [2] TIBETAN SIGN YAR TSHES..TIBETAN SIGN MAR TSHES |
6784 | - // 0x0F7F == code || // Mc TIBETAN SIGN RNAM BCAD |
6785 | - // 0x1031 == code || // Mc MYANMAR VOWEL SIGN E |
6786 | - // (0x103B <= code && code <= 0x103C) || // Mc [2] MYANMAR CONSONANT SIGN MEDIAL YA..MYANMAR CONSONANT SIGN MEDIAL RA |
6787 | - // (0x1056 <= code && code <= 0x1057) || // Mc [2] MYANMAR VOWEL SIGN VOCALIC R..MYANMAR VOWEL SIGN VOCALIC RR |
6788 | - // 0x1084 == code || // Mc MYANMAR VOWEL SIGN SHAN E |
6789 | - // 0x17B6 == code || // Mc KHMER VOWEL SIGN AA |
6790 | - // (0x17BE <= code && code <= 0x17C5) || // Mc [8] KHMER VOWEL SIGN OE..KHMER VOWEL SIGN AU |
6791 | - // (0x17C7 <= code && code <= 0x17C8) || // Mc [2] KHMER SIGN REAHMUK..KHMER SIGN YUUKALEAPINTU |
6792 | - // (0x1923 <= code && code <= 0x1926) || // Mc [4] LIMBU VOWEL SIGN EE..LIMBU VOWEL SIGN AU |
6793 | - // (0x1929 <= code && code <= 0x192B) || // Mc [3] LIMBU SUBJOINED LETTER YA..LIMBU SUBJOINED LETTER WA |
6794 | - // (0x1930 <= code && code <= 0x1931) || // Mc [2] LIMBU SMALL LETTER KA..LIMBU SMALL LETTER NGA |
6795 | - // (0x1933 <= code && code <= 0x1938) || // Mc [6] LIMBU SMALL LETTER TA..LIMBU SMALL LETTER LA |
6796 | - // (0x1A19 <= code && code <= 0x1A1A) || // Mc [2] BUGINESE VOWEL SIGN E..BUGINESE VOWEL SIGN O |
6797 | - // 0x1A55 == code || // Mc TAI THAM CONSONANT SIGN MEDIAL RA |
6798 | - // 0x1A57 == code || // Mc TAI THAM CONSONANT SIGN LA TANG LAI |
6799 | - // (0x1A6D <= code && code <= 0x1A72) || // Mc [6] TAI THAM VOWEL SIGN OY..TAI THAM VOWEL SIGN THAM AI |
6800 | + // (0x0F3E <= code && code <= 0x0F3F) || // Mc [2] TIBETAN SIGN YAR |
6801 | + // TSHES..TIBETAN SIGN MAR TSHES 0x0F7F == code || // Mc TIBETAN |
6802 | + // SIGN RNAM BCAD 0x1031 == code || // Mc MYANMAR VOWEL SIGN E |
6803 | + // (0x103B <= code && code <= 0x103C) || // Mc [2] MYANMAR CONSONANT |
6804 | + // SIGN MEDIAL YA..MYANMAR CONSONANT SIGN MEDIAL RA (0x1056 <= code && |
6805 | + // code <= 0x1057) || // Mc [2] MYANMAR VOWEL SIGN VOCALIC R..MYANMAR VOWEL |
6806 | + // SIGN VOCALIC RR 0x1084 == code || // Mc MYANMAR VOWEL SIGN SHAN |
6807 | + // E 0x17B6 == code || // Mc KHMER VOWEL SIGN AA |
6808 | + // (0x17BE <= code && code <= 0x17C5) || // Mc [8] KHMER VOWEL SIGN |
6809 | + // OE..KHMER VOWEL SIGN AU (0x17C7 <= code && code <= 0x17C8) || // Mc |
6810 | + // [2] KHMER SIGN REAHMUK..KHMER SIGN YUUKALEAPINTU (0x1923 <= code && |
6811 | + // code <= 0x1926) || // Mc [4] LIMBU VOWEL SIGN EE..LIMBU VOWEL SIGN AU |
6812 | + // (0x1929 <= code && code <= 0x192B) || // Mc [3] LIMBU SUBJOINED |
6813 | + // LETTER YA..LIMBU SUBJOINED LETTER WA (0x1930 <= code && code <= |
6814 | + // 0x1931) || // Mc [2] LIMBU SMALL LETTER KA..LIMBU SMALL LETTER NGA |
6815 | + // (0x1933 <= code && code <= 0x1938) || // Mc [6] LIMBU SMALL LETTER |
6816 | + // TA..LIMBU SMALL LETTER LA (0x1A19 <= code && code <= 0x1A1A) || // Mc |
6817 | + // [2] BUGINESE VOWEL SIGN E..BUGINESE VOWEL SIGN O 0x1A55 == code || // |
6818 | + // Mc TAI THAM CONSONANT SIGN MEDIAL RA 0x1A57 == code || // Mc |
6819 | + // TAI THAM CONSONANT SIGN LA TANG LAI (0x1A6D <= code && code <= 0x1A72) |
6820 | + // || // Mc [6] TAI THAM VOWEL SIGN OY..TAI THAM VOWEL SIGN THAM AI |
6821 | // 0x1B04 == code || // Mc BALINESE SIGN BISAH |
6822 | // 0x1B35 == code || // Mc BALINESE VOWEL SIGN TEDUNG |
6823 | // 0x1B3B == code || // Mc BALINESE VOWEL SIGN RA REPA TEDUNG |
6824 | - // (0x1B3D <= code && code <= 0x1B41) || // Mc [5] BALINESE VOWEL SIGN LA LENGA TEDUNG..BALINESE VOWEL SIGN TALING REPA TEDUNG |
6825 | - // (0x1B43 <= code && code <= 0x1B44) || // Mc [2] BALINESE VOWEL SIGN PEPET TEDUNG..BALINESE ADEG ADEG |
6826 | - // 0x1B82 == code || // Mc SUNDANESE SIGN PANGWISAD |
6827 | - // 0x1BA1 == code || // Mc SUNDANESE CONSONANT SIGN PAMINGKAL |
6828 | - // (0x1BA6 <= code && code <= 0x1BA7) || // Mc [2] SUNDANESE VOWEL SIGN PANAELAENG..SUNDANESE VOWEL SIGN PANOLONG |
6829 | - // 0x1BAA == code || // Mc SUNDANESE SIGN PAMAAEH |
6830 | - // 0x1BE7 == code || // Mc BATAK VOWEL SIGN E |
6831 | - // (0x1BEA <= code && code <= 0x1BEC) || // Mc [3] BATAK VOWEL SIGN I..BATAK VOWEL SIGN O |
6832 | - // 0x1BEE == code || // Mc BATAK VOWEL SIGN U |
6833 | - // (0x1BF2 <= code && code <= 0x1BF3) || // Mc [2] BATAK PANGOLAT..BATAK PANONGONAN |
6834 | - // (0x1C24 <= code && code <= 0x1C2B) || // Mc [8] LEPCHA SUBJOINED LETTER YA..LEPCHA VOWEL SIGN UU |
6835 | - // (0x1C34 <= code && code <= 0x1C35) || // Mc [2] LEPCHA CONSONANT SIGN NYIN-DO..LEPCHA CONSONANT SIGN KANG |
6836 | - // 0x1CE1 == code || // Mc VEDIC TONE ATHARVAVEDIC INDEPENDENT SVARITA |
6837 | - // (0x1CF2 <= code && code <= 0x1CF3) || // Mc [2] VEDIC SIGN ARDHAVISARGA..VEDIC SIGN ROTATED ARDHAVISARGA |
6838 | + // (0x1B3D <= code && code <= 0x1B41) || // Mc [5] BALINESE VOWEL SIGN |
6839 | + // LA LENGA TEDUNG..BALINESE VOWEL SIGN TALING REPA TEDUNG (0x1B43 <= |
6840 | + // code && code <= 0x1B44) || // Mc [2] BALINESE VOWEL SIGN PEPET |
6841 | + // TEDUNG..BALINESE ADEG ADEG 0x1B82 == code || // Mc SUNDANESE |
6842 | + // SIGN PANGWISAD 0x1BA1 == code || // Mc SUNDANESE CONSONANT SIGN |
6843 | + // PAMINGKAL (0x1BA6 <= code && code <= 0x1BA7) || // Mc [2] SUNDANESE |
6844 | + // VOWEL SIGN PANAELAENG..SUNDANESE VOWEL SIGN PANOLONG 0x1BAA == code || |
6845 | + // // Mc SUNDANESE SIGN PAMAAEH 0x1BE7 == code || // Mc BATAK |
6846 | + // VOWEL SIGN E (0x1BEA <= code && code <= 0x1BEC) || // Mc [3] BATAK |
6847 | + // VOWEL SIGN I..BATAK VOWEL SIGN O 0x1BEE == code || // Mc BATAK |
6848 | + // VOWEL SIGN U (0x1BF2 <= code && code <= 0x1BF3) || // Mc [2] BATAK |
6849 | + // PANGOLAT..BATAK PANONGONAN (0x1C24 <= code && code <= 0x1C2B) || // Mc |
6850 | + // [8] LEPCHA SUBJOINED LETTER YA..LEPCHA VOWEL SIGN UU (0x1C34 <= code |
6851 | + // && code <= 0x1C35) || // Mc [2] LEPCHA CONSONANT SIGN NYIN-DO..LEPCHA |
6852 | + // CONSONANT SIGN KANG 0x1CE1 == code || // Mc VEDIC TONE |
6853 | + // ATHARVAVEDIC INDEPENDENT SVARITA (0x1CF2 <= code && code <= 0x1CF3) || |
6854 | + // // Mc [2] VEDIC SIGN ARDHAVISARGA..VEDIC SIGN ROTATED ARDHAVISARGA |
6855 | // 0x1CF7 == code || // Mc VEDIC SIGN ATIKRAMA |
6856 | - // (0x_a823 <= code && code <= 0x_a824) || // Mc [2] SYLOTI NAGRI VOWEL SIGN A..SYLOTI NAGRI VOWEL SIGN I |
6857 | - // 0x_a827 == code || // Mc SYLOTI NAGRI VOWEL SIGN OO |
6858 | - // (0x_a880 <= code && code <= 0x_a881) || // Mc [2] SAURASHTRA SIGN ANUSVARA..SAURASHTRA SIGN VISARGA |
6859 | - // (0x_a8B4 <= code && code <= 0x_a8C3) || // Mc [16] SAURASHTRA CONSONANT SIGN HAARU..SAURASHTRA VOWEL SIGN AU |
6860 | - // (0x_a952 <= code && code <= 0x_a953) || // Mc [2] REJANG CONSONANT SIGN H..REJANG VIRAMA |
6861 | - // 0x_a983 == code || // Mc JAVANESE SIGN WIGNYAN |
6862 | - // (0x_a9B4 <= code && code <= 0x_a9B5) || // Mc [2] JAVANESE VOWEL SIGN TARUNG..JAVANESE VOWEL SIGN TOLONG |
6863 | - // (0x_a9BA <= code && code <= 0x_a9BB) || // Mc [2] JAVANESE VOWEL SIGN TALING..JAVANESE VOWEL SIGN DIRGA MURE |
6864 | - // (0x_a9BD <= code && code <= 0x_a9C0) || // Mc [4] JAVANESE CONSONANT SIGN KERET..JAVANESE PANGKON |
6865 | - // (0x_aA2F <= code && code <= 0x_aA30) || // Mc [2] CHAM VOWEL SIGN O..CHAM VOWEL SIGN AI |
6866 | - // (0x_aA33 <= code && code <= 0x_aA34) || // Mc [2] CHAM CONSONANT SIGN YA..CHAM CONSONANT SIGN RA |
6867 | - // 0x_aA4D == code || // Mc CHAM CONSONANT SIGN FINAL H |
6868 | - // 0x_aAEB == code || // Mc MEETEI MAYEK VOWEL SIGN II |
6869 | - // (0x_aAEE <= code && code <= 0x_aAEF) || // Mc [2] MEETEI MAYEK VOWEL SIGN AU..MEETEI MAYEK VOWEL SIGN AAU |
6870 | - // 0x_aAF5 == code || // Mc MEETEI MAYEK VOWEL SIGN VISARGA |
6871 | - // (0x_aBE3 <= code && code <= 0x_aBE4) || // Mc [2] MEETEI MAYEK VOWEL SIGN ONAP..MEETEI MAYEK VOWEL SIGN INAP |
6872 | - // (0x_aBE6 <= code && code <= 0x_aBE7) || // Mc [2] MEETEI MAYEK VOWEL SIGN YENAP..MEETEI MAYEK VOWEL SIGN SOUNAP |
6873 | - // (0x_aBE9 <= code && code <= 0x_aBEA) || // Mc [2] MEETEI MAYEK VOWEL SIGN CHEINAP..MEETEI MAYEK VOWEL SIGN NUNG |
6874 | - // 0x_aBEC == code || // Mc MEETEI MAYEK LUM IYEK |
6875 | - // 0x11000 == code || // Mc BRAHMI SIGN CANDRABINDU |
6876 | - // 0x11002 == code || // Mc BRAHMI SIGN VISARGA |
6877 | - // 0x11082 == code || // Mc KAITHI SIGN VISARGA |
6878 | - // (0x110B0 <= code && code <= 0x110B2) || // Mc [3] KAITHI VOWEL SIGN AA..KAITHI VOWEL SIGN II |
6879 | - // (0x110B7 <= code && code <= 0x110B8) || // Mc [2] KAITHI VOWEL SIGN O..KAITHI VOWEL SIGN AU |
6880 | - // 0x1112C == code || // Mc CHAKMA VOWEL SIGN E |
6881 | - // 0x11182 == code || // Mc SHARADA SIGN VISARGA |
6882 | - // (0x111B3 <= code && code <= 0x111B5) || // Mc [3] SHARADA VOWEL SIGN AA..SHARADA VOWEL SIGN II |
6883 | - // (0x111BF <= code && code <= 0x111C0) || // Mc [2] SHARADA VOWEL SIGN AU..SHARADA SIGN VIRAMA |
6884 | - // (0x1122C <= code && code <= 0x1122E) || // Mc [3] KHOJKI VOWEL SIGN AA..KHOJKI VOWEL SIGN II |
6885 | - // (0x11232 <= code && code <= 0x11233) || // Mc [2] KHOJKI VOWEL SIGN O..KHOJKI VOWEL SIGN AU |
6886 | - // 0x11235 == code || // Mc KHOJKI SIGN VIRAMA |
6887 | - // (0x112E0 <= code && code <= 0x112E2) || // Mc [3] KHUDAWADI VOWEL SIGN AA..KHUDAWADI VOWEL SIGN II |
6888 | - // (0x11302 <= code && code <= 0x11303) || // Mc [2] GRANTHA SIGN ANUSVARA..GRANTHA SIGN VISARGA |
6889 | + // (0x_a823 <= code && code <= 0x_a824) || // Mc [2] SYLOTI NAGRI VOWEL |
6890 | + // SIGN A..SYLOTI NAGRI VOWEL SIGN I 0x_a827 == code || // Mc |
6891 | + // SYLOTI NAGRI VOWEL SIGN OO (0x_a880 <= code && code <= 0x_a881) || // |
6892 | + // Mc [2] SAURASHTRA SIGN ANUSVARA..SAURASHTRA SIGN VISARGA (0x_a8B4 <= |
6893 | + // code && code <= 0x_a8C3) || // Mc [16] SAURASHTRA CONSONANT SIGN |
6894 | + // HAARU..SAURASHTRA VOWEL SIGN AU (0x_a952 <= code && code <= 0x_a953) |
6895 | + // || // Mc [2] REJANG CONSONANT SIGN H..REJANG VIRAMA 0x_a983 == code |
6896 | + // || // Mc JAVANESE SIGN WIGNYAN (0x_a9B4 <= code && code <= |
6897 | + // 0x_a9B5) || // Mc [2] JAVANESE VOWEL SIGN TARUNG..JAVANESE VOWEL SIGN |
6898 | + // TOLONG (0x_a9BA <= code && code <= 0x_a9BB) || // Mc [2] JAVANESE |
6899 | + // VOWEL SIGN TALING..JAVANESE VOWEL SIGN DIRGA MURE (0x_a9BD <= code && |
6900 | + // code <= 0x_a9C0) || // Mc [4] JAVANESE CONSONANT SIGN KERET..JAVANESE |
6901 | + // PANGKON (0x_aA2F <= code && code <= 0x_aA30) || // Mc [2] CHAM VOWEL |
6902 | + // SIGN O..CHAM VOWEL SIGN AI (0x_aA33 <= code && code <= 0x_aA34) || // |
6903 | + // Mc [2] CHAM CONSONANT SIGN YA..CHAM CONSONANT SIGN RA 0x_aA4D == |
6904 | + // code || // Mc CHAM CONSONANT SIGN FINAL H 0x_aAEB == code || // |
6905 | + // Mc MEETEI MAYEK VOWEL SIGN II (0x_aAEE <= code && code <= |
6906 | + // 0x_aAEF) || // Mc [2] MEETEI MAYEK VOWEL SIGN AU..MEETEI MAYEK VOWEL SIGN |
6907 | + // AAU 0x_aAF5 == code || // Mc MEETEI MAYEK VOWEL SIGN VISARGA |
6908 | + // (0x_aBE3 <= code && code <= 0x_aBE4) || // Mc [2] MEETEI MAYEK VOWEL |
6909 | + // SIGN ONAP..MEETEI MAYEK VOWEL SIGN INAP (0x_aBE6 <= code && code <= |
6910 | + // 0x_aBE7) || // Mc [2] MEETEI MAYEK VOWEL SIGN YENAP..MEETEI MAYEK VOWEL |
6911 | + // SIGN SOUNAP (0x_aBE9 <= code && code <= 0x_aBEA) || // Mc [2] MEETEI |
6912 | + // MAYEK VOWEL SIGN CHEINAP..MEETEI MAYEK VOWEL SIGN NUNG 0x_aBEC == code |
6913 | + // || // Mc MEETEI MAYEK LUM IYEK 0x11000 == code || // Mc |
6914 | + // BRAHMI SIGN CANDRABINDU 0x11002 == code || // Mc BRAHMI SIGN |
6915 | + // VISARGA 0x11082 == code || // Mc KAITHI SIGN VISARGA |
6916 | + // (0x110B0 <= code && code <= 0x110B2) || // Mc [3] KAITHI VOWEL SIGN |
6917 | + // AA..KAITHI VOWEL SIGN II (0x110B7 <= code && code <= 0x110B8) || // Mc |
6918 | + // [2] KAITHI VOWEL SIGN O..KAITHI VOWEL SIGN AU 0x1112C == code || // Mc |
6919 | + // CHAKMA VOWEL SIGN E 0x11182 == code || // Mc SHARADA SIGN |
6920 | + // VISARGA (0x111B3 <= code && code <= 0x111B5) || // Mc [3] SHARADA |
6921 | + // VOWEL SIGN AA..SHARADA VOWEL SIGN II (0x111BF <= code && code <= |
6922 | + // 0x111C0) || // Mc [2] SHARADA VOWEL SIGN AU..SHARADA SIGN VIRAMA |
6923 | + // (0x1122C <= code && code <= 0x1122E) || // Mc [3] KHOJKI VOWEL SIGN |
6924 | + // AA..KHOJKI VOWEL SIGN II (0x11232 <= code && code <= 0x11233) || // Mc |
6925 | + // [2] KHOJKI VOWEL SIGN O..KHOJKI VOWEL SIGN AU 0x11235 == code || // Mc |
6926 | + // KHOJKI SIGN VIRAMA (0x112E0 <= code && code <= 0x112E2) || // Mc [3] |
6927 | + // KHUDAWADI VOWEL SIGN AA..KHUDAWADI VOWEL SIGN II (0x11302 <= code && |
6928 | + // code <= 0x11303) || // Mc [2] GRANTHA SIGN ANUSVARA..GRANTHA SIGN VISARGA |
6929 | // 0x1133F == code || // Mc GRANTHA VOWEL SIGN I |
6930 | - // (0x11341 <= code && code <= 0x11344) || // Mc [4] GRANTHA VOWEL SIGN U..GRANTHA VOWEL SIGN VOCALIC RR |
6931 | - // (0x11347 <= code && code <= 0x11348) || // Mc [2] GRANTHA VOWEL SIGN EE..GRANTHA VOWEL SIGN AI |
6932 | - // (0x1134B <= code && code <= 0x1134D) || // Mc [3] GRANTHA VOWEL SIGN OO..GRANTHA SIGN VIRAMA |
6933 | - // (0x11362 <= code && code <= 0x11363) || // Mc [2] GRANTHA VOWEL SIGN VOCALIC L..GRANTHA VOWEL SIGN VOCALIC LL |
6934 | - // (0x11435 <= code && code <= 0x11437) || // Mc [3] NEWA VOWEL SIGN AA..NEWA VOWEL SIGN II |
6935 | - // (0x11440 <= code && code <= 0x11441) || // Mc [2] NEWA VOWEL SIGN O..NEWA VOWEL SIGN AU |
6936 | - // 0x11445 == code || // Mc NEWA SIGN VISARGA |
6937 | - // (0x114B1 <= code && code <= 0x114B2) || // Mc [2] TIRHUTA VOWEL SIGN I..TIRHUTA VOWEL SIGN II |
6938 | - // 0x114B9 == code || // Mc TIRHUTA VOWEL SIGN E |
6939 | - // (0x114BB <= code && code <= 0x114BC) || // Mc [2] TIRHUTA VOWEL SIGN AI..TIRHUTA VOWEL SIGN O |
6940 | - // 0x114BE == code || // Mc TIRHUTA VOWEL SIGN AU |
6941 | - // 0x114C1 == code || // Mc TIRHUTA SIGN VISARGA |
6942 | - // (0x115B0 <= code && code <= 0x115B1) || // Mc [2] SIDDHAM VOWEL SIGN I..SIDDHAM VOWEL SIGN II |
6943 | - // (0x115B8 <= code && code <= 0x115BB) || // Mc [4] SIDDHAM VOWEL SIGN E..SIDDHAM VOWEL SIGN AU |
6944 | + // (0x11341 <= code && code <= 0x11344) || // Mc [4] GRANTHA VOWEL SIGN |
6945 | + // U..GRANTHA VOWEL SIGN VOCALIC RR (0x11347 <= code && code <= 0x11348) |
6946 | + // || // Mc [2] GRANTHA VOWEL SIGN EE..GRANTHA VOWEL SIGN AI (0x1134B |
6947 | + // <= code && code <= 0x1134D) || // Mc [3] GRANTHA VOWEL SIGN OO..GRANTHA |
6948 | + // SIGN VIRAMA (0x11362 <= code && code <= 0x11363) || // Mc [2] |
6949 | + // GRANTHA VOWEL SIGN VOCALIC L..GRANTHA VOWEL SIGN VOCALIC LL (0x11435 |
6950 | + // <= code && code <= 0x11437) || // Mc [3] NEWA VOWEL SIGN AA..NEWA VOWEL |
6951 | + // SIGN II (0x11440 <= code && code <= 0x11441) || // Mc [2] NEWA VOWEL |
6952 | + // SIGN O..NEWA VOWEL SIGN AU 0x11445 == code || // Mc NEWA SIGN |
6953 | + // VISARGA (0x114B1 <= code && code <= 0x114B2) || // Mc [2] TIRHUTA |
6954 | + // VOWEL SIGN I..TIRHUTA VOWEL SIGN II 0x114B9 == code || // Mc |
6955 | + // TIRHUTA VOWEL SIGN E (0x114BB <= code && code <= 0x114BC) || // Mc |
6956 | + // [2] TIRHUTA VOWEL SIGN AI..TIRHUTA VOWEL SIGN O 0x114BE == code || // |
6957 | + // Mc TIRHUTA VOWEL SIGN AU 0x114C1 == code || // Mc TIRHUTA |
6958 | + // SIGN VISARGA (0x115B0 <= code && code <= 0x115B1) || // Mc [2] |
6959 | + // SIDDHAM VOWEL SIGN I..SIDDHAM VOWEL SIGN II (0x115B8 <= code && code |
6960 | + // <= 0x115BB) || // Mc [4] SIDDHAM VOWEL SIGN E..SIDDHAM VOWEL SIGN AU |
6961 | // 0x115BE == code || // Mc SIDDHAM SIGN VISARGA |
6962 | - // (0x11630 <= code && code <= 0x11632) || // Mc [3] MODI VOWEL SIGN AA..MODI VOWEL SIGN II |
6963 | - // (0x1163B <= code && code <= 0x1163C) || // Mc [2] MODI VOWEL SIGN O..MODI VOWEL SIGN AU |
6964 | - // 0x1163E == code || // Mc MODI SIGN VISARGA |
6965 | - // 0x116AC == code || // Mc TAKRI SIGN VISARGA |
6966 | - // (0x116AE <= code && code <= 0x116AF) || // Mc [2] TAKRI VOWEL SIGN I..TAKRI VOWEL SIGN II |
6967 | - // 0x116B6 == code || // Mc TAKRI SIGN VIRAMA |
6968 | - // (0x11720 <= code && code <= 0x11721) || // Mc [2] AHOM VOWEL SIGN A..AHOM VOWEL SIGN AA |
6969 | - // 0x11726 == code || // Mc AHOM VOWEL SIGN E |
6970 | - // (0x11A07 <= code && code <= 0x11A08) || // Mc [2] ZANABAZAR SQUARE VOWEL SIGN AI..ZANABAZAR SQUARE VOWEL SIGN AU |
6971 | - // 0x11A39 == code || // Mc ZANABAZAR SQUARE SIGN VISARGA |
6972 | - // (0x11A57 <= code && code <= 0x11A58) || // Mc [2] SOYOMBO VOWEL SIGN AI..SOYOMBO VOWEL SIGN AU |
6973 | + // (0x11630 <= code && code <= 0x11632) || // Mc [3] MODI VOWEL SIGN |
6974 | + // AA..MODI VOWEL SIGN II (0x1163B <= code && code <= 0x1163C) || // Mc |
6975 | + // [2] MODI VOWEL SIGN O..MODI VOWEL SIGN AU 0x1163E == code || // Mc |
6976 | + // MODI SIGN VISARGA 0x116AC == code || // Mc TAKRI SIGN VISARGA |
6977 | + // (0x116AE <= code && code <= 0x116AF) || // Mc [2] TAKRI VOWEL SIGN |
6978 | + // I..TAKRI VOWEL SIGN II 0x116B6 == code || // Mc TAKRI SIGN |
6979 | + // VIRAMA (0x11720 <= code && code <= 0x11721) || // Mc [2] AHOM VOWEL |
6980 | + // SIGN A..AHOM VOWEL SIGN AA 0x11726 == code || // Mc AHOM VOWEL |
6981 | + // SIGN E (0x11A07 <= code && code <= 0x11A08) || // Mc [2] ZANABAZAR |
6982 | + // SQUARE VOWEL SIGN AI..ZANABAZAR SQUARE VOWEL SIGN AU 0x11A39 == code |
6983 | + // || // Mc ZANABAZAR SQUARE SIGN VISARGA (0x11A57 <= code && code |
6984 | + // <= 0x11A58) || // Mc [2] SOYOMBO VOWEL SIGN AI..SOYOMBO VOWEL SIGN AU |
6985 | // 0x11A97 == code || // Mc SOYOMBO SIGN VISARGA |
6986 | // 0x11C2F == code || // Mc BHAIKSUKI VOWEL SIGN AA |
6987 | // 0x11C3E == code || // Mc BHAIKSUKI SIGN VISARGA |
6988 | // 0x11CA9 == code || // Mc MARCHEN SUBJOINED LETTER YA |
6989 | // 0x11CB1 == code || // Mc MARCHEN VOWEL SIGN I |
6990 | // 0x11CB4 == code || // Mc MARCHEN VOWEL SIGN O |
6991 | - // (0x16F51 <= code && code <= 0x16F7E) || // Mc [46] MIAO SIGN ASPIRATION..MIAO VOWEL SIGN NG |
6992 | - // 0x1D166 == code || // Mc MUSICAL SYMBOL COMBINING SPRECHGESANG STEM |
6993 | - // 0x1D16D == code // Mc MUSICAL SYMBOL COMBINING AUGMENTATION DOT |
6994 | - // ){ |
6995 | + // (0x16F51 <= code && code <= 0x16F7E) || // Mc [46] MIAO SIGN |
6996 | + // ASPIRATION..MIAO VOWEL SIGN NG 0x1D166 == code || // Mc MUSICAL |
6997 | + // SYMBOL COMBINING SPRECHGESANG STEM 0x1D16D == code // Mc MUSICAL |
6998 | + // SYMBOL COMBINING AUGMENTATION DOT ){ |
6999 | // return SpacingMark; |
7000 | // } |
7001 | // |
7002 | // |
7003 | // if( |
7004 | - // (0x1100 <= code && code <= 0x115F) || // Lo [96] HANGUL CHOSEONG KIYEOK..HANGUL CHOSEONG FILLER |
7005 | - // (0x_a960 <= code && code <= 0x_a97C) // Lo [29] HANGUL CHOSEONG TIKEUT-MIEUM..HANGUL CHOSEONG SSANGYEORINHIEUH |
7006 | - // ){ |
7007 | + // (0x1100 <= code && code <= 0x115F) || // Lo [96] HANGUL CHOSEONG |
7008 | + // KIYEOK..HANGUL CHOSEONG FILLER (0x_a960 <= code && code <= 0x_a97C) // |
7009 | + // Lo [29] HANGUL CHOSEONG TIKEUT-MIEUM..HANGUL CHOSEONG SSANGYEORINHIEUH ){ |
7010 | // return L; |
7011 | // } |
7012 | // |
7013 | // if( |
7014 | - // (0x1160 <= code && code <= 0x11A7) || // Lo [72] HANGUL JUNGSEONG FILLER..HANGUL JUNGSEONG O-YAE |
7015 | - // (0x_d7B0 <= code && code <= 0x_d7C6) // Lo [23] HANGUL JUNGSEONG O-YEO..HANGUL JUNGSEONG ARAEA-E |
7016 | - // ){ |
7017 | + // (0x1160 <= code && code <= 0x11A7) || // Lo [72] HANGUL JUNGSEONG |
7018 | + // FILLER..HANGUL JUNGSEONG O-YAE (0x_d7B0 <= code && code <= 0x_d7C6) // |
7019 | + // Lo [23] HANGUL JUNGSEONG O-YEO..HANGUL JUNGSEONG ARAEA-E ){ |
7020 | // return V; |
7021 | // } |
7022 | // |
7023 | // |
7024 | // if( |
7025 | - // (0x11A8 <= code && code <= 0x11FF) || // Lo [88] HANGUL JONGSEONG KIYEOK..HANGUL JONGSEONG SSANGNIEUN |
7026 | - // (0x_d7CB <= code && code <= 0x_d7FB) // Lo [49] HANGUL JONGSEONG NIEUN-RIEUL..HANGUL JONGSEONG PHIEUPH-THIEUTH |
7027 | - // ){ |
7028 | + // (0x11A8 <= code && code <= 0x11FF) || // Lo [88] HANGUL JONGSEONG |
7029 | + // KIYEOK..HANGUL JONGSEONG SSANGNIEUN (0x_d7CB <= code && code <= |
7030 | + // 0x_d7FB) // Lo [49] HANGUL JONGSEONG NIEUN-RIEUL..HANGUL JONGSEONG |
7031 | + // PHIEUPH-THIEUTH ){ |
7032 | // return T; |
7033 | // } |
7034 | // |
7035 | @@ -1397,448 +1533,601 @@ pub fn word_break_string(s: &str, width: usize) -> Vec<&str> { |
7036 | // } |
7037 | // |
7038 | // if( |
7039 | - // (0x_aC01 <= code && code <= 0x_aC1B) || // Lo [27] HANGUL SYLLABLE GAG..HANGUL SYLLABLE GAH |
7040 | - // (0x_aC1D <= code && code <= 0x_aC37) || // Lo [27] HANGUL SYLLABLE GAEG..HANGUL SYLLABLE GAEH |
7041 | - // (0x_aC39 <= code && code <= 0x_aC53) || // Lo [27] HANGUL SYLLABLE GYAG..HANGUL SYLLABLE GYAH |
7042 | - // (0x_aC55 <= code && code <= 0x_aC6F) || // Lo [27] HANGUL SYLLABLE GYAEG..HANGUL SYLLABLE GYAEH |
7043 | - // (0x_aC71 <= code && code <= 0x_aC8B) || // Lo [27] HANGUL SYLLABLE GEOG..HANGUL SYLLABLE GEOH |
7044 | - // (0x_aC8D <= code && code <= 0x_aCA7) || // Lo [27] HANGUL SYLLABLE GEG..HANGUL SYLLABLE GEH |
7045 | - // (0x_aCA9 <= code && code <= 0x_aCC3) || // Lo [27] HANGUL SYLLABLE GYEOG..HANGUL SYLLABLE GYEOH |
7046 | - // (0x_aCC5 <= code && code <= 0x_aCDF) || // Lo [27] HANGUL SYLLABLE GYEG..HANGUL SYLLABLE GYEH |
7047 | - // (0x_aCE1 <= code && code <= 0x_aCFB) || // Lo [27] HANGUL SYLLABLE GOG..HANGUL SYLLABLE GOH |
7048 | - // (0x_aCFD <= code && code <= 0x_aD17) || // Lo [27] HANGUL SYLLABLE GWAG..HANGUL SYLLABLE GWAH |
7049 | - // (0x_aD19 <= code && code <= 0x_aD33) || // Lo [27] HANGUL SYLLABLE GWAEG..HANGUL SYLLABLE GWAEH |
7050 | - // (0x_aD35 <= code && code <= 0x_aD4F) || // Lo [27] HANGUL SYLLABLE GOEG..HANGUL SYLLABLE GOEH |
7051 | - // (0x_aD51 <= code && code <= 0x_aD6B) || // Lo [27] HANGUL SYLLABLE GYOG..HANGUL SYLLABLE GYOH |
7052 | - // (0x_aD6D <= code && code <= 0x_aD87) || // Lo [27] HANGUL SYLLABLE GUG..HANGUL SYLLABLE GUH |
7053 | - // (0x_aD89 <= code && code <= 0x_aDA3) || // Lo [27] HANGUL SYLLABLE GWEOG..HANGUL SYLLABLE GWEOH |
7054 | - // (0x_aDA5 <= code && code <= 0x_aDBF) || // Lo [27] HANGUL SYLLABLE GWEG..HANGUL SYLLABLE GWEH |
7055 | - // (0x_aDC1 <= code && code <= 0x_aDDB) || // Lo [27] HANGUL SYLLABLE GWIG..HANGUL SYLLABLE GWIH |
7056 | - // (0x_aDDD <= code && code <= 0x_aDF7) || // Lo [27] HANGUL SYLLABLE GYUG..HANGUL SYLLABLE GYUH |
7057 | - // (0x_aDF9 <= code && code <= 0x_aE13) || // Lo [27] HANGUL SYLLABLE GEUG..HANGUL SYLLABLE GEUH |
7058 | - // (0x_aE15 <= code && code <= 0x_aE2F) || // Lo [27] HANGUL SYLLABLE GYIG..HANGUL SYLLABLE GYIH |
7059 | - // (0x_aE31 <= code && code <= 0x_aE4B) || // Lo [27] HANGUL SYLLABLE GIG..HANGUL SYLLABLE GIH |
7060 | - // (0x_aE4D <= code && code <= 0x_aE67) || // Lo [27] HANGUL SYLLABLE GGAG..HANGUL SYLLABLE GGAH |
7061 | - // (0x_aE69 <= code && code <= 0x_aE83) || // Lo [27] HANGUL SYLLABLE GGAEG..HANGUL SYLLABLE GGAEH |
7062 | - // (0x_aE85 <= code && code <= 0x_aE9F) || // Lo [27] HANGUL SYLLABLE GGYAG..HANGUL SYLLABLE GGYAH |
7063 | - // (0x_aEA1 <= code && code <= 0x_aEBB) || // Lo [27] HANGUL SYLLABLE GGYAEG..HANGUL SYLLABLE GGYAEH |
7064 | - // (0x_aEBD <= code && code <= 0x_aED7) || // Lo [27] HANGUL SYLLABLE GGEOG..HANGUL SYLLABLE GGEOH |
7065 | - // (0x_aED9 <= code && code <= 0x_aEF3) || // Lo [27] HANGUL SYLLABLE GGEG..HANGUL SYLLABLE GGEH |
7066 | - // (0x_aEF5 <= code && code <= 0x_aF0F) || // Lo [27] HANGUL SYLLABLE GGYEOG..HANGUL SYLLABLE GGYEOH |
7067 | - // (0x_aF11 <= code && code <= 0x_aF2B) || // Lo [27] HANGUL SYLLABLE GGYEG..HANGUL SYLLABLE GGYEH |
7068 | - // (0x_aF2D <= code && code <= 0x_aF47) || // Lo [27] HANGUL SYLLABLE GGOG..HANGUL SYLLABLE GGOH |
7069 | - // (0x_aF49 <= code && code <= 0x_aF63) || // Lo [27] HANGUL SYLLABLE GGWAG..HANGUL SYLLABLE GGWAH |
7070 | - // (0x_aF65 <= code && code <= 0x_aF7F) || // Lo [27] HANGUL SYLLABLE GGWAEG..HANGUL SYLLABLE GGWAEH |
7071 | - // (0x_aF81 <= code && code <= 0x_aF9B) || // Lo [27] HANGUL SYLLABLE GGOEG..HANGUL SYLLABLE GGOEH |
7072 | - // (0x_aF9D <= code && code <= 0x_aFB7) || // Lo [27] HANGUL SYLLABLE GGYOG..HANGUL SYLLABLE GGYOH |
7073 | - // (0x_aFB9 <= code && code <= 0x_aFD3) || // Lo [27] HANGUL SYLLABLE GGUG..HANGUL SYLLABLE GGUH |
7074 | - // (0x_aFD5 <= code && code <= 0x_aFEF) || // Lo [27] HANGUL SYLLABLE GGWEOG..HANGUL SYLLABLE GGWEOH |
7075 | - // (0x_aFF1 <= code && code <= 0x_b00B) || // Lo [27] HANGUL SYLLABLE GGWEG..HANGUL SYLLABLE GGWEH |
7076 | - // (0x_b00D <= code && code <= 0x_b027) || // Lo [27] HANGUL SYLLABLE GGWIG..HANGUL SYLLABLE GGWIH |
7077 | - // (0x_b029 <= code && code <= 0x_b043) || // Lo [27] HANGUL SYLLABLE GGYUG..HANGUL SYLLABLE GGYUH |
7078 | - // (0x_b045 <= code && code <= 0x_b05F) || // Lo [27] HANGUL SYLLABLE GGEUG..HANGUL SYLLABLE GGEUH |
7079 | - // (0x_b061 <= code && code <= 0x_b07B) || // Lo [27] HANGUL SYLLABLE GGYIG..HANGUL SYLLABLE GGYIH |
7080 | - // (0x_b07D <= code && code <= 0x_b097) || // Lo [27] HANGUL SYLLABLE GGIG..HANGUL SYLLABLE GGIH |
7081 | - // (0x_b099 <= code && code <= 0x_b0B3) || // Lo [27] HANGUL SYLLABLE NAG..HANGUL SYLLABLE NAH |
7082 | - // (0x_b0B5 <= code && code <= 0x_b0CF) || // Lo [27] HANGUL SYLLABLE NAEG..HANGUL SYLLABLE NAEH |
7083 | - // (0x_b0D1 <= code && code <= 0x_b0EB) || // Lo [27] HANGUL SYLLABLE NYAG..HANGUL SYLLABLE NYAH |
7084 | - // (0x_b0ED <= code && code <= 0x_b107) || // Lo [27] HANGUL SYLLABLE NYAEG..HANGUL SYLLABLE NYAEH |
7085 | - // (0x_b109 <= code && code <= 0x_b123) || // Lo [27] HANGUL SYLLABLE NEOG..HANGUL SYLLABLE NEOH |
7086 | - // (0x_b125 <= code && code <= 0x_b13F) || // Lo [27] HANGUL SYLLABLE NEG..HANGUL SYLLABLE NEH |
7087 | - // (0x_b141 <= code && code <= 0x_b15B) || // Lo [27] HANGUL SYLLABLE NYEOG..HANGUL SYLLABLE NYEOH |
7088 | - // (0x_b15D <= code && code <= 0x_b177) || // Lo [27] HANGUL SYLLABLE NYEG..HANGUL SYLLABLE NYEH |
7089 | - // (0x_b179 <= code && code <= 0x_b193) || // Lo [27] HANGUL SYLLABLE NOG..HANGUL SYLLABLE NOH |
7090 | - // (0x_b195 <= code && code <= 0x_b1AF) || // Lo [27] HANGUL SYLLABLE NWAG..HANGUL SYLLABLE NWAH |
7091 | - // (0x_b1B1 <= code && code <= 0x_b1CB) || // Lo [27] HANGUL SYLLABLE NWAEG..HANGUL SYLLABLE NWAEH |
7092 | - // (0x_b1CD <= code && code <= 0x_b1E7) || // Lo [27] HANGUL SYLLABLE NOEG..HANGUL SYLLABLE NOEH |
7093 | - // (0x_b1E9 <= code && code <= 0x_b203) || // Lo [27] HANGUL SYLLABLE NYOG..HANGUL SYLLABLE NYOH |
7094 | - // (0x_b205 <= code && code <= 0x_b21F) || // Lo [27] HANGUL SYLLABLE NUG..HANGUL SYLLABLE NUH |
7095 | - // (0x_b221 <= code && code <= 0x_b23B) || // Lo [27] HANGUL SYLLABLE NWEOG..HANGUL SYLLABLE NWEOH |
7096 | - // (0x_b23D <= code && code <= 0x_b257) || // Lo [27] HANGUL SYLLABLE NWEG..HANGUL SYLLABLE NWEH |
7097 | - // (0x_b259 <= code && code <= 0x_b273) || // Lo [27] HANGUL SYLLABLE NWIG..HANGUL SYLLABLE NWIH |
7098 | - // (0x_b275 <= code && code <= 0x_b28F) || // Lo [27] HANGUL SYLLABLE NYUG..HANGUL SYLLABLE NYUH |
7099 | - // (0x_b291 <= code && code <= 0x_b2AB) || // Lo [27] HANGUL SYLLABLE NEUG..HANGUL SYLLABLE NEUH |
7100 | - // (0x_b2AD <= code && code <= 0x_b2C7) || // Lo [27] HANGUL SYLLABLE NYIG..HANGUL SYLLABLE NYIH |
7101 | - // (0x_b2C9 <= code && code <= 0x_b2E3) || // Lo [27] HANGUL SYLLABLE NIG..HANGUL SYLLABLE NIH |
7102 | - // (0x_b2E5 <= code && code <= 0x_b2FF) || // Lo [27] HANGUL SYLLABLE DAG..HANGUL SYLLABLE DAH |
7103 | - // (0x_b301 <= code && code <= 0x_b31B) || // Lo [27] HANGUL SYLLABLE DAEG..HANGUL SYLLABLE DAEH |
7104 | - // (0x_b31D <= code && code <= 0x_b337) || // Lo [27] HANGUL SYLLABLE DYAG..HANGUL SYLLABLE DYAH |
7105 | - // (0x_b339 <= code && code <= 0x_b353) || // Lo [27] HANGUL SYLLABLE DYAEG..HANGUL SYLLABLE DYAEH |
7106 | - // (0x_b355 <= code && code <= 0x_b36F) || // Lo [27] HANGUL SYLLABLE DEOG..HANGUL SYLLABLE DEOH |
7107 | - // (0x_b371 <= code && code <= 0x_b38B) || // Lo [27] HANGUL SYLLABLE DEG..HANGUL SYLLABLE DEH |
7108 | - // (0x_b38D <= code && code <= 0x_b3A7) || // Lo [27] HANGUL SYLLABLE DYEOG..HANGUL SYLLABLE DYEOH |
7109 | - // (0x_b3A9 <= code && code <= 0x_b3C3) || // Lo [27] HANGUL SYLLABLE DYEG..HANGUL SYLLABLE DYEH |
7110 | - // (0x_b3C5 <= code && code <= 0x_b3DF) || // Lo [27] HANGUL SYLLABLE DOG..HANGUL SYLLABLE DOH |
7111 | - // (0x_b3E1 <= code && code <= 0x_b3FB) || // Lo [27] HANGUL SYLLABLE DWAG..HANGUL SYLLABLE DWAH |
7112 | - // (0x_b3FD <= code && code <= 0x_b417) || // Lo [27] HANGUL SYLLABLE DWAEG..HANGUL SYLLABLE DWAEH |
7113 | - // (0x_b419 <= code && code <= 0x_b433) || // Lo [27] HANGUL SYLLABLE DOEG..HANGUL SYLLABLE DOEH |
7114 | - // (0x_b435 <= code && code <= 0x_b44F) || // Lo [27] HANGUL SYLLABLE DYOG..HANGUL SYLLABLE DYOH |
7115 | - // (0x_b451 <= code && code <= 0x_b46B) || // Lo [27] HANGUL SYLLABLE DUG..HANGUL SYLLABLE DUH |
7116 | - // (0x_b46D <= code && code <= 0x_b487) || // Lo [27] HANGUL SYLLABLE DWEOG..HANGUL SYLLABLE DWEOH |
7117 | - // (0x_b489 <= code && code <= 0x_b4A3) || // Lo [27] HANGUL SYLLABLE DWEG..HANGUL SYLLABLE DWEH |
7118 | - // (0x_b4A5 <= code && code <= 0x_b4BF) || // Lo [27] HANGUL SYLLABLE DWIG..HANGUL SYLLABLE DWIH |
7119 | - // (0x_b4C1 <= code && code <= 0x_b4DB) || // Lo [27] HANGUL SYLLABLE DYUG..HANGUL SYLLABLE DYUH |
7120 | - // (0x_b4DD <= code && code <= 0x_b4F7) || // Lo [27] HANGUL SYLLABLE DEUG..HANGUL SYLLABLE DEUH |
7121 | - // (0x_b4F9 <= code && code <= 0x_b513) || // Lo [27] HANGUL SYLLABLE DYIG..HANGUL SYLLABLE DYIH |
7122 | - // (0x_b515 <= code && code <= 0x_b52F) || // Lo [27] HANGUL SYLLABLE DIG..HANGUL SYLLABLE DIH |
7123 | - // (0x_b531 <= code && code <= 0x_b54B) || // Lo [27] HANGUL SYLLABLE DDAG..HANGUL SYLLABLE DDAH |
7124 | - // (0x_b54D <= code && code <= 0x_b567) || // Lo [27] HANGUL SYLLABLE DDAEG..HANGUL SYLLABLE DDAEH |
7125 | - // (0x_b569 <= code && code <= 0x_b583) || // Lo [27] HANGUL SYLLABLE DDYAG..HANGUL SYLLABLE DDYAH |
7126 | - // (0x_b585 <= code && code <= 0x_b59F) || // Lo [27] HANGUL SYLLABLE DDYAEG..HANGUL SYLLABLE DDYAEH |
7127 | - // (0x_b5A1 <= code && code <= 0x_b5BB) || // Lo [27] HANGUL SYLLABLE DDEOG..HANGUL SYLLABLE DDEOH |
7128 | - // (0x_b5BD <= code && code <= 0x_b5D7) || // Lo [27] HANGUL SYLLABLE DDEG..HANGUL SYLLABLE DDEH |
7129 | - // (0x_b5D9 <= code && code <= 0x_b5F3) || // Lo [27] HANGUL SYLLABLE DDYEOG..HANGUL SYLLABLE DDYEOH |
7130 | - // (0x_b5F5 <= code && code <= 0x_b60F) || // Lo [27] HANGUL SYLLABLE DDYEG..HANGUL SYLLABLE DDYEH |
7131 | - // (0x_b611 <= code && code <= 0x_b62B) || // Lo [27] HANGUL SYLLABLE DDOG..HANGUL SYLLABLE DDOH |
7132 | - // (0x_b62D <= code && code <= 0x_b647) || // Lo [27] HANGUL SYLLABLE DDWAG..HANGUL SYLLABLE DDWAH |
7133 | - // (0x_b649 <= code && code <= 0x_b663) || // Lo [27] HANGUL SYLLABLE DDWAEG..HANGUL SYLLABLE DDWAEH |
7134 | - // (0x_b665 <= code && code <= 0x_b67F) || // Lo [27] HANGUL SYLLABLE DDOEG..HANGUL SYLLABLE DDOEH |
7135 | - // (0x_b681 <= code && code <= 0x_b69B) || // Lo [27] HANGUL SYLLABLE DDYOG..HANGUL SYLLABLE DDYOH |
7136 | - // (0x_b69D <= code && code <= 0x_b6B7) || // Lo [27] HANGUL SYLLABLE DDUG..HANGUL SYLLABLE DDUH |
7137 | - // (0x_b6B9 <= code && code <= 0x_b6D3) || // Lo [27] HANGUL SYLLABLE DDWEOG..HANGUL SYLLABLE DDWEOH |
7138 | - // (0x_b6D5 <= code && code <= 0x_b6EF) || // Lo [27] HANGUL SYLLABLE DDWEG..HANGUL SYLLABLE DDWEH |
7139 | - // (0x_b6F1 <= code && code <= 0x_b70B) || // Lo [27] HANGUL SYLLABLE DDWIG..HANGUL SYLLABLE DDWIH |
7140 | - // (0x_b70D <= code && code <= 0x_b727) || // Lo [27] HANGUL SYLLABLE DDYUG..HANGUL SYLLABLE DDYUH |
7141 | - // (0x_b729 <= code && code <= 0x_b743) || // Lo [27] HANGUL SYLLABLE DDEUG..HANGUL SYLLABLE DDEUH |
7142 | - // (0x_b745 <= code && code <= 0x_b75F) || // Lo [27] HANGUL SYLLABLE DDYIG..HANGUL SYLLABLE DDYIH |
7143 | - // (0x_b761 <= code && code <= 0x_b77B) || // Lo [27] HANGUL SYLLABLE DDIG..HANGUL SYLLABLE DDIH |
7144 | - // (0x_b77D <= code && code <= 0x_b797) || // Lo [27] HANGUL SYLLABLE RAG..HANGUL SYLLABLE RAH |
7145 | - // (0x_b799 <= code && code <= 0x_b7B3) || // Lo [27] HANGUL SYLLABLE RAEG..HANGUL SYLLABLE RAEH |
7146 | - // (0x_b7B5 <= code && code <= 0x_b7CF) || // Lo [27] HANGUL SYLLABLE RYAG..HANGUL SYLLABLE RYAH |
7147 | - // (0x_b7D1 <= code && code <= 0x_b7EB) || // Lo [27] HANGUL SYLLABLE RYAEG..HANGUL SYLLABLE RYAEH |
7148 | - // (0x_b7ED <= code && code <= 0x_b807) || // Lo [27] HANGUL SYLLABLE REOG..HANGUL SYLLABLE REOH |
7149 | - // (0x_b809 <= code && code <= 0x_b823) || // Lo [27] HANGUL SYLLABLE REG..HANGUL SYLLABLE REH |
7150 | - // (0x_b825 <= code && code <= 0x_b83F) || // Lo [27] HANGUL SYLLABLE RYEOG..HANGUL SYLLABLE RYEOH |
7151 | - // (0x_b841 <= code && code <= 0x_b85B) || // Lo [27] HANGUL SYLLABLE RYEG..HANGUL SYLLABLE RYEH |
7152 | - // (0x_b85D <= code && code <= 0x_b877) || // Lo [27] HANGUL SYLLABLE ROG..HANGUL SYLLABLE ROH |
7153 | - // (0x_b879 <= code && code <= 0x_b893) || // Lo [27] HANGUL SYLLABLE RWAG..HANGUL SYLLABLE RWAH |
7154 | - // (0x_b895 <= code && code <= 0x_b8AF) || // Lo [27] HANGUL SYLLABLE RWAEG..HANGUL SYLLABLE RWAEH |
7155 | - // (0x_b8B1 <= code && code <= 0x_b8CB) || // Lo [27] HANGUL SYLLABLE ROEG..HANGUL SYLLABLE ROEH |
7156 | - // (0x_b8CD <= code && code <= 0x_b8E7) || // Lo [27] HANGUL SYLLABLE RYOG..HANGUL SYLLABLE RYOH |
7157 | - // (0x_b8E9 <= code && code <= 0x_b903) || // Lo [27] HANGUL SYLLABLE RUG..HANGUL SYLLABLE RUH |
7158 | - // (0x_b905 <= code && code <= 0x_b91F) || // Lo [27] HANGUL SYLLABLE RWEOG..HANGUL SYLLABLE RWEOH |
7159 | - // (0x_b921 <= code && code <= 0x_b93B) || // Lo [27] HANGUL SYLLABLE RWEG..HANGUL SYLLABLE RWEH |
7160 | - // (0x_b93D <= code && code <= 0x_b957) || // Lo [27] HANGUL SYLLABLE RWIG..HANGUL SYLLABLE RWIH |
7161 | - // (0x_b959 <= code && code <= 0x_b973) || // Lo [27] HANGUL SYLLABLE RYUG..HANGUL SYLLABLE RYUH |
7162 | - // (0x_b975 <= code && code <= 0x_b98F) || // Lo [27] HANGUL SYLLABLE REUG..HANGUL SYLLABLE REUH |
7163 | - // (0x_b991 <= code && code <= 0x_b9AB) || // Lo [27] HANGUL SYLLABLE RYIG..HANGUL SYLLABLE RYIH |
7164 | - // (0x_b9AD <= code && code <= 0x_b9C7) || // Lo [27] HANGUL SYLLABLE RIG..HANGUL SYLLABLE RIH |
7165 | - // (0x_b9C9 <= code && code <= 0x_b9E3) || // Lo [27] HANGUL SYLLABLE MAG..HANGUL SYLLABLE MAH |
7166 | - // (0x_b9E5 <= code && code <= 0x_b9FF) || // Lo [27] HANGUL SYLLABLE MAEG..HANGUL SYLLABLE MAEH |
7167 | - // (0x_bA01 <= code && code <= 0x_bA1B) || // Lo [27] HANGUL SYLLABLE MYAG..HANGUL SYLLABLE MYAH |
7168 | - // (0x_bA1D <= code && code <= 0x_bA37) || // Lo [27] HANGUL SYLLABLE MYAEG..HANGUL SYLLABLE MYAEH |
7169 | - // (0x_bA39 <= code && code <= 0x_bA53) || // Lo [27] HANGUL SYLLABLE MEOG..HANGUL SYLLABLE MEOH |
7170 | - // (0x_bA55 <= code && code <= 0x_bA6F) || // Lo [27] HANGUL SYLLABLE MEG..HANGUL SYLLABLE MEH |
7171 | - // (0x_bA71 <= code && code <= 0x_bA8B) || // Lo [27] HANGUL SYLLABLE MYEOG..HANGUL SYLLABLE MYEOH |
7172 | - // (0x_bA8D <= code && code <= 0x_bAA7) || // Lo [27] HANGUL SYLLABLE MYEG..HANGUL SYLLABLE MYEH |
7173 | - // (0x_bAA9 <= code && code <= 0x_bAC3) || // Lo [27] HANGUL SYLLABLE MOG..HANGUL SYLLABLE MOH |
7174 | - // (0x_bAC5 <= code && code <= 0x_bADF) || // Lo [27] HANGUL SYLLABLE MWAG..HANGUL SYLLABLE MWAH |
7175 | - // (0x_bAE1 <= code && code <= 0x_bAFB) || // Lo [27] HANGUL SYLLABLE MWAEG..HANGUL SYLLABLE MWAEH |
7176 | - // (0x_bAFD <= code && code <= 0x_bB17) || // Lo [27] HANGUL SYLLABLE MOEG..HANGUL SYLLABLE MOEH |
7177 | - // (0x_bB19 <= code && code <= 0x_bB33) || // Lo [27] HANGUL SYLLABLE MYOG..HANGUL SYLLABLE MYOH |
7178 | - // (0x_bB35 <= code && code <= 0x_bB4F) || // Lo [27] HANGUL SYLLABLE MUG..HANGUL SYLLABLE MUH |
7179 | - // (0x_bB51 <= code && code <= 0x_bB6B) || // Lo [27] HANGUL SYLLABLE MWEOG..HANGUL SYLLABLE MWEOH |
7180 | - // (0x_bB6D <= code && code <= 0x_bB87) || // Lo [27] HANGUL SYLLABLE MWEG..HANGUL SYLLABLE MWEH |
7181 | - // (0x_bB89 <= code && code <= 0x_bBA3) || // Lo [27] HANGUL SYLLABLE MWIG..HANGUL SYLLABLE MWIH |
7182 | - // (0x_bBA5 <= code && code <= 0x_bBBF) || // Lo [27] HANGUL SYLLABLE MYUG..HANGUL SYLLABLE MYUH |
7183 | - // (0x_bBC1 <= code && code <= 0x_bBDB) || // Lo [27] HANGUL SYLLABLE MEUG..HANGUL SYLLABLE MEUH |
7184 | - // (0x_bBDD <= code && code <= 0x_bBF7) || // Lo [27] HANGUL SYLLABLE MYIG..HANGUL SYLLABLE MYIH |
7185 | - // (0x_bBF9 <= code && code <= 0x_bC13) || // Lo [27] HANGUL SYLLABLE MIG..HANGUL SYLLABLE MIH |
7186 | - // (0x_bC15 <= code && code <= 0x_bC2F) || // Lo [27] HANGUL SYLLABLE BAG..HANGUL SYLLABLE BAH |
7187 | - // (0x_bC31 <= code && code <= 0x_bC4B) || // Lo [27] HANGUL SYLLABLE BAEG..HANGUL SYLLABLE BAEH |
7188 | - // (0x_bC4D <= code && code <= 0x_bC67) || // Lo [27] HANGUL SYLLABLE BYAG..HANGUL SYLLABLE BYAH |
7189 | - // (0x_bC69 <= code && code <= 0x_bC83) || // Lo [27] HANGUL SYLLABLE BYAEG..HANGUL SYLLABLE BYAEH |
7190 | - // (0x_bC85 <= code && code <= 0x_bC9F) || // Lo [27] HANGUL SYLLABLE BEOG..HANGUL SYLLABLE BEOH |
7191 | - // (0x_bCA1 <= code && code <= 0x_bCBB) || // Lo [27] HANGUL SYLLABLE BEG..HANGUL SYLLABLE BEH |
7192 | - // (0x_bCBD <= code && code <= 0x_bCD7) || // Lo [27] HANGUL SYLLABLE BYEOG..HANGUL SYLLABLE BYEOH |
7193 | - // (0x_bCD9 <= code && code <= 0x_bCF3) || // Lo [27] HANGUL SYLLABLE BYEG..HANGUL SYLLABLE BYEH |
7194 | - // (0x_bCF5 <= code && code <= 0x_bD0F) || // Lo [27] HANGUL SYLLABLE BOG..HANGUL SYLLABLE BOH |
7195 | - // (0x_bD11 <= code && code <= 0x_bD2B) || // Lo [27] HANGUL SYLLABLE BWAG..HANGUL SYLLABLE BWAH |
7196 | - // (0x_bD2D <= code && code <= 0x_bD47) || // Lo [27] HANGUL SYLLABLE BWAEG..HANGUL SYLLABLE BWAEH |
7197 | - // (0x_bD49 <= code && code <= 0x_bD63) || // Lo [27] HANGUL SYLLABLE BOEG..HANGUL SYLLABLE BOEH |
7198 | - // (0x_bD65 <= code && code <= 0x_bD7F) || // Lo [27] HANGUL SYLLABLE BYOG..HANGUL SYLLABLE BYOH |
7199 | - // (0x_bD81 <= code && code <= 0x_bD9B) || // Lo [27] HANGUL SYLLABLE BUG..HANGUL SYLLABLE BUH |
7200 | - // (0x_bD9D <= code && code <= 0x_bDB7) || // Lo [27] HANGUL SYLLABLE BWEOG..HANGUL SYLLABLE BWEOH |
7201 | - // (0x_bDB9 <= code && code <= 0x_bDD3) || // Lo [27] HANGUL SYLLABLE BWEG..HANGUL SYLLABLE BWEH |
7202 | - // (0x_bDD5 <= code && code <= 0x_bDEF) || // Lo [27] HANGUL SYLLABLE BWIG..HANGUL SYLLABLE BWIH |
7203 | - // (0x_bDF1 <= code && code <= 0x_bE0B) || // Lo [27] HANGUL SYLLABLE BYUG..HANGUL SYLLABLE BYUH |
7204 | - // (0x_bE0D <= code && code <= 0x_bE27) || // Lo [27] HANGUL SYLLABLE BEUG..HANGUL SYLLABLE BEUH |
7205 | - // (0x_bE29 <= code && code <= 0x_bE43) || // Lo [27] HANGUL SYLLABLE BYIG..HANGUL SYLLABLE BYIH |
7206 | - // (0x_bE45 <= code && code <= 0x_bE5F) || // Lo [27] HANGUL SYLLABLE BIG..HANGUL SYLLABLE BIH |
7207 | - // (0x_bE61 <= code && code <= 0x_bE7B) || // Lo [27] HANGUL SYLLABLE BBAG..HANGUL SYLLABLE BBAH |
7208 | - // (0x_bE7D <= code && code <= 0x_bE97) || // Lo [27] HANGUL SYLLABLE BBAEG..HANGUL SYLLABLE BBAEH |
7209 | - // (0x_bE99 <= code && code <= 0x_bEB3) || // Lo [27] HANGUL SYLLABLE BBYAG..HANGUL SYLLABLE BBYAH |
7210 | - // (0x_bEB5 <= code && code <= 0x_bECF) || // Lo [27] HANGUL SYLLABLE BBYAEG..HANGUL SYLLABLE BBYAEH |
7211 | - // (0x_bED1 <= code && code <= 0x_bEEB) || // Lo [27] HANGUL SYLLABLE BBEOG..HANGUL SYLLABLE BBEOH |
7212 | - // (0x_bEED <= code && code <= 0x_bF07) || // Lo [27] HANGUL SYLLABLE BBEG..HANGUL SYLLABLE BBEH |
7213 | - // (0x_bF09 <= code && code <= 0x_bF23) || // Lo [27] HANGUL SYLLABLE BBYEOG..HANGUL SYLLABLE BBYEOH |
7214 | - // (0x_bF25 <= code && code <= 0x_bF3F) || // Lo [27] HANGUL SYLLABLE BBYEG..HANGUL SYLLABLE BBYEH |
7215 | - // (0x_bF41 <= code && code <= 0x_bF5B) || // Lo [27] HANGUL SYLLABLE BBOG..HANGUL SYLLABLE BBOH |
7216 | - // (0x_bF5D <= code && code <= 0x_bF77) || // Lo [27] HANGUL SYLLABLE BBWAG..HANGUL SYLLABLE BBWAH |
7217 | - // (0x_bF79 <= code && code <= 0x_bF93) || // Lo [27] HANGUL SYLLABLE BBWAEG..HANGUL SYLLABLE BBWAEH |
7218 | - // (0x_bF95 <= code && code <= 0x_bFAF) || // Lo [27] HANGUL SYLLABLE BBOEG..HANGUL SYLLABLE BBOEH |
7219 | - // (0x_bFB1 <= code && code <= 0x_bFCB) || // Lo [27] HANGUL SYLLABLE BBYOG..HANGUL SYLLABLE BBYOH |
7220 | - // (0x_bFCD <= code && code <= 0x_bFE7) || // Lo [27] HANGUL SYLLABLE BBUG..HANGUL SYLLABLE BBUH |
7221 | - // (0x_bFE9 <= code && code <= 0x_c003) || // Lo [27] HANGUL SYLLABLE BBWEOG..HANGUL SYLLABLE BBWEOH |
7222 | - // (0x_c005 <= code && code <= 0x_c01F) || // Lo [27] HANGUL SYLLABLE BBWEG..HANGUL SYLLABLE BBWEH |
7223 | - // (0x_c021 <= code && code <= 0x_c03B) || // Lo [27] HANGUL SYLLABLE BBWIG..HANGUL SYLLABLE BBWIH |
7224 | - // (0x_c03D <= code && code <= 0x_c057) || // Lo [27] HANGUL SYLLABLE BBYUG..HANGUL SYLLABLE BBYUH |
7225 | - // (0x_c059 <= code && code <= 0x_c073) || // Lo [27] HANGUL SYLLABLE BBEUG..HANGUL SYLLABLE BBEUH |
7226 | - // (0x_c075 <= code && code <= 0x_c08F) || // Lo [27] HANGUL SYLLABLE BBYIG..HANGUL SYLLABLE BBYIH |
7227 | - // (0x_c091 <= code && code <= 0x_c0AB) || // Lo [27] HANGUL SYLLABLE BBIG..HANGUL SYLLABLE BBIH |
7228 | - // (0x_c0AD <= code && code <= 0x_c0C7) || // Lo [27] HANGUL SYLLABLE SAG..HANGUL SYLLABLE SAH |
7229 | - // (0x_c0C9 <= code && code <= 0x_c0E3) || // Lo [27] HANGUL SYLLABLE SAEG..HANGUL SYLLABLE SAEH |
7230 | - // (0x_c0E5 <= code && code <= 0x_c0FF) || // Lo [27] HANGUL SYLLABLE SYAG..HANGUL SYLLABLE SYAH |
7231 | - // (0x_c101 <= code && code <= 0x_c11B) || // Lo [27] HANGUL SYLLABLE SYAEG..HANGUL SYLLABLE SYAEH |
7232 | - // (0x_c11D <= code && code <= 0x_c137) || // Lo [27] HANGUL SYLLABLE SEOG..HANGUL SYLLABLE SEOH |
7233 | - // (0x_c139 <= code && code <= 0x_c153) || // Lo [27] HANGUL SYLLABLE SEG..HANGUL SYLLABLE SEH |
7234 | - // (0x_c155 <= code && code <= 0x_c16F) || // Lo [27] HANGUL SYLLABLE SYEOG..HANGUL SYLLABLE SYEOH |
7235 | - // (0x_c171 <= code && code <= 0x_c18B) || // Lo [27] HANGUL SYLLABLE SYEG..HANGUL SYLLABLE SYEH |
7236 | - // (0x_c18D <= code && code <= 0x_c1A7) || // Lo [27] HANGUL SYLLABLE SOG..HANGUL SYLLABLE SOH |
7237 | - // (0x_c1A9 <= code && code <= 0x_c1C3) || // Lo [27] HANGUL SYLLABLE SWAG..HANGUL SYLLABLE SWAH |
7238 | - // (0x_c1C5 <= code && code <= 0x_c1DF) || // Lo [27] HANGUL SYLLABLE SWAEG..HANGUL SYLLABLE SWAEH |
7239 | - // (0x_c1E1 <= code && code <= 0x_c1FB) || // Lo [27] HANGUL SYLLABLE SOEG..HANGUL SYLLABLE SOEH |
7240 | - // (0x_c1FD <= code && code <= 0x_c217) || // Lo [27] HANGUL SYLLABLE SYOG..HANGUL SYLLABLE SYOH |
7241 | - // (0x_c219 <= code && code <= 0x_c233) || // Lo [27] HANGUL SYLLABLE SUG..HANGUL SYLLABLE SUH |
7242 | - // (0x_c235 <= code && code <= 0x_c24F) || // Lo [27] HANGUL SYLLABLE SWEOG..HANGUL SYLLABLE SWEOH |
7243 | - // (0x_c251 <= code && code <= 0x_c26B) || // Lo [27] HANGUL SYLLABLE SWEG..HANGUL SYLLABLE SWEH |
7244 | - // (0x_c26D <= code && code <= 0x_c287) || // Lo [27] HANGUL SYLLABLE SWIG..HANGUL SYLLABLE SWIH |
7245 | - // (0x_c289 <= code && code <= 0x_c2A3) || // Lo [27] HANGUL SYLLABLE SYUG..HANGUL SYLLABLE SYUH |
7246 | - // (0x_c2A5 <= code && code <= 0x_c2BF) || // Lo [27] HANGUL SYLLABLE SEUG..HANGUL SYLLABLE SEUH |
7247 | - // (0x_c2C1 <= code && code <= 0x_c2DB) || // Lo [27] HANGUL SYLLABLE SYIG..HANGUL SYLLABLE SYIH |
7248 | - // (0x_c2DD <= code && code <= 0x_c2F7) || // Lo [27] HANGUL SYLLABLE SIG..HANGUL SYLLABLE SIH |
7249 | - // (0x_c2F9 <= code && code <= 0x_c313) || // Lo [27] HANGUL SYLLABLE SSAG..HANGUL SYLLABLE SSAH |
7250 | - // (0x_c315 <= code && code <= 0x_c32F) || // Lo [27] HANGUL SYLLABLE SSAEG..HANGUL SYLLABLE SSAEH |
7251 | - // (0x_c331 <= code && code <= 0x_c34B) || // Lo [27] HANGUL SYLLABLE SSYAG..HANGUL SYLLABLE SSYAH |
7252 | - // (0x_c34D <= code && code <= 0x_c367) || // Lo [27] HANGUL SYLLABLE SSYAEG..HANGUL SYLLABLE SSYAEH |
7253 | - // (0x_c369 <= code && code <= 0x_c383) || // Lo [27] HANGUL SYLLABLE SSEOG..HANGUL SYLLABLE SSEOH |
7254 | - // (0x_c385 <= code && code <= 0x_c39F) || // Lo [27] HANGUL SYLLABLE SSEG..HANGUL SYLLABLE SSEH |
7255 | - // (0x_c3A1 <= code && code <= 0x_c3BB) || // Lo [27] HANGUL SYLLABLE SSYEOG..HANGUL SYLLABLE SSYEOH |
7256 | - // (0x_c3BD <= code && code <= 0x_c3D7) || // Lo [27] HANGUL SYLLABLE SSYEG..HANGUL SYLLABLE SSYEH |
7257 | - // (0x_c3D9 <= code && code <= 0x_c3F3) || // Lo [27] HANGUL SYLLABLE SSOG..HANGUL SYLLABLE SSOH |
7258 | - // (0x_c3F5 <= code && code <= 0x_c40F) || // Lo [27] HANGUL SYLLABLE SSWAG..HANGUL SYLLABLE SSWAH |
7259 | - // (0x_c411 <= code && code <= 0x_c42B) || // Lo [27] HANGUL SYLLABLE SSWAEG..HANGUL SYLLABLE SSWAEH |
7260 | - // (0x_c42D <= code && code <= 0x_c447) || // Lo [27] HANGUL SYLLABLE SSOEG..HANGUL SYLLABLE SSOEH |
7261 | - // (0x_c449 <= code && code <= 0x_c463) || // Lo [27] HANGUL SYLLABLE SSYOG..HANGUL SYLLABLE SSYOH |
7262 | - // (0x_c465 <= code && code <= 0x_c47F) || // Lo [27] HANGUL SYLLABLE SSUG..HANGUL SYLLABLE SSUH |
7263 | - // (0x_c481 <= code && code <= 0x_c49B) || // Lo [27] HANGUL SYLLABLE SSWEOG..HANGUL SYLLABLE SSWEOH |
7264 | - // (0x_c49D <= code && code <= 0x_c4B7) || // Lo [27] HANGUL SYLLABLE SSWEG..HANGUL SYLLABLE SSWEH |
7265 | - // (0x_c4B9 <= code && code <= 0x_c4D3) || // Lo [27] HANGUL SYLLABLE SSWIG..HANGUL SYLLABLE SSWIH |
7266 | - // (0x_c4D5 <= code && code <= 0x_c4EF) || // Lo [27] HANGUL SYLLABLE SSYUG..HANGUL SYLLABLE SSYUH |
7267 | - // (0x_c4F1 <= code && code <= 0x_c50B) || // Lo [27] HANGUL SYLLABLE SSEUG..HANGUL SYLLABLE SSEUH |
7268 | - // (0x_c50D <= code && code <= 0x_c527) || // Lo [27] HANGUL SYLLABLE SSYIG..HANGUL SYLLABLE SSYIH |
7269 | - // (0x_c529 <= code && code <= 0x_c543) || // Lo [27] HANGUL SYLLABLE SSIG..HANGUL SYLLABLE SSIH |
7270 | - // (0x_c545 <= code && code <= 0x_c55F) || // Lo [27] HANGUL SYLLABLE AG..HANGUL SYLLABLE AH |
7271 | - // (0x_c561 <= code && code <= 0x_c57B) || // Lo [27] HANGUL SYLLABLE AEG..HANGUL SYLLABLE AEH |
7272 | - // (0x_c57D <= code && code <= 0x_c597) || // Lo [27] HANGUL SYLLABLE YAG..HANGUL SYLLABLE YAH |
7273 | - // (0x_c599 <= code && code <= 0x_c5B3) || // Lo [27] HANGUL SYLLABLE YAEG..HANGUL SYLLABLE YAEH |
7274 | - // (0x_c5B5 <= code && code <= 0x_c5CF) || // Lo [27] HANGUL SYLLABLE EOG..HANGUL SYLLABLE EOH |
7275 | - // (0x_c5D1 <= code && code <= 0x_c5EB) || // Lo [27] HANGUL SYLLABLE EG..HANGUL SYLLABLE EH |
7276 | - // (0x_c5ED <= code && code <= 0x_c607) || // Lo [27] HANGUL SYLLABLE YEOG..HANGUL SYLLABLE YEOH |
7277 | - // (0x_c609 <= code && code <= 0x_c623) || // Lo [27] HANGUL SYLLABLE YEG..HANGUL SYLLABLE YEH |
7278 | - // (0x_c625 <= code && code <= 0x_c63F) || // Lo [27] HANGUL SYLLABLE OG..HANGUL SYLLABLE OH |
7279 | - // (0x_c641 <= code && code <= 0x_c65B) || // Lo [27] HANGUL SYLLABLE WAG..HANGUL SYLLABLE WAH |
7280 | - // (0x_c65D <= code && code <= 0x_c677) || // Lo [27] HANGUL SYLLABLE WAEG..HANGUL SYLLABLE WAEH |
7281 | - // (0x_c679 <= code && code <= 0x_c693) || // Lo [27] HANGUL SYLLABLE OEG..HANGUL SYLLABLE OEH |
7282 | - // (0x_c695 <= code && code <= 0x_c6AF) || // Lo [27] HANGUL SYLLABLE YOG..HANGUL SYLLABLE YOH |
7283 | - // (0x_c6B1 <= code && code <= 0x_c6CB) || // Lo [27] HANGUL SYLLABLE UG..HANGUL SYLLABLE UH |
7284 | - // (0x_c6CD <= code && code <= 0x_c6E7) || // Lo [27] HANGUL SYLLABLE WEOG..HANGUL SYLLABLE WEOH |
7285 | - // (0x_c6E9 <= code && code <= 0x_c703) || // Lo [27] HANGUL SYLLABLE WEG..HANGUL SYLLABLE WEH |
7286 | - // (0x_c705 <= code && code <= 0x_c71F) || // Lo [27] HANGUL SYLLABLE WIG..HANGUL SYLLABLE WIH |
7287 | - // (0x_c721 <= code && code <= 0x_c73B) || // Lo [27] HANGUL SYLLABLE YUG..HANGUL SYLLABLE YUH |
7288 | - // (0x_c73D <= code && code <= 0x_c757) || // Lo [27] HANGUL SYLLABLE EUG..HANGUL SYLLABLE EUH |
7289 | - // (0x_c759 <= code && code <= 0x_c773) || // Lo [27] HANGUL SYLLABLE YIG..HANGUL SYLLABLE YIH |
7290 | - // (0x_c775 <= code && code <= 0x_c78F) || // Lo [27] HANGUL SYLLABLE IG..HANGUL SYLLABLE IH |
7291 | - // (0x_c791 <= code && code <= 0x_c7AB) || // Lo [27] HANGUL SYLLABLE JAG..HANGUL SYLLABLE JAH |
7292 | - // (0x_c7AD <= code && code <= 0x_c7C7) || // Lo [27] HANGUL SYLLABLE JAEG..HANGUL SYLLABLE JAEH |
7293 | - // (0x_c7C9 <= code && code <= 0x_c7E3) || // Lo [27] HANGUL SYLLABLE JYAG..HANGUL SYLLABLE JYAH |
7294 | - // (0x_c7E5 <= code && code <= 0x_c7FF) || // Lo [27] HANGUL SYLLABLE JYAEG..HANGUL SYLLABLE JYAEH |
7295 | - // (0x_c801 <= code && code <= 0x_c81B) || // Lo [27] HANGUL SYLLABLE JEOG..HANGUL SYLLABLE JEOH |
7296 | - // (0x_c81D <= code && code <= 0x_c837) || // Lo [27] HANGUL SYLLABLE JEG..HANGUL SYLLABLE JEH |
7297 | - // (0x_c839 <= code && code <= 0x_c853) || // Lo [27] HANGUL SYLLABLE JYEOG..HANGUL SYLLABLE JYEOH |
7298 | - // (0x_c855 <= code && code <= 0x_c86F) || // Lo [27] HANGUL SYLLABLE JYEG..HANGUL SYLLABLE JYEH |
7299 | - // (0x_c871 <= code && code <= 0x_c88B) || // Lo [27] HANGUL SYLLABLE JOG..HANGUL SYLLABLE JOH |
7300 | - // (0x_c88D <= code && code <= 0x_c8A7) || // Lo [27] HANGUL SYLLABLE JWAG..HANGUL SYLLABLE JWAH |
7301 | - // (0x_c8A9 <= code && code <= 0x_c8C3) || // Lo [27] HANGUL SYLLABLE JWAEG..HANGUL SYLLABLE JWAEH |
7302 | - // (0x_c8C5 <= code && code <= 0x_c8DF) || // Lo [27] HANGUL SYLLABLE JOEG..HANGUL SYLLABLE JOEH |
7303 | - // (0x_c8E1 <= code && code <= 0x_c8FB) || // Lo [27] HANGUL SYLLABLE JYOG..HANGUL SYLLABLE JYOH |
7304 | - // (0x_c8FD <= code && code <= 0x_c917) || // Lo [27] HANGUL SYLLABLE JUG..HANGUL SYLLABLE JUH |
7305 | - // (0x_c919 <= code && code <= 0x_c933) || // Lo [27] HANGUL SYLLABLE JWEOG..HANGUL SYLLABLE JWEOH |
7306 | - // (0x_c935 <= code && code <= 0x_c94F) || // Lo [27] HANGUL SYLLABLE JWEG..HANGUL SYLLABLE JWEH |
7307 | - // (0x_c951 <= code && code <= 0x_c96B) || // Lo [27] HANGUL SYLLABLE JWIG..HANGUL SYLLABLE JWIH |
7308 | - // (0x_c96D <= code && code <= 0x_c987) || // Lo [27] HANGUL SYLLABLE JYUG..HANGUL SYLLABLE JYUH |
7309 | - // (0x_c989 <= code && code <= 0x_c9A3) || // Lo [27] HANGUL SYLLABLE JEUG..HANGUL SYLLABLE JEUH |
7310 | - // (0x_c9A5 <= code && code <= 0x_c9BF) || // Lo [27] HANGUL SYLLABLE JYIG..HANGUL SYLLABLE JYIH |
7311 | - // (0x_c9C1 <= code && code <= 0x_c9DB) || // Lo [27] HANGUL SYLLABLE JIG..HANGUL SYLLABLE JIH |
7312 | - // (0x_c9DD <= code && code <= 0x_c9F7) || // Lo [27] HANGUL SYLLABLE JJAG..HANGUL SYLLABLE JJAH |
7313 | - // (0x_c9F9 <= code && code <= 0x_cA13) || // Lo [27] HANGUL SYLLABLE JJAEG..HANGUL SYLLABLE JJAEH |
7314 | - // (0x_cA15 <= code && code <= 0x_cA2F) || // Lo [27] HANGUL SYLLABLE JJYAG..HANGUL SYLLABLE JJYAH |
7315 | - // (0x_cA31 <= code && code <= 0x_cA4B) || // Lo [27] HANGUL SYLLABLE JJYAEG..HANGUL SYLLABLE JJYAEH |
7316 | - // (0x_cA4D <= code && code <= 0x_cA67) || // Lo [27] HANGUL SYLLABLE JJEOG..HANGUL SYLLABLE JJEOH |
7317 | - // (0x_cA69 <= code && code <= 0x_cA83) || // Lo [27] HANGUL SYLLABLE JJEG..HANGUL SYLLABLE JJEH |
7318 | - // (0x_cA85 <= code && code <= 0x_cA9F) || // Lo [27] HANGUL SYLLABLE JJYEOG..HANGUL SYLLABLE JJYEOH |
7319 | - // (0x_cAA1 <= code && code <= 0x_cABB) || // Lo [27] HANGUL SYLLABLE JJYEG..HANGUL SYLLABLE JJYEH |
7320 | - // (0x_cABD <= code && code <= 0x_cAD7) || // Lo [27] HANGUL SYLLABLE JJOG..HANGUL SYLLABLE JJOH |
7321 | - // (0x_cAD9 <= code && code <= 0x_cAF3) || // Lo [27] HANGUL SYLLABLE JJWAG..HANGUL SYLLABLE JJWAH |
7322 | - // (0x_cAF5 <= code && code <= 0x_cB0F) || // Lo [27] HANGUL SYLLABLE JJWAEG..HANGUL SYLLABLE JJWAEH |
7323 | - // (0x_cB11 <= code && code <= 0x_cB2B) || // Lo [27] HANGUL SYLLABLE JJOEG..HANGUL SYLLABLE JJOEH |
7324 | - // (0x_cB2D <= code && code <= 0x_cB47) || // Lo [27] HANGUL SYLLABLE JJYOG..HANGUL SYLLABLE JJYOH |
7325 | - // (0x_cB49 <= code && code <= 0x_cB63) || // Lo [27] HANGUL SYLLABLE JJUG..HANGUL SYLLABLE JJUH |
7326 | - // (0x_cB65 <= code && code <= 0x_cB7F) || // Lo [27] HANGUL SYLLABLE JJWEOG..HANGUL SYLLABLE JJWEOH |
7327 | - // (0x_cB81 <= code && code <= 0x_cB9B) || // Lo [27] HANGUL SYLLABLE JJWEG..HANGUL SYLLABLE JJWEH |
7328 | - // (0x_cB9D <= code && code <= 0x_cBB7) || // Lo [27] HANGUL SYLLABLE JJWIG..HANGUL SYLLABLE JJWIH |
7329 | - // (0x_cBB9 <= code && code <= 0x_cBD3) || // Lo [27] HANGUL SYLLABLE JJYUG..HANGUL SYLLABLE JJYUH |
7330 | - // (0x_cBD5 <= code && code <= 0x_cBEF) || // Lo [27] HANGUL SYLLABLE JJEUG..HANGUL SYLLABLE JJEUH |
7331 | - // (0x_cBF1 <= code && code <= 0x_cC0B) || // Lo [27] HANGUL SYLLABLE JJYIG..HANGUL SYLLABLE JJYIH |
7332 | - // (0x_cC0D <= code && code <= 0x_cC27) || // Lo [27] HANGUL SYLLABLE JJIG..HANGUL SYLLABLE JJIH |
7333 | - // (0x_cC29 <= code && code <= 0x_cC43) || // Lo [27] HANGUL SYLLABLE CAG..HANGUL SYLLABLE CAH |
7334 | - // (0x_cC45 <= code && code <= 0x_cC5F) || // Lo [27] HANGUL SYLLABLE CAEG..HANGUL SYLLABLE CAEH |
7335 | - // (0x_cC61 <= code && code <= 0x_cC7B) || // Lo [27] HANGUL SYLLABLE CYAG..HANGUL SYLLABLE CYAH |
7336 | - // (0x_cC7D <= code && code <= 0x_cC97) || // Lo [27] HANGUL SYLLABLE CYAEG..HANGUL SYLLABLE CYAEH |
7337 | - // (0x_cC99 <= code && code <= 0x_cCB3) || // Lo [27] HANGUL SYLLABLE CEOG..HANGUL SYLLABLE CEOH |
7338 | - // (0x_cCB5 <= code && code <= 0x_cCCF) || // Lo [27] HANGUL SYLLABLE CEG..HANGUL SYLLABLE CEH |
7339 | - // (0x_cCD1 <= code && code <= 0x_cCEB) || // Lo [27] HANGUL SYLLABLE CYEOG..HANGUL SYLLABLE CYEOH |
7340 | - // (0x_cCED <= code && code <= 0x_cD07) || // Lo [27] HANGUL SYLLABLE CYEG..HANGUL SYLLABLE CYEH |
7341 | - // (0x_cD09 <= code && code <= 0x_cD23) || // Lo [27] HANGUL SYLLABLE COG..HANGUL SYLLABLE COH |
7342 | - // (0x_cD25 <= code && code <= 0x_cD3F) || // Lo [27] HANGUL SYLLABLE CWAG..HANGUL SYLLABLE CWAH |
7343 | - // (0x_cD41 <= code && code <= 0x_cD5B) || // Lo [27] HANGUL SYLLABLE CWAEG..HANGUL SYLLABLE CWAEH |
7344 | - // (0x_cD5D <= code && code <= 0x_cD77) || // Lo [27] HANGUL SYLLABLE COEG..HANGUL SYLLABLE COEH |
7345 | - // (0x_cD79 <= code && code <= 0x_cD93) || // Lo [27] HANGUL SYLLABLE CYOG..HANGUL SYLLABLE CYOH |
7346 | - // (0x_cD95 <= code && code <= 0x_cDAF) || // Lo [27] HANGUL SYLLABLE CUG..HANGUL SYLLABLE CUH |
7347 | - // (0x_cDB1 <= code && code <= 0x_cDCB) || // Lo [27] HANGUL SYLLABLE CWEOG..HANGUL SYLLABLE CWEOH |
7348 | - // (0x_cDCD <= code && code <= 0x_cDE7) || // Lo [27] HANGUL SYLLABLE CWEG..HANGUL SYLLABLE CWEH |
7349 | - // (0x_cDE9 <= code && code <= 0x_cE03) || // Lo [27] HANGUL SYLLABLE CWIG..HANGUL SYLLABLE CWIH |
7350 | - // (0x_cE05 <= code && code <= 0x_cE1F) || // Lo [27] HANGUL SYLLABLE CYUG..HANGUL SYLLABLE CYUH |
7351 | - // (0x_cE21 <= code && code <= 0x_cE3B) || // Lo [27] HANGUL SYLLABLE CEUG..HANGUL SYLLABLE CEUH |
7352 | - // (0x_cE3D <= code && code <= 0x_cE57) || // Lo [27] HANGUL SYLLABLE CYIG..HANGUL SYLLABLE CYIH |
7353 | - // (0x_cE59 <= code && code <= 0x_cE73) || // Lo [27] HANGUL SYLLABLE CIG..HANGUL SYLLABLE CIH |
7354 | - // (0x_cE75 <= code && code <= 0x_cE8F) || // Lo [27] HANGUL SYLLABLE KAG..HANGUL SYLLABLE KAH |
7355 | - // (0x_cE91 <= code && code <= 0x_cEAB) || // Lo [27] HANGUL SYLLABLE KAEG..HANGUL SYLLABLE KAEH |
7356 | - // (0x_cEAD <= code && code <= 0x_cEC7) || // Lo [27] HANGUL SYLLABLE KYAG..HANGUL SYLLABLE KYAH |
7357 | - // (0x_cEC9 <= code && code <= 0x_cEE3) || // Lo [27] HANGUL SYLLABLE KYAEG..HANGUL SYLLABLE KYAEH |
7358 | - // (0x_cEE5 <= code && code <= 0x_cEFF) || // Lo [27] HANGUL SYLLABLE KEOG..HANGUL SYLLABLE KEOH |
7359 | - // (0x_cF01 <= code && code <= 0x_cF1B) || // Lo [27] HANGUL SYLLABLE KEG..HANGUL SYLLABLE KEH |
7360 | - // (0x_cF1D <= code && code <= 0x_cF37) || // Lo [27] HANGUL SYLLABLE KYEOG..HANGUL SYLLABLE KYEOH |
7361 | - // (0x_cF39 <= code && code <= 0x_cF53) || // Lo [27] HANGUL SYLLABLE KYEG..HANGUL SYLLABLE KYEH |
7362 | - // (0x_cF55 <= code && code <= 0x_cF6F) || // Lo [27] HANGUL SYLLABLE KOG..HANGUL SYLLABLE KOH |
7363 | - // (0x_cF71 <= code && code <= 0x_cF8B) || // Lo [27] HANGUL SYLLABLE KWAG..HANGUL SYLLABLE KWAH |
7364 | - // (0x_cF8D <= code && code <= 0x_cFA7) || // Lo [27] HANGUL SYLLABLE KWAEG..HANGUL SYLLABLE KWAEH |
7365 | - // (0x_cFA9 <= code && code <= 0x_cFC3) || // Lo [27] HANGUL SYLLABLE KOEG..HANGUL SYLLABLE KOEH |
7366 | - // (0x_cFC5 <= code && code <= 0x_cFDF) || // Lo [27] HANGUL SYLLABLE KYOG..HANGUL SYLLABLE KYOH |
7367 | - // (0x_cFE1 <= code && code <= 0x_cFFB) || // Lo [27] HANGUL SYLLABLE KUG..HANGUL SYLLABLE KUH |
7368 | - // (0x_cFFD <= code && code <= 0x_d017) || // Lo [27] HANGUL SYLLABLE KWEOG..HANGUL SYLLABLE KWEOH |
7369 | - // (0x_d019 <= code && code <= 0x_d033) || // Lo [27] HANGUL SYLLABLE KWEG..HANGUL SYLLABLE KWEH |
7370 | - // (0x_d035 <= code && code <= 0x_d04F) || // Lo [27] HANGUL SYLLABLE KWIG..HANGUL SYLLABLE KWIH |
7371 | - // (0x_d051 <= code && code <= 0x_d06B) || // Lo [27] HANGUL SYLLABLE KYUG..HANGUL SYLLABLE KYUH |
7372 | - // (0x_d06D <= code && code <= 0x_d087) || // Lo [27] HANGUL SYLLABLE KEUG..HANGUL SYLLABLE KEUH |
7373 | - // (0x_d089 <= code && code <= 0x_d0A3) || // Lo [27] HANGUL SYLLABLE KYIG..HANGUL SYLLABLE KYIH |
7374 | - // (0x_d0A5 <= code && code <= 0x_d0BF) || // Lo [27] HANGUL SYLLABLE KIG..HANGUL SYLLABLE KIH |
7375 | - // (0x_d0C1 <= code && code <= 0x_d0DB) || // Lo [27] HANGUL SYLLABLE TAG..HANGUL SYLLABLE TAH |
7376 | - // (0x_d0DD <= code && code <= 0x_d0F7) || // Lo [27] HANGUL SYLLABLE TAEG..HANGUL SYLLABLE TAEH |
7377 | - // (0x_d0F9 <= code && code <= 0x_d113) || // Lo [27] HANGUL SYLLABLE TYAG..HANGUL SYLLABLE TYAH |
7378 | - // (0x_d115 <= code && code <= 0x_d12F) || // Lo [27] HANGUL SYLLABLE TYAEG..HANGUL SYLLABLE TYAEH |
7379 | - // (0x_d131 <= code && code <= 0x_d14B) || // Lo [27] HANGUL SYLLABLE TEOG..HANGUL SYLLABLE TEOH |
7380 | - // (0x_d14D <= code && code <= 0x_d167) || // Lo [27] HANGUL SYLLABLE TEG..HANGUL SYLLABLE TEH |
7381 | - // (0x_d169 <= code && code <= 0x_d183) || // Lo [27] HANGUL SYLLABLE TYEOG..HANGUL SYLLABLE TYEOH |
7382 | - // (0x_d185 <= code && code <= 0x_d19F) || // Lo [27] HANGUL SYLLABLE TYEG..HANGUL SYLLABLE TYEH |
7383 | - // (0x_d1A1 <= code && code <= 0x_d1BB) || // Lo [27] HANGUL SYLLABLE TOG..HANGUL SYLLABLE TOH |
7384 | - // (0x_d1BD <= code && code <= 0x_d1D7) || // Lo [27] HANGUL SYLLABLE TWAG..HANGUL SYLLABLE TWAH |
7385 | - // (0x_d1D9 <= code && code <= 0x_d1F3) || // Lo [27] HANGUL SYLLABLE TWAEG..HANGUL SYLLABLE TWAEH |
7386 | - // (0x_d1F5 <= code && code <= 0x_d20F) || // Lo [27] HANGUL SYLLABLE TOEG..HANGUL SYLLABLE TOEH |
7387 | - // (0x_d211 <= code && code <= 0x_d22B) || // Lo [27] HANGUL SYLLABLE TYOG..HANGUL SYLLABLE TYOH |
7388 | - // (0x_d22D <= code && code <= 0x_d247) || // Lo [27] HANGUL SYLLABLE TUG..HANGUL SYLLABLE TUH |
7389 | - // (0x_d249 <= code && code <= 0x_d263) || // Lo [27] HANGUL SYLLABLE TWEOG..HANGUL SYLLABLE TWEOH |
7390 | - // (0x_d265 <= code && code <= 0x_d27F) || // Lo [27] HANGUL SYLLABLE TWEG..HANGUL SYLLABLE TWEH |
7391 | - // (0x_d281 <= code && code <= 0x_d29B) || // Lo [27] HANGUL SYLLABLE TWIG..HANGUL SYLLABLE TWIH |
7392 | - // (0x_d29D <= code && code <= 0x_d2B7) || // Lo [27] HANGUL SYLLABLE TYUG..HANGUL SYLLABLE TYUH |
7393 | - // (0x_d2B9 <= code && code <= 0x_d2D3) || // Lo [27] HANGUL SYLLABLE TEUG..HANGUL SYLLABLE TEUH |
7394 | - // (0x_d2D5 <= code && code <= 0x_d2EF) || // Lo [27] HANGUL SYLLABLE TYIG..HANGUL SYLLABLE TYIH |
7395 | - // (0x_d2F1 <= code && code <= 0x_d30B) || // Lo [27] HANGUL SYLLABLE TIG..HANGUL SYLLABLE TIH |
7396 | - // (0x_d30D <= code && code <= 0x_d327) || // Lo [27] HANGUL SYLLABLE PAG..HANGUL SYLLABLE PAH |
7397 | - // (0x_d329 <= code && code <= 0x_d343) || // Lo [27] HANGUL SYLLABLE PAEG..HANGUL SYLLABLE PAEH |
7398 | - // (0x_d345 <= code && code <= 0x_d35F) || // Lo [27] HANGUL SYLLABLE PYAG..HANGUL SYLLABLE PYAH |
7399 | - // (0x_d361 <= code && code <= 0x_d37B) || // Lo [27] HANGUL SYLLABLE PYAEG..HANGUL SYLLABLE PYAEH |
7400 | - // (0x_d37D <= code && code <= 0x_d397) || // Lo [27] HANGUL SYLLABLE PEOG..HANGUL SYLLABLE PEOH |
7401 | - // (0x_d399 <= code && code <= 0x_d3B3) || // Lo [27] HANGUL SYLLABLE PEG..HANGUL SYLLABLE PEH |
7402 | - // (0x_d3B5 <= code && code <= 0x_d3CF) || // Lo [27] HANGUL SYLLABLE PYEOG..HANGUL SYLLABLE PYEOH |
7403 | - // (0x_d3D1 <= code && code <= 0x_d3EB) || // Lo [27] HANGUL SYLLABLE PYEG..HANGUL SYLLABLE PYEH |
7404 | - // (0x_d3ED <= code && code <= 0x_d407) || // Lo [27] HANGUL SYLLABLE POG..HANGUL SYLLABLE POH |
7405 | - // (0x_d409 <= code && code <= 0x_d423) || // Lo [27] HANGUL SYLLABLE PWAG..HANGUL SYLLABLE PWAH |
7406 | - // (0x_d425 <= code && code <= 0x_d43F) || // Lo [27] HANGUL SYLLABLE PWAEG..HANGUL SYLLABLE PWAEH |
7407 | - // (0x_d441 <= code && code <= 0x_d45B) || // Lo [27] HANGUL SYLLABLE POEG..HANGUL SYLLABLE POEH |
7408 | - // (0x_d45D <= code && code <= 0x_d477) || // Lo [27] HANGUL SYLLABLE PYOG..HANGUL SYLLABLE PYOH |
7409 | - // (0x_d479 <= code && code <= 0x_d493) || // Lo [27] HANGUL SYLLABLE PUG..HANGUL SYLLABLE PUH |
7410 | - // (0x_d495 <= code && code <= 0x_d4AF) || // Lo [27] HANGUL SYLLABLE PWEOG..HANGUL SYLLABLE PWEOH |
7411 | - // (0x_d4B1 <= code && code <= 0x_d4CB) || // Lo [27] HANGUL SYLLABLE PWEG..HANGUL SYLLABLE PWEH |
7412 | - // (0x_d4CD <= code && code <= 0x_d4E7) || // Lo [27] HANGUL SYLLABLE PWIG..HANGUL SYLLABLE PWIH |
7413 | - // (0x_d4E9 <= code && code <= 0x_d503) || // Lo [27] HANGUL SYLLABLE PYUG..HANGUL SYLLABLE PYUH |
7414 | - // (0x_d505 <= code && code <= 0x_d51F) || // Lo [27] HANGUL SYLLABLE PEUG..HANGUL SYLLABLE PEUH |
7415 | - // (0x_d521 <= code && code <= 0x_d53B) || // Lo [27] HANGUL SYLLABLE PYIG..HANGUL SYLLABLE PYIH |
7416 | - // (0x_d53D <= code && code <= 0x_d557) || // Lo [27] HANGUL SYLLABLE PIG..HANGUL SYLLABLE PIH |
7417 | - // (0x_d559 <= code && code <= 0x_d573) || // Lo [27] HANGUL SYLLABLE HAG..HANGUL SYLLABLE HAH |
7418 | - // (0x_d575 <= code && code <= 0x_d58F) || // Lo [27] HANGUL SYLLABLE HAEG..HANGUL SYLLABLE HAEH |
7419 | - // (0x_d591 <= code && code <= 0x_d5AB) || // Lo [27] HANGUL SYLLABLE HYAG..HANGUL SYLLABLE HYAH |
7420 | - // (0x_d5AD <= code && code <= 0x_d5C7) || // Lo [27] HANGUL SYLLABLE HYAEG..HANGUL SYLLABLE HYAEH |
7421 | - // (0x_d5C9 <= code && code <= 0x_d5E3) || // Lo [27] HANGUL SYLLABLE HEOG..HANGUL SYLLABLE HEOH |
7422 | - // (0x_d5E5 <= code && code <= 0x_d5FF) || // Lo [27] HANGUL SYLLABLE HEG..HANGUL SYLLABLE HEH |
7423 | - // (0x_d601 <= code && code <= 0x_d61B) || // Lo [27] HANGUL SYLLABLE HYEOG..HANGUL SYLLABLE HYEOH |
7424 | - // (0x_d61D <= code && code <= 0x_d637) || // Lo [27] HANGUL SYLLABLE HYEG..HANGUL SYLLABLE HYEH |
7425 | - // (0x_d639 <= code && code <= 0x_d653) || // Lo [27] HANGUL SYLLABLE HOG..HANGUL SYLLABLE HOH |
7426 | - // (0x_d655 <= code && code <= 0x_d66F) || // Lo [27] HANGUL SYLLABLE HWAG..HANGUL SYLLABLE HWAH |
7427 | - // (0x_d671 <= code && code <= 0x_d68B) || // Lo [27] HANGUL SYLLABLE HWAEG..HANGUL SYLLABLE HWAEH |
7428 | - // (0x_d68D <= code && code <= 0x_d6A7) || // Lo [27] HANGUL SYLLABLE HOEG..HANGUL SYLLABLE HOEH |
7429 | - // (0x_d6A9 <= code && code <= 0x_d6C3) || // Lo [27] HANGUL SYLLABLE HYOG..HANGUL SYLLABLE HYOH |
7430 | - // (0x_d6C5 <= code && code <= 0x_d6DF) || // Lo [27] HANGUL SYLLABLE HUG..HANGUL SYLLABLE HUH |
7431 | - // (0x_d6E1 <= code && code <= 0x_d6FB) || // Lo [27] HANGUL SYLLABLE HWEOG..HANGUL SYLLABLE HWEOH |
7432 | - // (0x_d6FD <= code && code <= 0x_d717) || // Lo [27] HANGUL SYLLABLE HWEG..HANGUL SYLLABLE HWEH |
7433 | - // (0x_d719 <= code && code <= 0x_d733) || // Lo [27] HANGUL SYLLABLE HWIG..HANGUL SYLLABLE HWIH |
7434 | - // (0x_d735 <= code && code <= 0x_d74F) || // Lo [27] HANGUL SYLLABLE HYUG..HANGUL SYLLABLE HYUH |
7435 | - // (0x_d751 <= code && code <= 0x_d76B) || // Lo [27] HANGUL SYLLABLE HEUG..HANGUL SYLLABLE HEUH |
7436 | - // (0x_d76D <= code && code <= 0x_d787) || // Lo [27] HANGUL SYLLABLE HYIG..HANGUL SYLLABLE HYIH |
7437 | - // (0x_d789 <= code && code <= 0x_d7A3) // Lo [27] HANGUL SYLLABLE HIG..HANGUL SYLLABLE HIH |
7438 | - // ){ |
7439 | + // (0x_aC01 <= code && code <= 0x_aC1B) || // Lo [27] HANGUL SYLLABLE |
7440 | + // GAG..HANGUL SYLLABLE GAH (0x_aC1D <= code && code <= 0x_aC37) || // Lo |
7441 | + // [27] HANGUL SYLLABLE GAEG..HANGUL SYLLABLE GAEH (0x_aC39 <= code && |
7442 | + // code <= 0x_aC53) || // Lo [27] HANGUL SYLLABLE GYAG..HANGUL SYLLABLE GYAH |
7443 | + // (0x_aC55 <= code && code <= 0x_aC6F) || // Lo [27] HANGUL SYLLABLE |
7444 | + // GYAEG..HANGUL SYLLABLE GYAEH (0x_aC71 <= code && code <= 0x_aC8B) || |
7445 | + // // Lo [27] HANGUL SYLLABLE GEOG..HANGUL SYLLABLE GEOH (0x_aC8D <= |
7446 | + // code && code <= 0x_aCA7) || // Lo [27] HANGUL SYLLABLE GEG..HANGUL SYLLABLE |
7447 | + // GEH (0x_aCA9 <= code && code <= 0x_aCC3) || // Lo [27] HANGUL |
7448 | + // SYLLABLE GYEOG..HANGUL SYLLABLE GYEOH (0x_aCC5 <= code && code <= |
7449 | + // 0x_aCDF) || // Lo [27] HANGUL SYLLABLE GYEG..HANGUL SYLLABLE GYEH |
7450 | + // (0x_aCE1 <= code && code <= 0x_aCFB) || // Lo [27] HANGUL SYLLABLE |
7451 | + // GOG..HANGUL SYLLABLE GOH (0x_aCFD <= code && code <= 0x_aD17) || // Lo |
7452 | + // [27] HANGUL SYLLABLE GWAG..HANGUL SYLLABLE GWAH (0x_aD19 <= code && |
7453 | + // code <= 0x_aD33) || // Lo [27] HANGUL SYLLABLE GWAEG..HANGUL SYLLABLE GWAEH |
7454 | + // (0x_aD35 <= code && code <= 0x_aD4F) || // Lo [27] HANGUL SYLLABLE |
7455 | + // GOEG..HANGUL SYLLABLE GOEH (0x_aD51 <= code && code <= 0x_aD6B) || // |
7456 | + // Lo [27] HANGUL SYLLABLE GYOG..HANGUL SYLLABLE GYOH (0x_aD6D <= code |
7457 | + // && code <= 0x_aD87) || // Lo [27] HANGUL SYLLABLE GUG..HANGUL SYLLABLE GUH |
7458 | + // (0x_aD89 <= code && code <= 0x_aDA3) || // Lo [27] HANGUL SYLLABLE |
7459 | + // GWEOG..HANGUL SYLLABLE GWEOH (0x_aDA5 <= code && code <= 0x_aDBF) || |
7460 | + // // Lo [27] HANGUL SYLLABLE GWEG..HANGUL SYLLABLE GWEH (0x_aDC1 <= |
7461 | + // code && code <= 0x_aDDB) || // Lo [27] HANGUL SYLLABLE GWIG..HANGUL SYLLABLE |
7462 | + // GWIH (0x_aDDD <= code && code <= 0x_aDF7) || // Lo [27] HANGUL |
7463 | + // SYLLABLE GYUG..HANGUL SYLLABLE GYUH (0x_aDF9 <= code && code <= |
7464 | + // 0x_aE13) || // Lo [27] HANGUL SYLLABLE GEUG..HANGUL SYLLABLE GEUH |
7465 | + // (0x_aE15 <= code && code <= 0x_aE2F) || // Lo [27] HANGUL SYLLABLE |
7466 | + // GYIG..HANGUL SYLLABLE GYIH (0x_aE31 <= code && code <= 0x_aE4B) || // |
7467 | + // Lo [27] HANGUL SYLLABLE GIG..HANGUL SYLLABLE GIH (0x_aE4D <= code && |
7468 | + // code <= 0x_aE67) || // Lo [27] HANGUL SYLLABLE GGAG..HANGUL SYLLABLE GGAH |
7469 | + // (0x_aE69 <= code && code <= 0x_aE83) || // Lo [27] HANGUL SYLLABLE |
7470 | + // GGAEG..HANGUL SYLLABLE GGAEH (0x_aE85 <= code && code <= 0x_aE9F) || |
7471 | + // // Lo [27] HANGUL SYLLABLE GGYAG..HANGUL SYLLABLE GGYAH (0x_aEA1 <= |
7472 | + // code && code <= 0x_aEBB) || // Lo [27] HANGUL SYLLABLE GGYAEG..HANGUL |
7473 | + // SYLLABLE GGYAEH (0x_aEBD <= code && code <= 0x_aED7) || // Lo [27] |
7474 | + // HANGUL SYLLABLE GGEOG..HANGUL SYLLABLE GGEOH (0x_aED9 <= code && code |
7475 | + // <= 0x_aEF3) || // Lo [27] HANGUL SYLLABLE GGEG..HANGUL SYLLABLE GGEH |
7476 | + // (0x_aEF5 <= code && code <= 0x_aF0F) || // Lo [27] HANGUL SYLLABLE |
7477 | + // GGYEOG..HANGUL SYLLABLE GGYEOH (0x_aF11 <= code && code <= 0x_aF2B) || |
7478 | + // // Lo [27] HANGUL SYLLABLE GGYEG..HANGUL SYLLABLE GGYEH (0x_aF2D <= |
7479 |