Debian Codegraph @

src/lib.rs

raw symbols ◀ ▶ SCIP
3 Debian patches touch this file
1 // Copyright Mozilla Foundation. See the COPYRIGHT
2 // file at the top-level directory of this distribution.
3 //
4 // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
5 // https://www.apache.org/licenses/LICENSE-2.0> or the MIT license
6 // <LICENSE-MIT or https://opensource.org/licenses/MIT>, at your
7 // option. This file may not be copied, modified, or distributed
8 // except according to those terms.
9
10 //! `chardetng` is a character encoding detector for legacy Web content.
11 //!
12 //! It is optimized for binary size in applications that already depend
13 //! on `encoding_rs` for other reasons.
14
15 #![no_std]
16
17 #[cfg(feature = "multithreading")]
18 use rayonrust-analyzer cargo rayon 1.12.0 crate/::preluderust-analyzer cargo rayon 1.12.0 prelude/::*;
19
20 #[cfg(feature = "multithreading")]
21 use arrayvecrust-analyzer cargo arrayvec 0.7.8 crate/::ArrayVecrust-analyzer cargo arrayvec 0.7.8 arrayvec/ArrayVec#;
22
23 #[cfg(all(target_arch = "x86", target_feature = "sse2"))]
24 use corerust-analyzer cargo core https://github.com/rust-lang/rust/library/core crate/::archrust-analyzer cargo core https://github.com/rust-lang/rust/library/core arch/::x86::__m128i;
25 #[cfg(all(target_arch = "x86", target_feature = "sse2"))]
26 use corerust-analyzer cargo core https://github.com/rust-lang/rust/library/core crate/::archrust-analyzer cargo core https://github.com/rust-lang/rust/library/core arch/::x86::_mm_movemask_epi8;
27
28 #[cfg(all(target_arch = "x86_64", target_feature = "sse2"))]
29 use corerust-analyzer cargo core https://github.com/rust-lang/rust/library/core crate/::archrust-analyzer cargo core https://github.com/rust-lang/rust/library/core arch/::x86_64rust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/arch/x86_64/::__m128irust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/__m128i#;
30 #[cfg(all(target_arch = "x86_64", target_feature = "sse2"))]
31 use corerust-analyzer cargo core https://github.com/rust-lang/rust/library/core crate/::archrust-analyzer cargo core https://github.com/rust-lang/rust/library/core arch/::x86_64rust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/arch/x86_64/::_mm_movemask_epi8rust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/sse2/_mm_movemask_epi8().;
32
33 use encoding_rsrust-analyzer cargo encoding_rs 0.8.35 crate/::Decoderrust-analyzer cargo encoding_rs 0.8.35 Decoder#;
34 use encoding_rsrust-analyzer cargo encoding_rs 0.8.35 crate/::DecoderResultrust-analyzer cargo encoding_rs 0.8.35 DecoderResult#;
35 use encoding_rsrust-analyzer cargo encoding_rs 0.8.35 crate/::Encodingrust-analyzer cargo encoding_rs 0.8.35 Encoding#;
36 use encoding_rsrust-analyzer cargo encoding_rs 0.8.35 crate/::BIG5rust-analyzer cargo encoding_rs 0.8.35 BIG5.;
37 use encoding_rsrust-analyzer cargo encoding_rs 0.8.35 crate/::EUC_JPrust-analyzer cargo encoding_rs 0.8.35 EUC_JP.;
38 use encoding_rsrust-analyzer cargo encoding_rs 0.8.35 crate/::EUC_KRrust-analyzer cargo encoding_rs 0.8.35 EUC_KR.;
39 use encoding_rsrust-analyzer cargo encoding_rs 0.8.35 crate/::GBKrust-analyzer cargo encoding_rs 0.8.35 GBK.;
40 use encoding_rsrust-analyzer cargo encoding_rs 0.8.35 crate/::ISO_2022_JPrust-analyzer cargo encoding_rs 0.8.35 ISO_2022_JP.;
41 use encoding_rsrust-analyzer cargo encoding_rs 0.8.35 crate/::ISO_8859_8rust-analyzer cargo encoding_rs 0.8.35 ISO_8859_8.;
42 use encoding_rsrust-analyzer cargo encoding_rs 0.8.35 crate/::SHIFT_JISrust-analyzer cargo encoding_rs 0.8.35 SHIFT_JIS.;
43 use encoding_rsrust-analyzer cargo encoding_rs 0.8.35 crate/::UTF_8rust-analyzer cargo encoding_rs 0.8.35 UTF_8.;
44 use encoding_rsrust-analyzer cargo encoding_rs 0.8.35 crate/::WINDOWS_1255rust-analyzer cargo encoding_rs 0.8.35 WINDOWS_1255.;
45
46 mod datarust-analyzer cargo chardetng 0.1.17 data/;
47 mod tldrust-analyzer cargo chardetng 0.1.17 tld/;
48 use datarust-analyzer cargo chardetng 0.1.17 data/::*;
49 use tldrust-analyzer cargo chardetng 0.1.17 tld/::classify_tldrust-analyzer cargo chardetng 0.1.17 tld/classify_tld().;
50 use tldrust-analyzer cargo chardetng 0.1.17 tld/::Tldrust-analyzer cargo chardetng 0.1.17 tld/Tld#;
51
52 const LATIN_ADJACENCY_PENALTYrust-analyzer cargo chardetng 0.1.17 LATIN_ADJACENCY_PENALTY.: i64 = -rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][Neg]neg().50;
53
54 const IMPLAUSIBILITY_PENALTYrust-analyzer cargo chardetng 0.1.17 IMPLAUSIBILITY_PENALTY.: i64 = -rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][Neg]neg().220;
55
56 const ORDINAL_BONUSrust-analyzer cargo chardetng 0.1.17 ORDINAL_BONUS.: i64 = 300;
57
58 /// Must match the ISO-8859-2 score for " Š ". Note: There
59 /// are four Slovenian Wikipedia list page titles where the
60 /// list is split by letter so that Š stands alone for the
61 /// list part for Š. Let's assume that's a special case not
62 /// worth detecting even though the copyright sign detection
63 /// makes Slovenian title detection round to one percentage
64 /// point worse.
65 const COPYRIGHT_BONUSrust-analyzer cargo chardetng 0.1.17 COPYRIGHT_BONUS.: i64 = 222;
66
67 const IMPLAUSIBLE_LATIN_CASE_TRANSITION_PENALTYrust-analyzer cargo chardetng 0.1.17 IMPLAUSIBLE_LATIN_CASE_TRANSITION_PENALTY.: i64 = -rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][Neg]neg().180;
68
69 const NON_LATIN_CAPITALIZATION_BONUSrust-analyzer cargo chardetng 0.1.17 NON_LATIN_CAPITALIZATION_BONUS.: i64 = 40;
70
71 const NON_LATIN_ALL_CAPS_PENALTYrust-analyzer cargo chardetng 0.1.17 NON_LATIN_ALL_CAPS_PENALTY.: i64 = -rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][Neg]neg().40;
72
73 const NON_LATIN_MIXED_CASE_PENALTYrust-analyzer cargo chardetng 0.1.17 NON_LATIN_MIXED_CASE_PENALTY.: i64 = -rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][Neg]neg().20;
74
75 // Manually calibrated relative to windows-1256 Arabic
76 const CJK_BASE_SCORErust-analyzer cargo chardetng 0.1.17 CJK_BASE_SCORE.: i64 = 41;
77
78 const CJK_SECONDARY_BASE_SCORErust-analyzer cargo chardetng 0.1.17 CJK_SECONDARY_BASE_SCORE.: i64 = 20; // Was 20
79
80 const SHIFT_JIS_SCORE_PER_KANArust-analyzer cargo chardetng 0.1.17 SHIFT_JIS_SCORE_PER_KANA.: i64 = 20;
81
82 const SHIFT_JIS_SCORE_PER_LEVEL_1_KANJIrust-analyzer cargo chardetng 0.1.17 SHIFT_JIS_SCORE_PER_LEVEL_1_KANJI.: i64 = CJK_BASE_SCORErust-analyzer cargo chardetng 0.1.17 CJK_BASE_SCORE.;
83
84 const SHIFT_JIS_SCORE_PER_LEVEL_2_KANJIrust-analyzer cargo chardetng 0.1.17 SHIFT_JIS_SCORE_PER_LEVEL_2_KANJI.: i64 = CJK_SECONDARY_BASE_SCORErust-analyzer cargo chardetng 0.1.17 CJK_SECONDARY_BASE_SCORE.;
85
86 // Manually calibrated relative to windows-1256 Persian and Urdu
87 const SHIFT_JIS_INITIAL_HALF_WIDTH_KATAKANA_PENALTYrust-analyzer cargo chardetng 0.1.17 SHIFT_JIS_INITIAL_HALF_WIDTH_KATAKANA_PENALTY.: i64 = -rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][Neg]neg().75;
88
89 const HALF_WIDTH_KATAKANA_SCORErust-analyzer cargo chardetng 0.1.17 HALF_WIDTH_KATAKANA_SCORE.: i64 = 1;
90
91 // Unclear if this is a good idea; seems not harmful, but can't be sure.
92 const HALF_WIDTH_KATAKANA_VOICING_SCORErust-analyzer cargo chardetng 0.1.17 HALF_WIDTH_KATAKANA_VOICING_SCORE.: i64 = 10;
93
94 const SHIFT_JIS_PUA_PENALTYrust-analyzer cargo chardetng 0.1.17 SHIFT_JIS_PUA_PENALTY.: i64 = -rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][Neg]neg().(CJK_BASE_SCORErust-analyzer cargo chardetng 0.1.17 CJK_BASE_SCORE. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`Mul<Self>`]mul().10); // Should this be larger?
95
96 const SHIFT_JIS_EXTENSION_PENALTYrust-analyzer cargo chardetng 0.1.17 SHIFT_JIS_EXTENSION_PENALTY.: i64 = SHIFT_JIS_PUA_PENALTYrust-analyzer cargo chardetng 0.1.17 SHIFT_JIS_PUA_PENALTY. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`Mul<Self>`]mul().2;
97
98 const SHIFT_JIS_SINGLE_BYTE_EXTENSION_PENALTYrust-analyzer cargo chardetng 0.1.17 SHIFT_JIS_SINGLE_BYTE_EXTENSION_PENALTY.: i64 = SHIFT_JIS_EXTENSION_PENALTYrust-analyzer cargo chardetng 0.1.17 SHIFT_JIS_EXTENSION_PENALTY.;
99
100 const EUC_JP_SCORE_PER_KANArust-analyzer cargo chardetng 0.1.17 EUC_JP_SCORE_PER_KANA.: i64 = CJK_BASE_SCORErust-analyzer cargo chardetng 0.1.17 CJK_BASE_SCORE. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`Add<Self>`]add().(CJK_BASE_SCORErust-analyzer cargo chardetng 0.1.17 CJK_BASE_SCORE. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`Div<Self>`]div()./rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`Div<Self>`]div(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`Div<Self>`]div().3); // Relative to Big5
101
102 const EUC_JP_SCORE_PER_NEAR_OBSOLETE_KANArust-analyzer cargo chardetng 0.1.17 EUC_JP_SCORE_PER_NEAR_OBSOLETE_KANA.: i64 = CJK_BASE_SCORErust-analyzer cargo chardetng 0.1.17 CJK_BASE_SCORE. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`Sub<Self>`]sub().1;
103
104 const EUC_JP_SCORE_PER_LEVEL_1_KANJIrust-analyzer cargo chardetng 0.1.17 EUC_JP_SCORE_PER_LEVEL_1_KANJI.: i64 = CJK_BASE_SCORErust-analyzer cargo chardetng 0.1.17 CJK_BASE_SCORE.;
105
106 const EUC_JP_SCORE_PER_LEVEL_2_KANJIrust-analyzer cargo chardetng 0.1.17 EUC_JP_SCORE_PER_LEVEL_2_KANJI.: i64 = CJK_SECONDARY_BASE_SCORErust-analyzer cargo chardetng 0.1.17 CJK_SECONDARY_BASE_SCORE.;
107
108 const EUC_JP_SCORE_PER_OTHER_KANJIrust-analyzer cargo chardetng 0.1.17 EUC_JP_SCORE_PER_OTHER_KANJI.: i64 = CJK_SECONDARY_BASE_SCORErust-analyzer cargo chardetng 0.1.17 CJK_SECONDARY_BASE_SCORE. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`Div<Self>`]div()./rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`Div<Self>`]div(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`Div<Self>`]div().4;
109
110 const EUC_JP_INITIAL_KANA_PENALTYrust-analyzer cargo chardetng 0.1.17 EUC_JP_INITIAL_KANA_PENALTY.: i64 = -rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][Neg]neg().((CJK_BASE_SCORErust-analyzer cargo chardetng 0.1.17 CJK_BASE_SCORE. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`Div<Self>`]div()./rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`Div<Self>`]div(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`Div<Self>`]div().3) rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`Add<Self>`]add().1);
111
112 const EUC_JP_EXTENSION_PENALTYrust-analyzer cargo chardetng 0.1.17 EUC_JP_EXTENSION_PENALTY.: i64 = -rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][Neg]neg().(CJK_BASE_SCORErust-analyzer cargo chardetng 0.1.17 CJK_BASE_SCORE. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`Mul<Self>`]mul().50); // Needs to be more severe than for Shift_JIS to avoid misdetecting EUC-KR!
113
114 const BIG5_SCORE_PER_LEVEL_1_HANZIrust-analyzer cargo chardetng 0.1.17 BIG5_SCORE_PER_LEVEL_1_HANZI.: i64 = CJK_BASE_SCORErust-analyzer cargo chardetng 0.1.17 CJK_BASE_SCORE.;
115
116 const BIG5_SCORE_PER_OTHER_HANZIrust-analyzer cargo chardetng 0.1.17 BIG5_SCORE_PER_OTHER_HANZI.: i64 = CJK_SECONDARY_BASE_SCORErust-analyzer cargo chardetng 0.1.17 CJK_SECONDARY_BASE_SCORE.;
117
118 const BIG5_PUA_PENALTYrust-analyzer cargo chardetng 0.1.17 BIG5_PUA_PENALTY.: i64 = -rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][Neg]neg().(CJK_BASE_SCORErust-analyzer cargo chardetng 0.1.17 CJK_BASE_SCORE. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`Mul<Self>`]mul().30); // More severe than other PUA penalties to avoid misdetecting EUC-KR! (25 as the multiplier is too little)
119
120 const BIG5_SINGLE_BYTE_EXTENSION_PENALTYrust-analyzer cargo chardetng 0.1.17 BIG5_SINGLE_BYTE_EXTENSION_PENALTY.: i64 = -rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][Neg]neg().(CJK_BASE_SCORErust-analyzer cargo chardetng 0.1.17 CJK_BASE_SCORE. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`Mul<Self>`]mul().40);
121
122 const EUC_KR_SCORE_PER_EUC_HANGULrust-analyzer cargo chardetng 0.1.17 EUC_KR_SCORE_PER_EUC_HANGUL.: i64 = CJK_BASE_SCORErust-analyzer cargo chardetng 0.1.17 CJK_BASE_SCORE. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`Add<Self>`]add().1;
123
124 const EUC_KR_SCORE_PER_NON_EUC_HANGULrust-analyzer cargo chardetng 0.1.17 EUC_KR_SCORE_PER_NON_EUC_HANGUL.: i64 = CJK_SECONDARY_BASE_SCORErust-analyzer cargo chardetng 0.1.17 CJK_SECONDARY_BASE_SCORE. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`Div<Self>`]div()./rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`Div<Self>`]div(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`Div<Self>`]div().5;
125
126 const EUC_KR_SCORE_PER_HANJArust-analyzer cargo chardetng 0.1.17 EUC_KR_SCORE_PER_HANJA.: i64 = CJK_SECONDARY_BASE_SCORErust-analyzer cargo chardetng 0.1.17 CJK_SECONDARY_BASE_SCORE. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`Div<Self>`]div()./rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`Div<Self>`]div(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`Div<Self>`]div().2;
127
128 const EUC_KR_HANJA_AFTER_HANGUL_PENALTYrust-analyzer cargo chardetng 0.1.17 EUC_KR_HANJA_AFTER_HANGUL_PENALTY.: i64 = -rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][Neg]neg().(CJK_BASE_SCORErust-analyzer cargo chardetng 0.1.17 CJK_BASE_SCORE. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`Mul<Self>`]mul().10);
129
130 const EUC_KR_LONG_WORD_PENALTYrust-analyzer cargo chardetng 0.1.17 EUC_KR_LONG_WORD_PENALTY.: i64 = -rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][Neg]neg().6;
131
132 const EUC_KR_PUA_PENALTYrust-analyzer cargo chardetng 0.1.17 EUC_KR_PUA_PENALTY.: i64 = GBK_PUA_PENALTYrust-analyzer cargo chardetng 0.1.17 GBK_PUA_PENALTY. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`Sub<Self>`]sub().1; // Break tie in favor of GBK
133
134 const EUC_KR_MAC_KOREAN_PENALTYrust-analyzer cargo chardetng 0.1.17 EUC_KR_MAC_KOREAN_PENALTY.: i64 = EUC_KR_PUA_PENALTYrust-analyzer cargo chardetng 0.1.17 EUC_KR_PUA_PENALTY. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`Mul<Self>`]mul().2;
135
136 const EUC_KR_SINGLE_BYTE_EXTENSION_PENALTYrust-analyzer cargo chardetng 0.1.17 EUC_KR_SINGLE_BYTE_EXTENSION_PENALTY.: i64 = EUC_KR_MAC_KOREAN_PENALTYrust-analyzer cargo chardetng 0.1.17 EUC_KR_MAC_KOREAN_PENALTY.;
137
138 const GBK_SCORE_PER_LEVEL_1rust-analyzer cargo chardetng 0.1.17 GBK_SCORE_PER_LEVEL_1.: i64 = CJK_BASE_SCORErust-analyzer cargo chardetng 0.1.17 CJK_BASE_SCORE.;
139
140 const GBK_SCORE_PER_LEVEL_2rust-analyzer cargo chardetng 0.1.17 GBK_SCORE_PER_LEVEL_2.: i64 = CJK_SECONDARY_BASE_SCORErust-analyzer cargo chardetng 0.1.17 CJK_SECONDARY_BASE_SCORE.;
141
142 const GBK_SCORE_PER_NON_EUCrust-analyzer cargo chardetng 0.1.17 GBK_SCORE_PER_NON_EUC.: i64 = CJK_SECONDARY_BASE_SCORErust-analyzer cargo chardetng 0.1.17 CJK_SECONDARY_BASE_SCORE. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`Div<Self>`]div()./rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`Div<Self>`]div(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`Div<Self>`]div().4;
143
144 const GBK_PUA_PENALTYrust-analyzer cargo chardetng 0.1.17 GBK_PUA_PENALTY.: i64 = -rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][Neg]neg().(CJK_BASE_SCORErust-analyzer cargo chardetng 0.1.17 CJK_BASE_SCORE. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`Mul<Self>`]mul().10); // Factor should be at least 2, but should it be larger?
145
146 const GBK_SINGLE_BYTE_EXTENSION_PENALTYrust-analyzer cargo chardetng 0.1.17 GBK_SINGLE_BYTE_EXTENSION_PENALTY.: i64 = GBK_PUA_PENALTYrust-analyzer cargo chardetng 0.1.17 GBK_PUA_PENALTY. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`Mul<Self>`]mul().4;
147
148 const CJK_LATIN_ADJACENCY_PENALTYrust-analyzer cargo chardetng 0.1.17 CJK_LATIN_ADJACENCY_PENALTY.: i64 = -rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][Neg]neg().CJK_BASE_SCORErust-analyzer cargo chardetng 0.1.17 CJK_BASE_SCORE.; // smaller penalty than LATIN_ADJACENCY_PENALTY
149
150 const CJ_PUNCTUATIONrust-analyzer cargo chardetng 0.1.17 CJ_PUNCTUATION.: i64 = CJK_BASE_SCORErust-analyzer cargo chardetng 0.1.17 CJK_BASE_SCORE. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`Div<Self>`]div()./rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`Div<Self>`]div(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`Div<Self>`]div().2;
151
152 const CJK_OTHERrust-analyzer cargo chardetng 0.1.17 CJK_OTHER.: i64 = CJK_SECONDARY_BASE_SCORErust-analyzer cargo chardetng 0.1.17 CJK_SECONDARY_BASE_SCORE. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`Div<Self>`]div()./rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`Div<Self>`]div(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`Div<Self>`]div().4;
153
154 /// Latin letter caseless class
155 const LATIN_LETTERrust-analyzer cargo chardetng 0.1.17 LATIN_LETTER.: u8 = 1;
156
157 fn contains_upper_case_period_or_non_asciirust-analyzer cargo chardetng 0.1.17 contains_upper_case_period_or_non_ascii().(label: &[u8]) -> bool {
158 for &b in label.into_iterrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/iter/impl#[`&'a [T]`][IntoIterator]into_iter().() {
159 if b rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]ge().>=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]ge(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]ge().0x80 {
160 return true;
161 }
162 if b rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().b'.' {
163 return true;
164 }
165 if b rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]ge().>=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]ge(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]ge().b'A' && b rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]le().<=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]le(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]le().b'Z' {
166 return true;
167 }
168 }
169 false
170 }
171
172 // For Latin, we only penalize pairwise bad transitions
173 // if one participant is non-ASCII. This avoids violating
174 // the principle that ASCII pairs never contribute to the
175 // score. (Maybe that's a bad principle, though!)
176 #[deriverust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/derive:(PartialEqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialEq:)]
177 enum LatinCaseStaterust-analyzer cargo chardetng 0.1.17 LatinCaseState# {
178 Spacerust-analyzer cargo chardetng 0.1.17 LatinCaseState#Space#,
179 Upperrust-analyzer cargo chardetng 0.1.17 LatinCaseState#Upper#,
180 Lowerrust-analyzer cargo chardetng 0.1.17 LatinCaseState#Lower#,
181 AllCapsrust-analyzer cargo chardetng 0.1.17 LatinCaseState#AllCaps#,
182 }
183
184 // Fon non-Latin, we calculate case-related penalty
185 // or bonus on a per-non-Latin-word basis.
186 #[deriverust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/derive:(PartialEqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialEq:)]
187 enum NonLatinCaseStaterust-analyzer cargo chardetng 0.1.17 NonLatinCaseState# {
188 Spacerust-analyzer cargo chardetng 0.1.17 NonLatinCaseState#Space#,
189 Upperrust-analyzer cargo chardetng 0.1.17 NonLatinCaseState#Upper#,
190 Lowerrust-analyzer cargo chardetng 0.1.17 NonLatinCaseState#Lower#,
191 UpperLowerrust-analyzer cargo chardetng 0.1.17 NonLatinCaseState#UpperLower#,
192 AllCapsrust-analyzer cargo chardetng 0.1.17 NonLatinCaseState#AllCaps#,
193 Mixrust-analyzer cargo chardetng 0.1.17 NonLatinCaseState#Mix#,
194 }
195
196 struct NonLatinCasedCandidaterust-analyzer cargo chardetng 0.1.17 NonLatinCasedCandidate# {
197 datarust-analyzer cargo chardetng 0.1.17 NonLatinCasedCandidate#data.: &'static SingleByteDatarust-analyzer cargo chardetng 0.1.17 data/SingleByteData#,
198 prevrust-analyzer cargo chardetng 0.1.17 NonLatinCasedCandidate#prev.: u8,
199 case_staterust-analyzer cargo chardetng 0.1.17 NonLatinCasedCandidate#case_state.: NonLatinCaseStaterust-analyzer cargo chardetng 0.1.17 NonLatinCaseState#,
200 prev_asciirust-analyzer cargo chardetng 0.1.17 NonLatinCasedCandidate#prev_ascii.: bool,
201 current_word_lenrust-analyzer cargo chardetng 0.1.17 NonLatinCasedCandidate#current_word_len.: u64,
202 longest_wordrust-analyzer cargo chardetng 0.1.17 NonLatinCasedCandidate#longest_word.: u64,
203 ibm866rust-analyzer cargo chardetng 0.1.17 NonLatinCasedCandidate#ibm866.: bool,
204 prev_was_a0rust-analyzer cargo chardetng 0.1.17 NonLatinCasedCandidate#prev_was_a0.: bool, // Only used with IBM866
205 }
206
207 impl NonLatinCasedCandidaterust-analyzer cargo chardetng 0.1.17 NonLatinCasedCandidate# {
208 fn newrust-analyzer cargo chardetng 0.1.17 impl#[NonLatinCasedCandidate]new().(data: &'static SingleByteDatarust-analyzer cargo chardetng 0.1.17 data/SingleByteData#) -> Selfrust-analyzer cargo chardetng 0.1.17 impl#[NonLatinCasedCandidate] {
209 NonLatinCasedCandidaterust-analyzer cargo chardetng 0.1.17 NonLatinCasedCandidate# {
210 datarust-analyzer cargo chardetng 0.1.17 NonLatinCasedCandidate#data.: data,
211 prevrust-analyzer cargo chardetng 0.1.17 NonLatinCasedCandidate#prev.: 0,
212 case_staterust-analyzer cargo chardetng 0.1.17 NonLatinCasedCandidate#case_state.: NonLatinCaseStaterust-analyzer cargo chardetng 0.1.17 NonLatinCaseState#::Spacerust-analyzer cargo chardetng 0.1.17 NonLatinCaseState#Space#,
213 prev_asciirust-analyzer cargo chardetng 0.1.17 NonLatinCasedCandidate#prev_ascii.: true,
214 current_word_lenrust-analyzer cargo chardetng 0.1.17 NonLatinCasedCandidate#current_word_len.: 0,
215 longest_wordrust-analyzer cargo chardetng 0.1.17 NonLatinCasedCandidate#longest_word.: 0,
216 ibm866rust-analyzer cargo chardetng 0.1.17 NonLatinCasedCandidate#ibm866.: data rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[`&A`][`PartialEq<&B>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[`&A`][`PartialEq<&B>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[`&A`][`PartialEq<&B>`]eq().&SINGLE_BYTE_DATArust-analyzer cargo chardetng 0.1.17 data/SINGLE_BYTE_DATA.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().IBM866_INDEXrust-analyzer cargo chardetng 0.1.17 data/IBM866_INDEX.]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().,
217 prev_was_a0rust-analyzer cargo chardetng 0.1.17 NonLatinCasedCandidate#prev_was_a0.: false,
218 }
219 }
220
221 fn feedrust-analyzer cargo chardetng 0.1.17 impl#[NonLatinCasedCandidate]feed().(&mut self, buffer: &[u8]) -> Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<i64> {
222 let mut score = 0i64;
223 for &b in buffer {
224 let class = self.datarust-analyzer cargo chardetng 0.1.17 NonLatinCasedCandidate#data..classifyrust-analyzer cargo chardetng 0.1.17 data/impl#[SingleByteData]classify().(b);
225 if class rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().255 {
226 return Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#;
227 }
228 let caseless_class = class rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`BitAnd<Self>`]bitand().&rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`BitAnd<Self>`]bitand(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`BitAnd<Self>`]bitand().0x7F;
229
230 let ascii = b rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]lt().<rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]lt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]lt().0x80;
231 let ascii_pair = self.prev_asciirust-analyzer cargo chardetng 0.1.17 NonLatinCasedCandidate#prev_ascii. && ascii;
232
233 let non_ascii_alphabetic = self.datarust-analyzer cargo chardetng 0.1.17 NonLatinCasedCandidate#data..is_non_latin_alphabeticrust-analyzer cargo chardetng 0.1.17 data/impl#[SingleByteData]is_non_latin_alphabetic().(caseless_class, false);
234
235 // The purpose of this state machine is to avoid misdetecting Greek as
236 // Cyrillic by:
237 //
238 // * Giving a small bonus to words that start with an upper-case letter
239 // and are lower-case for the rest.
240 // * Giving a large penalty to start with one lower-case letter followed
241 // by all upper-case (obviously upper and lower case inverted, which
242 // unfortunately is possible due to KOI8-U).
243 // * Giving a small per-word penalty to all-uppercase KOI8-U (to favor
244 // all-lowercase Greek over all-caps KOI8-U).
245 // * Giving large penalties for mixed-case other than initial upper-case.
246 // This also helps relative to non-cased encodings.
247
248 // ASCII doesn't participate in non-Latin casing.
249 if caseless_class rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().LATIN_LETTERrust-analyzer cargo chardetng 0.1.17 LATIN_LETTER. {
250 // Latin
251 // Mark this word as a mess. If there end up being non-Latin
252 // letters in this word, the ASCII-adjacency penalty gets
253 // applied to Latin/non-Latin pairs and the mix penalty
254 // to non-Latin/non-Latin pairs.
255 // XXX Apply penalty here
256 self.case_staterust-analyzer cargo chardetng 0.1.17 NonLatinCasedCandidate#case_state. = NonLatinCaseStaterust-analyzer cargo chardetng 0.1.17 NonLatinCaseState#::Mixrust-analyzer cargo chardetng 0.1.17 NonLatinCaseState#Mix#;
257 } else if !rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[bool][Not]not().non_ascii_alphabetic {
258 // Space
259 match self.case_staterust-analyzer cargo chardetng 0.1.17 NonLatinCasedCandidate#case_state. {
260 NonLatinCaseStaterust-analyzer cargo chardetng 0.1.17 NonLatinCaseState#::Spacerust-analyzer cargo chardetng 0.1.17 NonLatinCaseState#Space#
261 | NonLatinCaseStaterust-analyzer cargo chardetng 0.1.17 NonLatinCaseState#::Upperrust-analyzer cargo chardetng 0.1.17 NonLatinCaseState#Upper#
262 | NonLatinCaseStaterust-analyzer cargo chardetng 0.1.17 NonLatinCaseState#::Lowerrust-analyzer cargo chardetng 0.1.17 NonLatinCaseState#Lower# => {}
263 NonLatinCaseStaterust-analyzer cargo chardetng 0.1.17 NonLatinCaseState#::UpperLowerrust-analyzer cargo chardetng 0.1.17 NonLatinCaseState#UpperLower# => {
264 // Intentionally applied only once per word.
265 score rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().NON_LATIN_CAPITALIZATION_BONUSrust-analyzer cargo chardetng 0.1.17 NON_LATIN_CAPITALIZATION_BONUS.;
266 }
267 NonLatinCaseStaterust-analyzer cargo chardetng 0.1.17 NonLatinCaseState#::AllCapsrust-analyzer cargo chardetng 0.1.17 NonLatinCaseState#AllCaps# => {
268 // Intentionally applied only once per word.
269 if self.datarust-analyzer cargo chardetng 0.1.17 NonLatinCasedCandidate#data. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[`&A`][`PartialEq<&B>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[`&A`][`PartialEq<&B>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[`&A`][`PartialEq<&B>`]eq().&SINGLE_BYTE_DATArust-analyzer cargo chardetng 0.1.17 data/SINGLE_BYTE_DATA.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().KOI8_U_INDEXrust-analyzer cargo chardetng 0.1.17 data/KOI8_U_INDEX.]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index(). {
270 // Apply only to KOI8-U.
271 score rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().NON_LATIN_ALL_CAPS_PENALTYrust-analyzer cargo chardetng 0.1.17 NON_LATIN_ALL_CAPS_PENALTY.;
272 }
273 }
274 NonLatinCaseStaterust-analyzer cargo chardetng 0.1.17 NonLatinCaseState#::Mixrust-analyzer cargo chardetng 0.1.17 NonLatinCaseState#Mix# => {
275 // Per letter
276 score rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().NON_LATIN_MIXED_CASE_PENALTYrust-analyzer cargo chardetng 0.1.17 NON_LATIN_MIXED_CASE_PENALTY. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`Mul<Self>`]mul().(self.current_word_lenrust-analyzer cargo chardetng 0.1.17 NonLatinCasedCandidate#current_word_len. as i64);
277 }
278 }
279 self.case_staterust-analyzer cargo chardetng 0.1.17 NonLatinCasedCandidate#case_state. = NonLatinCaseStaterust-analyzer cargo chardetng 0.1.17 NonLatinCaseState#::Spacerust-analyzer cargo chardetng 0.1.17 NonLatinCaseState#Space#;
280 } else if (class rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`Shr<i32>`]shr().>>rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`Shr<i32>`]shr(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`Shr<i32>`]shr().7) rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().0 {
281 // Lower case
282 match self.case_staterust-analyzer cargo chardetng 0.1.17 NonLatinCasedCandidate#case_state. {
283 NonLatinCaseStaterust-analyzer cargo chardetng 0.1.17 NonLatinCaseState#::Spacerust-analyzer cargo chardetng 0.1.17 NonLatinCaseState#Space# => {
284 self.case_staterust-analyzer cargo chardetng 0.1.17 NonLatinCasedCandidate#case_state. = NonLatinCaseStaterust-analyzer cargo chardetng 0.1.17 NonLatinCaseState#::Lowerrust-analyzer cargo chardetng 0.1.17 NonLatinCaseState#Lower#;
285 }
286 NonLatinCaseStaterust-analyzer cargo chardetng 0.1.17 NonLatinCaseState#::Upperrust-analyzer cargo chardetng 0.1.17 NonLatinCaseState#Upper# => {
287 self.case_staterust-analyzer cargo chardetng 0.1.17 NonLatinCasedCandidate#case_state. = NonLatinCaseStaterust-analyzer cargo chardetng 0.1.17 NonLatinCaseState#::UpperLowerrust-analyzer cargo chardetng 0.1.17 NonLatinCaseState#UpperLower#;
288 }
289 NonLatinCaseStaterust-analyzer cargo chardetng 0.1.17 NonLatinCaseState#::Lowerrust-analyzer cargo chardetng 0.1.17 NonLatinCaseState#Lower#
290 | NonLatinCaseStaterust-analyzer cargo chardetng 0.1.17 NonLatinCaseState#::UpperLowerrust-analyzer cargo chardetng 0.1.17 NonLatinCaseState#UpperLower#
291 | NonLatinCaseStaterust-analyzer cargo chardetng 0.1.17 NonLatinCaseState#::Mixrust-analyzer cargo chardetng 0.1.17 NonLatinCaseState#Mix# => {}
292 NonLatinCaseStaterust-analyzer cargo chardetng 0.1.17 NonLatinCaseState#::AllCapsrust-analyzer cargo chardetng 0.1.17 NonLatinCaseState#AllCaps# => {
293 self.case_staterust-analyzer cargo chardetng 0.1.17 NonLatinCasedCandidate#case_state. = NonLatinCaseStaterust-analyzer cargo chardetng 0.1.17 NonLatinCaseState#::Mixrust-analyzer cargo chardetng 0.1.17 NonLatinCaseState#Mix#;
294 }
295 }
296 } else {
297 // Upper case
298 match self.case_staterust-analyzer cargo chardetng 0.1.17 NonLatinCasedCandidate#case_state. {
299 NonLatinCaseStaterust-analyzer cargo chardetng 0.1.17 NonLatinCaseState#::Spacerust-analyzer cargo chardetng 0.1.17 NonLatinCaseState#Space# => {
300 self.case_staterust-analyzer cargo chardetng 0.1.17 NonLatinCasedCandidate#case_state. = NonLatinCaseStaterust-analyzer cargo chardetng 0.1.17 NonLatinCaseState#::Upperrust-analyzer cargo chardetng 0.1.17 NonLatinCaseState#Upper#;
301 }
302 NonLatinCaseStaterust-analyzer cargo chardetng 0.1.17 NonLatinCaseState#::Upperrust-analyzer cargo chardetng 0.1.17 NonLatinCaseState#Upper# => {
303 self.case_staterust-analyzer cargo chardetng 0.1.17 NonLatinCasedCandidate#case_state. = NonLatinCaseStaterust-analyzer cargo chardetng 0.1.17 NonLatinCaseState#::AllCapsrust-analyzer cargo chardetng 0.1.17 NonLatinCaseState#AllCaps#;
304 }
305 NonLatinCaseStaterust-analyzer cargo chardetng 0.1.17 NonLatinCaseState#::Lowerrust-analyzer cargo chardetng 0.1.17 NonLatinCaseState#Lower# | NonLatinCaseStaterust-analyzer cargo chardetng 0.1.17 NonLatinCaseState#::UpperLowerrust-analyzer cargo chardetng 0.1.17 NonLatinCaseState#UpperLower# => {
306 self.case_staterust-analyzer cargo chardetng 0.1.17 NonLatinCasedCandidate#case_state. = NonLatinCaseStaterust-analyzer cargo chardetng 0.1.17 NonLatinCaseState#::Mixrust-analyzer cargo chardetng 0.1.17 NonLatinCaseState#Mix#;
307 }
308 NonLatinCaseStaterust-analyzer cargo chardetng 0.1.17 NonLatinCaseState#::AllCapsrust-analyzer cargo chardetng 0.1.17 NonLatinCaseState#AllCaps# | NonLatinCaseStaterust-analyzer cargo chardetng 0.1.17 NonLatinCaseState#::Mixrust-analyzer cargo chardetng 0.1.17 NonLatinCaseState#Mix# => {}
309 }
310 }
311
312 // XXX Apply penalty if > 16
313 if non_ascii_alphabetic {
314 self.current_word_lenrust-analyzer cargo chardetng 0.1.17 NonLatinCasedCandidate#current_word_len. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u64][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u64][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u64][`AddAssign<Self>`]add_assign().1;
315 } else {
316 if self.current_word_lenrust-analyzer cargo chardetng 0.1.17 NonLatinCasedCandidate#current_word_len. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u64][`PartialOrd<Self>`]gt().>rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u64][`PartialOrd<Self>`]gt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u64][`PartialOrd<Self>`]gt().self.longest_wordrust-analyzer cargo chardetng 0.1.17 NonLatinCasedCandidate#longest_word. {
317 self.longest_wordrust-analyzer cargo chardetng 0.1.17 NonLatinCasedCandidate#longest_word. = self.current_word_lenrust-analyzer cargo chardetng 0.1.17 NonLatinCasedCandidate#current_word_len.;
318 }
319 self.current_word_lenrust-analyzer cargo chardetng 0.1.17 NonLatinCasedCandidate#current_word_len. = 0;
320 }
321
322 let is_a0 = b rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().0xA0;
323 if !rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[bool][Not]not().ascii_pair {
324 // 0xA0 is no-break space in many other encodings, so avoid
325 // assigning score to IBM866 when 0xA0 occurs next to itself
326 // or a space-like byte.
327 if !rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[bool][Not]not().(self.ibm866rust-analyzer cargo chardetng 0.1.17 NonLatinCasedCandidate#ibm866.
328 && ((is_a0 && (self.prev_was_a0rust-analyzer cargo chardetng 0.1.17 NonLatinCasedCandidate#prev_was_a0. || self.prevrust-analyzer cargo chardetng 0.1.17 NonLatinCasedCandidate#prev. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().0))
329 || caseless_class rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().0 && self.prev_was_a0rust-analyzer cargo chardetng 0.1.17 NonLatinCasedCandidate#prev_was_a0.))
330 {
331 score rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().self.datarust-analyzer cargo chardetng 0.1.17 NonLatinCasedCandidate#data..scorerust-analyzer cargo chardetng 0.1.17 data/impl#[SingleByteData]score().(caseless_class, self.prevrust-analyzer cargo chardetng 0.1.17 NonLatinCasedCandidate#prev., false);
332 }
333
334 if self.prevrust-analyzer cargo chardetng 0.1.17 NonLatinCasedCandidate#prev. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().LATIN_LETTERrust-analyzer cargo chardetng 0.1.17 LATIN_LETTER. && non_ascii_alphabetic {
335 score rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().LATIN_ADJACENCY_PENALTYrust-analyzer cargo chardetng 0.1.17 LATIN_ADJACENCY_PENALTY.;
336 } else if caseless_class rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().LATIN_LETTERrust-analyzer cargo chardetng 0.1.17 LATIN_LETTER.
337 && self.datarust-analyzer cargo chardetng 0.1.17 NonLatinCasedCandidate#data..is_non_latin_alphabeticrust-analyzer cargo chardetng 0.1.17 data/impl#[SingleByteData]is_non_latin_alphabetic().(self.prevrust-analyzer cargo chardetng 0.1.17 NonLatinCasedCandidate#prev., false)
338 {
339 score rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().LATIN_ADJACENCY_PENALTYrust-analyzer cargo chardetng 0.1.17 LATIN_ADJACENCY_PENALTY.;
340 }
341 }
342
343 self.prev_asciirust-analyzer cargo chardetng 0.1.17 NonLatinCasedCandidate#prev_ascii. = ascii;
344 self.prevrust-analyzer cargo chardetng 0.1.17 NonLatinCasedCandidate#prev. = caseless_class;
345 self.prev_was_a0rust-analyzer cargo chardetng 0.1.17 NonLatinCasedCandidate#prev_was_a0. = is_a0;
346 }
347 Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(score)
348 }
349 }
350
351 enum OrdinalStaterust-analyzer cargo chardetng 0.1.17 OrdinalState# {
352 Otherrust-analyzer cargo chardetng 0.1.17 OrdinalState#Other#,
353 Spacerust-analyzer cargo chardetng 0.1.17 OrdinalState#Space#,
354 PeriodAfterNrust-analyzer cargo chardetng 0.1.17 OrdinalState#PeriodAfterN#,
355 OrdinalExpectingSpacerust-analyzer cargo chardetng 0.1.17 OrdinalState#OrdinalExpectingSpace#,
356 OrdinalExpectingSpaceUndoImplausibilityrust-analyzer cargo chardetng 0.1.17 OrdinalState#OrdinalExpectingSpaceUndoImplausibility#,
357 OrdinalExpectingSpaceOrDigitrust-analyzer cargo chardetng 0.1.17 OrdinalState#OrdinalExpectingSpaceOrDigit#,
358 OrdinalExpectingSpaceOrDigitUndoImplausibilyrust-analyzer cargo chardetng 0.1.17 OrdinalState#OrdinalExpectingSpaceOrDigitUndoImplausibily#,
359 UpperNrust-analyzer cargo chardetng 0.1.17 OrdinalState#UpperN#,
360 LowerNrust-analyzer cargo chardetng 0.1.17 OrdinalState#LowerN#,
361 FeminineAbbreviationStartLetterrust-analyzer cargo chardetng 0.1.17 OrdinalState#FeminineAbbreviationStartLetter#,
362 Digitrust-analyzer cargo chardetng 0.1.17 OrdinalState#Digit#,
363 Romanrust-analyzer cargo chardetng 0.1.17 OrdinalState#Roman#,
364 Copyrightrust-analyzer cargo chardetng 0.1.17 OrdinalState#Copyright#,
365 }
366
367 struct LatinCandidaterust-analyzer cargo chardetng 0.1.17 LatinCandidate# {
368 datarust-analyzer cargo chardetng 0.1.17 LatinCandidate#data.: &'static SingleByteDatarust-analyzer cargo chardetng 0.1.17 data/SingleByteData#,
369 prevrust-analyzer cargo chardetng 0.1.17 LatinCandidate#prev.: u8,
370 case_staterust-analyzer cargo chardetng 0.1.17 LatinCandidate#case_state.: LatinCaseStaterust-analyzer cargo chardetng 0.1.17 LatinCaseState#,
371 prev_non_asciirust-analyzer cargo chardetng 0.1.17 LatinCandidate#prev_non_ascii.: u32,
372 ordinal_staterust-analyzer cargo chardetng 0.1.17 LatinCandidate#ordinal_state.: OrdinalStaterust-analyzer cargo chardetng 0.1.17 OrdinalState#, // Used only when `windows1252 == true`
373 windows1252rust-analyzer cargo chardetng 0.1.17 LatinCandidate#windows1252.: bool,
374 }
375
376 impl LatinCandidaterust-analyzer cargo chardetng 0.1.17 LatinCandidate# {
377 fn newrust-analyzer cargo chardetng 0.1.17 impl#[LatinCandidate]new().(data: &'static SingleByteDatarust-analyzer cargo chardetng 0.1.17 data/SingleByteData#) -> Selfrust-analyzer cargo chardetng 0.1.17 impl#[LatinCandidate] {
378 LatinCandidaterust-analyzer cargo chardetng 0.1.17 LatinCandidate# {
379 datarust-analyzer cargo chardetng 0.1.17 LatinCandidate#data.: data,
380 prevrust-analyzer cargo chardetng 0.1.17 LatinCandidate#prev.: 0,
381 case_staterust-analyzer cargo chardetng 0.1.17 LatinCandidate#case_state.: LatinCaseStaterust-analyzer cargo chardetng 0.1.17 LatinCaseState#::Spacerust-analyzer cargo chardetng 0.1.17 LatinCaseState#Space#,
382 prev_non_asciirust-analyzer cargo chardetng 0.1.17 LatinCandidate#prev_non_ascii.: 0,
383 ordinal_staterust-analyzer cargo chardetng 0.1.17 LatinCandidate#ordinal_state.: OrdinalStaterust-analyzer cargo chardetng 0.1.17 OrdinalState#::Spacerust-analyzer cargo chardetng 0.1.17 OrdinalState#Space#,
384 windows1252rust-analyzer cargo chardetng 0.1.17 LatinCandidate#windows1252.: data rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[`&A`][`PartialEq<&B>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[`&A`][`PartialEq<&B>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[`&A`][`PartialEq<&B>`]eq().&SINGLE_BYTE_DATArust-analyzer cargo chardetng 0.1.17 data/SINGLE_BYTE_DATA.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().WINDOWS_1252_INDEXrust-analyzer cargo chardetng 0.1.17 data/WINDOWS_1252_INDEX.]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().,
385 }
386 }
387
388 fn feedrust-analyzer cargo chardetng 0.1.17 impl#[LatinCandidate]feed().(&mut self, buffer: &[u8]) -> Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<i64> {
389 let mut score = 0i64;
390 for &b in buffer {
391 let class = self.datarust-analyzer cargo chardetng 0.1.17 LatinCandidate#data..classifyrust-analyzer cargo chardetng 0.1.17 data/impl#[SingleByteData]classify().(b);
392 if class rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().255 {
393 return Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#;
394 }
395 let caseless_class = class rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`BitAnd<Self>`]bitand().&rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`BitAnd<Self>`]bitand(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`BitAnd<Self>`]bitand().0x7F;
396
397 let ascii = b rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]lt().<rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]lt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]lt().0x80;
398 let ascii_pair = self.prev_non_asciirust-analyzer cargo chardetng 0.1.17 LatinCandidate#prev_non_ascii. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialEq<Self>`]eq().0 && ascii;
399
400 let non_ascii_penalty = match self.prev_non_asciirust-analyzer cargo chardetng 0.1.17 LatinCandidate#prev_non_ascii. {
401 0 | 1 | 2 => 0,
402 3 => -rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][Neg]neg().5,
403 4 => -rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][Neg]neg().20,
404 _ => -rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][Neg]neg().200,
405 };
406 score rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().non_ascii_penalty;
407 // XXX if has Vietnamese-only characters and word length > 7,
408 // apply penalty
409
410 if !rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[bool][Not]not().self.datarust-analyzer cargo chardetng 0.1.17 LatinCandidate#data..is_latin_alphabeticrust-analyzer cargo chardetng 0.1.17 data/impl#[SingleByteData]is_latin_alphabetic().(caseless_class) {
411 self.case_staterust-analyzer cargo chardetng 0.1.17 LatinCandidate#case_state. = LatinCaseStaterust-analyzer cargo chardetng 0.1.17 LatinCaseState#::Spacerust-analyzer cargo chardetng 0.1.17 LatinCaseState#Space#;
412 } else if (class rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`Shr<i32>`]shr().>>rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`Shr<i32>`]shr(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`Shr<i32>`]shr().7) rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().0 {
413 // Penalizing lower case after two upper case
414 // is important for avoiding misdetecting
415 // windows-1250 as windows-1252 (byte 0x9F).
416 if self.case_staterust-analyzer cargo chardetng 0.1.17 LatinCandidate#case_state. rust-analyzer cargo chardetng 0.1.17 impl#[LatinCaseState][`PartialEq<Self>`]eq().==rust-analyzer cargo chardetng 0.1.17 impl#[LatinCaseState][`PartialEq<Self>`]eq(). rust-analyzer cargo chardetng 0.1.17 impl#[LatinCaseState][`PartialEq<Self>`]eq().LatinCaseStaterust-analyzer cargo chardetng 0.1.17 LatinCaseState#::AllCapsrust-analyzer cargo chardetng 0.1.17 LatinCaseState#AllCaps# && !rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[bool][Not]not().ascii_pair {
417 score rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().IMPLAUSIBLE_LATIN_CASE_TRANSITION_PENALTYrust-analyzer cargo chardetng 0.1.17 IMPLAUSIBLE_LATIN_CASE_TRANSITION_PENALTY.;
418 }
419 self.case_staterust-analyzer cargo chardetng 0.1.17 LatinCandidate#case_state. = LatinCaseStaterust-analyzer cargo chardetng 0.1.17 LatinCaseState#::Lowerrust-analyzer cargo chardetng 0.1.17 LatinCaseState#Lower#;
420 } else {
421 match self.case_staterust-analyzer cargo chardetng 0.1.17 LatinCandidate#case_state. {
422 LatinCaseStaterust-analyzer cargo chardetng 0.1.17 LatinCaseState#::Spacerust-analyzer cargo chardetng 0.1.17 LatinCaseState#Space# => {
423 self.case_staterust-analyzer cargo chardetng 0.1.17 LatinCandidate#case_state. = LatinCaseStaterust-analyzer cargo chardetng 0.1.17 LatinCaseState#::Upperrust-analyzer cargo chardetng 0.1.17 LatinCaseState#Upper#;
424 }
425 LatinCaseStaterust-analyzer cargo chardetng 0.1.17 LatinCaseState#::Upperrust-analyzer cargo chardetng 0.1.17 LatinCaseState#Upper# | LatinCaseStaterust-analyzer cargo chardetng 0.1.17 LatinCaseState#::AllCapsrust-analyzer cargo chardetng 0.1.17 LatinCaseState#AllCaps# => {
426 self.case_staterust-analyzer cargo chardetng 0.1.17 LatinCandidate#case_state. = LatinCaseStaterust-analyzer cargo chardetng 0.1.17 LatinCaseState#::AllCapsrust-analyzer cargo chardetng 0.1.17 LatinCaseState#AllCaps#;
427 }
428 LatinCaseStaterust-analyzer cargo chardetng 0.1.17 LatinCaseState#::Lowerrust-analyzer cargo chardetng 0.1.17 LatinCaseState#Lower# => {
429 if !rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[bool][Not]not().ascii_pair {
430 // XXX How bad is this for Irish Gaelic?
431 score rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().IMPLAUSIBLE_LATIN_CASE_TRANSITION_PENALTYrust-analyzer cargo chardetng 0.1.17 IMPLAUSIBLE_LATIN_CASE_TRANSITION_PENALTY.;
432 }
433 self.case_staterust-analyzer cargo chardetng 0.1.17 LatinCandidate#case_state. = LatinCaseStaterust-analyzer cargo chardetng 0.1.17 LatinCaseState#::Upperrust-analyzer cargo chardetng 0.1.17 LatinCaseState#Upper#;
434 }
435 }
436 }
437
438 // Treat pairing space-like, which can be non-ASCII, with ASCII as
439 // ASCIIish enough not to get a score in order to avoid giving
440 // ASCII i and I in windows-1254 next to windows-125x apostrophe/quote
441 // a score. This avoids detecting English I’ as Turkish.
442 let ascii_ish_pair = ascii_pair
443 || (ascii && self.prevrust-analyzer cargo chardetng 0.1.17 LatinCandidate#prev. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().0)
444 || (caseless_class rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().0 && self.prev_non_asciirust-analyzer cargo chardetng 0.1.17 LatinCandidate#prev_non_ascii. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialEq<Self>`]eq().0);
445
446 if !rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[bool][Not]not().ascii_ish_pair {
447 score rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().self.datarust-analyzer cargo chardetng 0.1.17 LatinCandidate#data..scorerust-analyzer cargo chardetng 0.1.17 data/impl#[SingleByteData]score().(caseless_class, self.prevrust-analyzer cargo chardetng 0.1.17 LatinCandidate#prev., false);
448 }
449
450 if self.windows1252rust-analyzer cargo chardetng 0.1.17 LatinCandidate#windows1252. {
451 // This state machine assigns score to the sequences
452 // * " º " (Spanish)
453 // * " ª " (Spanish)
454 // * ".ª " (Spanish)
455 // * ".º " (Spanish)
456 // * "n.º1" (Spanish)
457 // * " Mª " (Spanish)
458 // * " Dª " (Spanish)
459 // * " Nª " (Spanish)
460 // * " Sª " (Spanish)
461 // * " 3º " (Italian, where 3 is an ASCII digit)
462 // * " 3ª " (Italian, where 3 is an ASCII digit)
463 // * " Xº " (Italian, where X is a small Roman numeral)
464 // * " Xª " (Italian, where X is a small Roman numeral)
465 // * " Nº1" (Italian, where 1 is an ASCII digit)
466 // * " Nº " (Italian)
467 // * " © " (otherwise ASCII-only)
468 // which are problematic to deal with by pairwise scoring
469 // without messing up Romanian detection.
470 // Initial sc
471 match self.ordinal_staterust-analyzer cargo chardetng 0.1.17 LatinCandidate#ordinal_state. {
472 OrdinalStaterust-analyzer cargo chardetng 0.1.17 OrdinalState#::Otherrust-analyzer cargo chardetng 0.1.17 OrdinalState#Other# => {
473 if caseless_class rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().0 {
474 self.ordinal_staterust-analyzer cargo chardetng 0.1.17 LatinCandidate#ordinal_state. = OrdinalStaterust-analyzer cargo chardetng 0.1.17 OrdinalState#::Spacerust-analyzer cargo chardetng 0.1.17 OrdinalState#Space#;
475 }
476 }
477 OrdinalStaterust-analyzer cargo chardetng 0.1.17 OrdinalState#::Spacerust-analyzer cargo chardetng 0.1.17 OrdinalState#Space# => {
478 if caseless_class rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().0 {
479 // pass
480 } else if b rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().0xAA || b rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().0xBA {
481 self.ordinal_staterust-analyzer cargo chardetng 0.1.17 LatinCandidate#ordinal_state. = OrdinalStaterust-analyzer cargo chardetng 0.1.17 OrdinalState#::OrdinalExpectingSpacerust-analyzer cargo chardetng 0.1.17 OrdinalState#OrdinalExpectingSpace#;
482 } else if b rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().b'M' || b rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().b'D' || b rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().b'S' {
483 self.ordinal_staterust-analyzer cargo chardetng 0.1.17 LatinCandidate#ordinal_state. = OrdinalStaterust-analyzer cargo chardetng 0.1.17 OrdinalState#::FeminineAbbreviationStartLetterrust-analyzer cargo chardetng 0.1.17 OrdinalState#FeminineAbbreviationStartLetter#;
484 } else if b rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().b'N' {
485 // numero or Nuestra
486 self.ordinal_staterust-analyzer cargo chardetng 0.1.17 LatinCandidate#ordinal_state. = OrdinalStaterust-analyzer cargo chardetng 0.1.17 OrdinalState#::UpperNrust-analyzer cargo chardetng 0.1.17 OrdinalState#UpperN#;
487 } else if b rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().b'n' {
488 // numero
489 self.ordinal_staterust-analyzer cargo chardetng 0.1.17 LatinCandidate#ordinal_state. = OrdinalStaterust-analyzer cargo chardetng 0.1.17 OrdinalState#::LowerNrust-analyzer cargo chardetng 0.1.17 OrdinalState#LowerN#;
490 } else if caseless_class rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().(ASCII_DIGITrust-analyzer cargo chardetng 0.1.17 data/ASCII_DIGIT. as u8) {
491 self.ordinal_staterust-analyzer cargo chardetng 0.1.17 LatinCandidate#ordinal_state. = OrdinalStaterust-analyzer cargo chardetng 0.1.17 OrdinalState#::Digitrust-analyzer cargo chardetng 0.1.17 OrdinalState#Digit#;
492 } else if caseless_class rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().9 /* I */ || caseless_class rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().22 /* V */ || caseless_class rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().24
493 /* X */
494 {
495 self.ordinal_staterust-analyzer cargo chardetng 0.1.17 LatinCandidate#ordinal_state. = OrdinalStaterust-analyzer cargo chardetng 0.1.17 OrdinalState#::Romanrust-analyzer cargo chardetng 0.1.17 OrdinalState#Roman#;
496 } else if b rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().0xA9 {
497 self.ordinal_staterust-analyzer cargo chardetng 0.1.17 LatinCandidate#ordinal_state. = OrdinalStaterust-analyzer cargo chardetng 0.1.17 OrdinalState#::Copyrightrust-analyzer cargo chardetng 0.1.17 OrdinalState#Copyright#;
498 } else {
499 self.ordinal_staterust-analyzer cargo chardetng 0.1.17 LatinCandidate#ordinal_state. = OrdinalStaterust-analyzer cargo chardetng 0.1.17 OrdinalState#::Otherrust-analyzer cargo chardetng 0.1.17 OrdinalState#Other#;
500 }
501 }
502 OrdinalStaterust-analyzer cargo chardetng 0.1.17 OrdinalState#::OrdinalExpectingSpacerust-analyzer cargo chardetng 0.1.17 OrdinalState#OrdinalExpectingSpace# => {
503 if caseless_class rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().0 {
504 score rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().ORDINAL_BONUSrust-analyzer cargo chardetng 0.1.17 ORDINAL_BONUS.;
505 self.ordinal_staterust-analyzer cargo chardetng 0.1.17 LatinCandidate#ordinal_state. = OrdinalStaterust-analyzer cargo chardetng 0.1.17 OrdinalState#::Spacerust-analyzer cargo chardetng 0.1.17 OrdinalState#Space#;
506 } else {
507 self.ordinal_staterust-analyzer cargo chardetng 0.1.17 LatinCandidate#ordinal_state. = OrdinalStaterust-analyzer cargo chardetng 0.1.17 OrdinalState#::Otherrust-analyzer cargo chardetng 0.1.17 OrdinalState#Other#;
508 }
509 }
510 OrdinalStaterust-analyzer cargo chardetng 0.1.17 OrdinalState#::OrdinalExpectingSpaceUndoImplausibilityrust-analyzer cargo chardetng 0.1.17 OrdinalState#OrdinalExpectingSpaceUndoImplausibility# => {
511 if caseless_class rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().0 {
512 score rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().ORDINAL_BONUSrust-analyzer cargo chardetng 0.1.17 ORDINAL_BONUS. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`Sub<Self>`]sub().IMPLAUSIBILITY_PENALTYrust-analyzer cargo chardetng 0.1.17 IMPLAUSIBILITY_PENALTY.;
513 self.ordinal_staterust-analyzer cargo chardetng 0.1.17 LatinCandidate#ordinal_state. = OrdinalStaterust-analyzer cargo chardetng 0.1.17 OrdinalState#::Spacerust-analyzer cargo chardetng 0.1.17 OrdinalState#Space#;
514 } else {
515 self.ordinal_staterust-analyzer cargo chardetng 0.1.17 LatinCandidate#ordinal_state. = OrdinalStaterust-analyzer cargo chardetng 0.1.17 OrdinalState#::Otherrust-analyzer cargo chardetng 0.1.17 OrdinalState#Other#;
516 }
517 }
518 OrdinalStaterust-analyzer cargo chardetng 0.1.17 OrdinalState#::OrdinalExpectingSpaceOrDigitrust-analyzer cargo chardetng 0.1.17 OrdinalState#OrdinalExpectingSpaceOrDigit# => {
519 if caseless_class rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().0 {
520 score rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().ORDINAL_BONUSrust-analyzer cargo chardetng 0.1.17 ORDINAL_BONUS.;
521 self.ordinal_staterust-analyzer cargo chardetng 0.1.17 LatinCandidate#ordinal_state. = OrdinalStaterust-analyzer cargo chardetng 0.1.17 OrdinalState#::Spacerust-analyzer cargo chardetng 0.1.17 OrdinalState#Space#;
522 } else if caseless_class rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().(ASCII_DIGITrust-analyzer cargo chardetng 0.1.17 data/ASCII_DIGIT. as u8) {
523 score rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().ORDINAL_BONUSrust-analyzer cargo chardetng 0.1.17 ORDINAL_BONUS.;
524 // Deliberately set to `Other`
525 self.ordinal_staterust-analyzer cargo chardetng 0.1.17 LatinCandidate#ordinal_state. = OrdinalStaterust-analyzer cargo chardetng 0.1.17 OrdinalState#::Otherrust-analyzer cargo chardetng 0.1.17 OrdinalState#Other#;
526 } else {
527 self.ordinal_staterust-analyzer cargo chardetng 0.1.17 LatinCandidate#ordinal_state. = OrdinalStaterust-analyzer cargo chardetng 0.1.17 OrdinalState#::Otherrust-analyzer cargo chardetng 0.1.17 OrdinalState#Other#;
528 }
529 }
530 OrdinalStaterust-analyzer cargo chardetng 0.1.17 OrdinalState#::OrdinalExpectingSpaceOrDigitUndoImplausibilyrust-analyzer cargo chardetng 0.1.17 OrdinalState#OrdinalExpectingSpaceOrDigitUndoImplausibily# => {
531 if caseless_class rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().0 {
532 score rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().ORDINAL_BONUSrust-analyzer cargo chardetng 0.1.17 ORDINAL_BONUS. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`Sub<Self>`]sub().IMPLAUSIBILITY_PENALTYrust-analyzer cargo chardetng 0.1.17 IMPLAUSIBILITY_PENALTY.;
533 self.ordinal_staterust-analyzer cargo chardetng 0.1.17 LatinCandidate#ordinal_state. = OrdinalStaterust-analyzer cargo chardetng 0.1.17 OrdinalState#::Spacerust-analyzer cargo chardetng 0.1.17 OrdinalState#Space#;
534 } else if caseless_class rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().(ASCII_DIGITrust-analyzer cargo chardetng 0.1.17 data/ASCII_DIGIT. as u8) {
535 score rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().ORDINAL_BONUSrust-analyzer cargo chardetng 0.1.17 ORDINAL_BONUS. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`Sub<Self>`]sub().IMPLAUSIBILITY_PENALTYrust-analyzer cargo chardetng 0.1.17 IMPLAUSIBILITY_PENALTY.;
536 // Deliberately set to `Other`
537 self.ordinal_staterust-analyzer cargo chardetng 0.1.17 LatinCandidate#ordinal_state. = OrdinalStaterust-analyzer cargo chardetng 0.1.17 OrdinalState#::Otherrust-analyzer cargo chardetng 0.1.17 OrdinalState#Other#;
538 } else {
539 self.ordinal_staterust-analyzer cargo chardetng 0.1.17 LatinCandidate#ordinal_state. = OrdinalStaterust-analyzer cargo chardetng 0.1.17 OrdinalState#::Otherrust-analyzer cargo chardetng 0.1.17 OrdinalState#Other#;
540 }
541 }
542 OrdinalStaterust-analyzer cargo chardetng 0.1.17 OrdinalState#::UpperNrust-analyzer cargo chardetng 0.1.17 OrdinalState#UpperN# => {
543 if b rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().0xAA {
544 self.ordinal_staterust-analyzer cargo chardetng 0.1.17 LatinCandidate#ordinal_state. =
545 OrdinalStaterust-analyzer cargo chardetng 0.1.17 OrdinalState#::OrdinalExpectingSpaceUndoImplausibilityrust-analyzer cargo chardetng 0.1.17 OrdinalState#OrdinalExpectingSpaceUndoImplausibility#;
546 } else if b rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().0xBA {
547 self.ordinal_staterust-analyzer cargo chardetng 0.1.17 LatinCandidate#ordinal_state. =
548 OrdinalStaterust-analyzer cargo chardetng 0.1.17 OrdinalState#::OrdinalExpectingSpaceOrDigitUndoImplausibilyrust-analyzer cargo chardetng 0.1.17 OrdinalState#OrdinalExpectingSpaceOrDigitUndoImplausibily#;
549 } else if b rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().b'.' {
550 self.ordinal_staterust-analyzer cargo chardetng 0.1.17 LatinCandidate#ordinal_state. = OrdinalStaterust-analyzer cargo chardetng 0.1.17 OrdinalState#::PeriodAfterNrust-analyzer cargo chardetng 0.1.17 OrdinalState#PeriodAfterN#;
551 } else if caseless_class rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().0 {
552 self.ordinal_staterust-analyzer cargo chardetng 0.1.17 LatinCandidate#ordinal_state. = OrdinalStaterust-analyzer cargo chardetng 0.1.17 OrdinalState#::Spacerust-analyzer cargo chardetng 0.1.17 OrdinalState#Space#;
553 } else {
554 self.ordinal_staterust-analyzer cargo chardetng 0.1.17 LatinCandidate#ordinal_state. = OrdinalStaterust-analyzer cargo chardetng 0.1.17 OrdinalState#::Otherrust-analyzer cargo chardetng 0.1.17 OrdinalState#Other#;
555 }
556 }
557 OrdinalStaterust-analyzer cargo chardetng 0.1.17 OrdinalState#::LowerNrust-analyzer cargo chardetng 0.1.17 OrdinalState#LowerN# => {
558 if b rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().0xBA {
559 self.ordinal_staterust-analyzer cargo chardetng 0.1.17 LatinCandidate#ordinal_state. =
560 OrdinalStaterust-analyzer cargo chardetng 0.1.17 OrdinalState#::OrdinalExpectingSpaceOrDigitUndoImplausibilyrust-analyzer cargo chardetng 0.1.17 OrdinalState#OrdinalExpectingSpaceOrDigitUndoImplausibily#;
561 } else if b rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().b'.' {
562 self.ordinal_staterust-analyzer cargo chardetng 0.1.17 LatinCandidate#ordinal_state. = OrdinalStaterust-analyzer cargo chardetng 0.1.17 OrdinalState#::PeriodAfterNrust-analyzer cargo chardetng 0.1.17 OrdinalState#PeriodAfterN#;
563 } else if caseless_class rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().0 {
564 self.ordinal_staterust-analyzer cargo chardetng 0.1.17 LatinCandidate#ordinal_state. = OrdinalStaterust-analyzer cargo chardetng 0.1.17 OrdinalState#::Spacerust-analyzer cargo chardetng 0.1.17 OrdinalState#Space#;
565 } else {
566 self.ordinal_staterust-analyzer cargo chardetng 0.1.17 LatinCandidate#ordinal_state. = OrdinalStaterust-analyzer cargo chardetng 0.1.17 OrdinalState#::Otherrust-analyzer cargo chardetng 0.1.17 OrdinalState#Other#;
567 }
568 }
569 OrdinalStaterust-analyzer cargo chardetng 0.1.17 OrdinalState#::FeminineAbbreviationStartLetterrust-analyzer cargo chardetng 0.1.17 OrdinalState#FeminineAbbreviationStartLetter# => {
570 if b rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().0xAA {
571 self.ordinal_staterust-analyzer cargo chardetng 0.1.17 LatinCandidate#ordinal_state. =
572 OrdinalStaterust-analyzer cargo chardetng 0.1.17 OrdinalState#::OrdinalExpectingSpaceUndoImplausibilityrust-analyzer cargo chardetng 0.1.17 OrdinalState#OrdinalExpectingSpaceUndoImplausibility#;
573 } else if caseless_class rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().0 {
574 self.ordinal_staterust-analyzer cargo chardetng 0.1.17 LatinCandidate#ordinal_state. = OrdinalStaterust-analyzer cargo chardetng 0.1.17 OrdinalState#::Spacerust-analyzer cargo chardetng 0.1.17 OrdinalState#Space#;
575 } else {
576 self.ordinal_staterust-analyzer cargo chardetng 0.1.17 LatinCandidate#ordinal_state. = OrdinalStaterust-analyzer cargo chardetng 0.1.17 OrdinalState#::Otherrust-analyzer cargo chardetng 0.1.17 OrdinalState#Other#;
577 }
578 }
579 OrdinalStaterust-analyzer cargo chardetng 0.1.17 OrdinalState#::Digitrust-analyzer cargo chardetng 0.1.17 OrdinalState#Digit# => {
580 if b rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().0xAA || b rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().0xBA {
581 self.ordinal_staterust-analyzer cargo chardetng 0.1.17 LatinCandidate#ordinal_state. = OrdinalStaterust-analyzer cargo chardetng 0.1.17 OrdinalState#::OrdinalExpectingSpacerust-analyzer cargo chardetng 0.1.17 OrdinalState#OrdinalExpectingSpace#;
582 } else if caseless_class rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().0 {
583 self.ordinal_staterust-analyzer cargo chardetng 0.1.17 LatinCandidate#ordinal_state. = OrdinalStaterust-analyzer cargo chardetng 0.1.17 OrdinalState#::Spacerust-analyzer cargo chardetng 0.1.17 OrdinalState#Space#;
584 } else if caseless_class rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().(ASCII_DIGITrust-analyzer cargo chardetng 0.1.17 data/ASCII_DIGIT. as u8) {
585 // pass
586 } else {
587 self.ordinal_staterust-analyzer cargo chardetng 0.1.17 LatinCandidate#ordinal_state. = OrdinalStaterust-analyzer cargo chardetng 0.1.17 OrdinalState#::Otherrust-analyzer cargo chardetng 0.1.17 OrdinalState#Other#;
588 }
589 }
590 OrdinalStaterust-analyzer cargo chardetng 0.1.17 OrdinalState#::Romanrust-analyzer cargo chardetng 0.1.17 OrdinalState#Roman# => {
591 if b rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().0xAA || b rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().0xBA {
592 self.ordinal_staterust-analyzer cargo chardetng 0.1.17 LatinCandidate#ordinal_state. =
593 OrdinalStaterust-analyzer cargo chardetng 0.1.17 OrdinalState#::OrdinalExpectingSpaceUndoImplausibilityrust-analyzer cargo chardetng 0.1.17 OrdinalState#OrdinalExpectingSpaceUndoImplausibility#;
594 } else if caseless_class rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().0 {
595 self.ordinal_staterust-analyzer cargo chardetng 0.1.17 LatinCandidate#ordinal_state. = OrdinalStaterust-analyzer cargo chardetng 0.1.17 OrdinalState#::Spacerust-analyzer cargo chardetng 0.1.17 OrdinalState#Space#;
596 } else if caseless_class rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().9 /* I */ || caseless_class rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().22 /* V */ || caseless_class rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().24
597 /* X */
598 {
599 // pass
600 } else {
601 self.ordinal_staterust-analyzer cargo chardetng 0.1.17 LatinCandidate#ordinal_state. = OrdinalStaterust-analyzer cargo chardetng 0.1.17 OrdinalState#::Otherrust-analyzer cargo chardetng 0.1.17 OrdinalState#Other#;
602 }
603 }
604 OrdinalStaterust-analyzer cargo chardetng 0.1.17 OrdinalState#::PeriodAfterNrust-analyzer cargo chardetng 0.1.17 OrdinalState#PeriodAfterN# => {
605 if b rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().0xBA {
606 self.ordinal_staterust-analyzer cargo chardetng 0.1.17 LatinCandidate#ordinal_state. = OrdinalStaterust-analyzer cargo chardetng 0.1.17 OrdinalState#::OrdinalExpectingSpaceOrDigitrust-analyzer cargo chardetng 0.1.17 OrdinalState#OrdinalExpectingSpaceOrDigit#;
607 } else if caseless_class rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().0 {
608 self.ordinal_staterust-analyzer cargo chardetng 0.1.17 LatinCandidate#ordinal_state. = OrdinalStaterust-analyzer cargo chardetng 0.1.17 OrdinalState#::Spacerust-analyzer cargo chardetng 0.1.17 OrdinalState#Space#;
609 } else {
610 self.ordinal_staterust-analyzer cargo chardetng 0.1.17 LatinCandidate#ordinal_state. = OrdinalStaterust-analyzer cargo chardetng 0.1.17 OrdinalState#::Otherrust-analyzer cargo chardetng 0.1.17 OrdinalState#Other#;
611 }
612 }
613 OrdinalStaterust-analyzer cargo chardetng 0.1.17 OrdinalState#::Copyrightrust-analyzer cargo chardetng 0.1.17 OrdinalState#Copyright# => {
614 if caseless_class rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().0 {
615 score rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().COPYRIGHT_BONUSrust-analyzer cargo chardetng 0.1.17 COPYRIGHT_BONUS.;
616 self.ordinal_staterust-analyzer cargo chardetng 0.1.17 LatinCandidate#ordinal_state. = OrdinalStaterust-analyzer cargo chardetng 0.1.17 OrdinalState#::Spacerust-analyzer cargo chardetng 0.1.17 OrdinalState#Space#;
617 } else {
618 self.ordinal_staterust-analyzer cargo chardetng 0.1.17 LatinCandidate#ordinal_state. = OrdinalStaterust-analyzer cargo chardetng 0.1.17 OrdinalState#::Otherrust-analyzer cargo chardetng 0.1.17 OrdinalState#Other#;
619 }
620 }
621 }
622 }
623
624 if ascii {
625 self.prev_non_asciirust-analyzer cargo chardetng 0.1.17 LatinCandidate#prev_non_ascii. = 0;
626 } else {
627 self.prev_non_asciirust-analyzer cargo chardetng 0.1.17 LatinCandidate#prev_non_ascii. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`AddAssign<Self>`]add_assign().1;
628 }
629 self.prevrust-analyzer cargo chardetng 0.1.17 LatinCandidate#prev. = caseless_class;
630 }
631 Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(score)
632 }
633 }
634
635 struct ArabicFrenchCandidaterust-analyzer cargo chardetng 0.1.17 ArabicFrenchCandidate# {
636 datarust-analyzer cargo chardetng 0.1.17 ArabicFrenchCandidate#data.: &'static SingleByteDatarust-analyzer cargo chardetng 0.1.17 data/SingleByteData#,
637 prevrust-analyzer cargo chardetng 0.1.17 ArabicFrenchCandidate#prev.: u8,
638 case_staterust-analyzer cargo chardetng 0.1.17 ArabicFrenchCandidate#case_state.: LatinCaseStaterust-analyzer cargo chardetng 0.1.17 LatinCaseState#,
639 prev_asciirust-analyzer cargo chardetng 0.1.17 ArabicFrenchCandidate#prev_ascii.: bool,
640 current_word_lenrust-analyzer cargo chardetng 0.1.17 ArabicFrenchCandidate#current_word_len.: u64,
641 longest_wordrust-analyzer cargo chardetng 0.1.17 ArabicFrenchCandidate#longest_word.: u64,
642 }
643
644 impl ArabicFrenchCandidaterust-analyzer cargo chardetng 0.1.17 ArabicFrenchCandidate# {
645 fn newrust-analyzer cargo chardetng 0.1.17 impl#[ArabicFrenchCandidate]new().(data: &'static SingleByteDatarust-analyzer cargo chardetng 0.1.17 data/SingleByteData#) -> Selfrust-analyzer cargo chardetng 0.1.17 impl#[ArabicFrenchCandidate] {
646 ArabicFrenchCandidaterust-analyzer cargo chardetng 0.1.17 ArabicFrenchCandidate# {
647 datarust-analyzer cargo chardetng 0.1.17 ArabicFrenchCandidate#data.: data,
648 prevrust-analyzer cargo chardetng 0.1.17 ArabicFrenchCandidate#prev.: 0,
649 case_staterust-analyzer cargo chardetng 0.1.17 ArabicFrenchCandidate#case_state.: LatinCaseStaterust-analyzer cargo chardetng 0.1.17 LatinCaseState#::Spacerust-analyzer cargo chardetng 0.1.17 LatinCaseState#Space#,
650 prev_asciirust-analyzer cargo chardetng 0.1.17 ArabicFrenchCandidate#prev_ascii.: true,
651 current_word_lenrust-analyzer cargo chardetng 0.1.17 ArabicFrenchCandidate#current_word_len.: 0,
652 longest_wordrust-analyzer cargo chardetng 0.1.17 ArabicFrenchCandidate#longest_word.: 0,
653 }
654 }
655
656 fn feedrust-analyzer cargo chardetng 0.1.17 impl#[ArabicFrenchCandidate]feed().(&mut self, buffer: &[u8]) -> Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<i64> {
657 let mut score = 0i64;
658 for &b in buffer {
659 let class = self.datarust-analyzer cargo chardetng 0.1.17 ArabicFrenchCandidate#data..classifyrust-analyzer cargo chardetng 0.1.17 data/impl#[SingleByteData]classify().(b);
660 if class rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().255 {
661 return Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#;
662 }
663 let caseless_class = class rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`BitAnd<Self>`]bitand().&rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`BitAnd<Self>`]bitand(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`BitAnd<Self>`]bitand().0x7F;
664
665 let ascii = b rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]lt().<rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]lt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]lt().0x80;
666 let ascii_pair = self.prev_asciirust-analyzer cargo chardetng 0.1.17 ArabicFrenchCandidate#prev_ascii. && ascii;
667
668 if caseless_class rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]ne().!=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]ne(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]ne().LATIN_LETTERrust-analyzer cargo chardetng 0.1.17 LATIN_LETTER. {
669 // We compute case penalties for French only
670 self.case_staterust-analyzer cargo chardetng 0.1.17 ArabicFrenchCandidate#case_state. = LatinCaseStaterust-analyzer cargo chardetng 0.1.17 LatinCaseState#::Spacerust-analyzer cargo chardetng 0.1.17 LatinCaseState#Space#;
671 } else if (class rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`Shr<i32>`]shr().>>rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`Shr<i32>`]shr(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`Shr<i32>`]shr().7) rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().0 {
672 if self.case_staterust-analyzer cargo chardetng 0.1.17 ArabicFrenchCandidate#case_state. rust-analyzer cargo chardetng 0.1.17 impl#[LatinCaseState][`PartialEq<Self>`]eq().==rust-analyzer cargo chardetng 0.1.17 impl#[LatinCaseState][`PartialEq<Self>`]eq(). rust-analyzer cargo chardetng 0.1.17 impl#[LatinCaseState][`PartialEq<Self>`]eq().LatinCaseStaterust-analyzer cargo chardetng 0.1.17 LatinCaseState#::AllCapsrust-analyzer cargo chardetng 0.1.17 LatinCaseState#AllCaps# && !rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[bool][Not]not().ascii_pair {
673 score rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().IMPLAUSIBLE_LATIN_CASE_TRANSITION_PENALTYrust-analyzer cargo chardetng 0.1.17 IMPLAUSIBLE_LATIN_CASE_TRANSITION_PENALTY.;
674 }
675 self.case_staterust-analyzer cargo chardetng 0.1.17 ArabicFrenchCandidate#case_state. = LatinCaseStaterust-analyzer cargo chardetng 0.1.17 LatinCaseState#::Lowerrust-analyzer cargo chardetng 0.1.17 LatinCaseState#Lower#;
676 } else {
677 match self.case_staterust-analyzer cargo chardetng 0.1.17 ArabicFrenchCandidate#case_state. {
678 LatinCaseStaterust-analyzer cargo chardetng 0.1.17 LatinCaseState#::Spacerust-analyzer cargo chardetng 0.1.17 LatinCaseState#Space# => {
679 self.case_staterust-analyzer cargo chardetng 0.1.17 ArabicFrenchCandidate#case_state. = LatinCaseStaterust-analyzer cargo chardetng 0.1.17 LatinCaseState#::Upperrust-analyzer cargo chardetng 0.1.17 LatinCaseState#Upper#;
680 }
681 LatinCaseStaterust-analyzer cargo chardetng 0.1.17 LatinCaseState#::Upperrust-analyzer cargo chardetng 0.1.17 LatinCaseState#Upper# | LatinCaseStaterust-analyzer cargo chardetng 0.1.17 LatinCaseState#::AllCapsrust-analyzer cargo chardetng 0.1.17 LatinCaseState#AllCaps# => {
682 self.case_staterust-analyzer cargo chardetng 0.1.17 ArabicFrenchCandidate#case_state. = LatinCaseStaterust-analyzer cargo chardetng 0.1.17 LatinCaseState#::AllCapsrust-analyzer cargo chardetng 0.1.17 LatinCaseState#AllCaps#;
683 }
684 LatinCaseStaterust-analyzer cargo chardetng 0.1.17 LatinCaseState#::Lowerrust-analyzer cargo chardetng 0.1.17 LatinCaseState#Lower# => {
685 if !rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[bool][Not]not().ascii_pair {
686 score rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().IMPLAUSIBLE_LATIN_CASE_TRANSITION_PENALTYrust-analyzer cargo chardetng 0.1.17 IMPLAUSIBLE_LATIN_CASE_TRANSITION_PENALTY.;
687 }
688 self.case_staterust-analyzer cargo chardetng 0.1.17 ArabicFrenchCandidate#case_state. = LatinCaseStaterust-analyzer cargo chardetng 0.1.17 LatinCaseState#::Upperrust-analyzer cargo chardetng 0.1.17 LatinCaseState#Upper#;
689 }
690 }
691 }
692
693 // Count only Arabic word length and ignore French
694 let non_ascii_alphabetic = self.datarust-analyzer cargo chardetng 0.1.17 ArabicFrenchCandidate#data..is_non_latin_alphabeticrust-analyzer cargo chardetng 0.1.17 data/impl#[SingleByteData]is_non_latin_alphabetic().(caseless_class, true);
695 // XXX apply penalty if > 23
696 if non_ascii_alphabetic {
697 self.current_word_lenrust-analyzer cargo chardetng 0.1.17 ArabicFrenchCandidate#current_word_len. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u64][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u64][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u64][`AddAssign<Self>`]add_assign().1;
698 } else {
699 if self.current_word_lenrust-analyzer cargo chardetng 0.1.17 ArabicFrenchCandidate#current_word_len. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u64][`PartialOrd<Self>`]gt().>rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u64][`PartialOrd<Self>`]gt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u64][`PartialOrd<Self>`]gt().self.longest_wordrust-analyzer cargo chardetng 0.1.17 ArabicFrenchCandidate#longest_word. {
700 self.longest_wordrust-analyzer cargo chardetng 0.1.17 ArabicFrenchCandidate#longest_word. = self.current_word_lenrust-analyzer cargo chardetng 0.1.17 ArabicFrenchCandidate#current_word_len.;
701 }
702 self.current_word_lenrust-analyzer cargo chardetng 0.1.17 ArabicFrenchCandidate#current_word_len. = 0;
703 }
704
705 if !rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[bool][Not]not().ascii_pair {
706 score rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().self.datarust-analyzer cargo chardetng 0.1.17 ArabicFrenchCandidate#data..scorerust-analyzer cargo chardetng 0.1.17 data/impl#[SingleByteData]score().(caseless_class, self.prevrust-analyzer cargo chardetng 0.1.17 ArabicFrenchCandidate#prev., true);
707
708 if self.prevrust-analyzer cargo chardetng 0.1.17 ArabicFrenchCandidate#prev. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().LATIN_LETTERrust-analyzer cargo chardetng 0.1.17 LATIN_LETTER. && non_ascii_alphabetic {
709 score rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().LATIN_ADJACENCY_PENALTYrust-analyzer cargo chardetng 0.1.17 LATIN_ADJACENCY_PENALTY.;
710 } else if caseless_class rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().LATIN_LETTERrust-analyzer cargo chardetng 0.1.17 LATIN_LETTER.
711 && self.datarust-analyzer cargo chardetng 0.1.17 ArabicFrenchCandidate#data..is_non_latin_alphabeticrust-analyzer cargo chardetng 0.1.17 data/impl#[SingleByteData]is_non_latin_alphabetic().(self.prevrust-analyzer cargo chardetng 0.1.17 ArabicFrenchCandidate#prev., true)
712 {
713 score rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().LATIN_ADJACENCY_PENALTYrust-analyzer cargo chardetng 0.1.17 LATIN_ADJACENCY_PENALTY.;
714 }
715 }
716
717 self.prev_asciirust-analyzer cargo chardetng 0.1.17 ArabicFrenchCandidate#prev_ascii. = ascii;
718 self.prevrust-analyzer cargo chardetng 0.1.17 ArabicFrenchCandidate#prev. = caseless_class;
719 }
720 Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(score)
721 }
722 }
723
724 struct CaselessCandidaterust-analyzer cargo chardetng 0.1.17 CaselessCandidate# {
725 datarust-analyzer cargo chardetng 0.1.17 CaselessCandidate#data.: &'static SingleByteDatarust-analyzer cargo chardetng 0.1.17 data/SingleByteData#,
726 prevrust-analyzer cargo chardetng 0.1.17 CaselessCandidate#prev.: u8,
727 prev_asciirust-analyzer cargo chardetng 0.1.17 CaselessCandidate#prev_ascii.: bool,
728 current_word_lenrust-analyzer cargo chardetng 0.1.17 CaselessCandidate#current_word_len.: u64,
729 longest_wordrust-analyzer cargo chardetng 0.1.17 CaselessCandidate#longest_word.: u64,
730 }
731
732 impl CaselessCandidaterust-analyzer cargo chardetng 0.1.17 CaselessCandidate# {
733 fn newrust-analyzer cargo chardetng 0.1.17 impl#[CaselessCandidate]new().(data: &'static SingleByteDatarust-analyzer cargo chardetng 0.1.17 data/SingleByteData#) -> Selfrust-analyzer cargo chardetng 0.1.17 impl#[CaselessCandidate] {
734 CaselessCandidaterust-analyzer cargo chardetng 0.1.17 CaselessCandidate# {
735 datarust-analyzer cargo chardetng 0.1.17 CaselessCandidate#data.: data,
736 prevrust-analyzer cargo chardetng 0.1.17 CaselessCandidate#prev.: 0,
737 prev_asciirust-analyzer cargo chardetng 0.1.17 CaselessCandidate#prev_ascii.: true,
738 current_word_lenrust-analyzer cargo chardetng 0.1.17 CaselessCandidate#current_word_len.: 0,
739 longest_wordrust-analyzer cargo chardetng 0.1.17 CaselessCandidate#longest_word.: 0,
740 }
741 }
742
743 fn feedrust-analyzer cargo chardetng 0.1.17 impl#[CaselessCandidate]feed().(&mut self, buffer: &[u8]) -> Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<i64> {
744 let mut score = 0i64;
745 for &b in buffer {
746 let class = self.datarust-analyzer cargo chardetng 0.1.17 CaselessCandidate#data..classifyrust-analyzer cargo chardetng 0.1.17 data/impl#[SingleByteData]classify().(b);
747 if class rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().255 {
748 return Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#;
749 }
750 let caseless_class = class rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`BitAnd<Self>`]bitand().&rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`BitAnd<Self>`]bitand(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`BitAnd<Self>`]bitand().0x7F;
751
752 let ascii = b rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]lt().<rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]lt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]lt().0x80;
753 let ascii_pair = self.prev_asciirust-analyzer cargo chardetng 0.1.17 CaselessCandidate#prev_ascii. && ascii;
754
755 let non_ascii_alphabetic = self.datarust-analyzer cargo chardetng 0.1.17 CaselessCandidate#data..is_non_latin_alphabeticrust-analyzer cargo chardetng 0.1.17 data/impl#[SingleByteData]is_non_latin_alphabetic().(caseless_class, false);
756 // Apply penalty if > 23 and not Thai
757 if non_ascii_alphabetic {
758 self.current_word_lenrust-analyzer cargo chardetng 0.1.17 CaselessCandidate#current_word_len. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u64][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u64][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u64][`AddAssign<Self>`]add_assign().1;
759 } else {
760 if self.current_word_lenrust-analyzer cargo chardetng 0.1.17 CaselessCandidate#current_word_len. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u64][`PartialOrd<Self>`]gt().>rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u64][`PartialOrd<Self>`]gt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u64][`PartialOrd<Self>`]gt().self.longest_wordrust-analyzer cargo chardetng 0.1.17 CaselessCandidate#longest_word. {
761 self.longest_wordrust-analyzer cargo chardetng 0.1.17 CaselessCandidate#longest_word. = self.current_word_lenrust-analyzer cargo chardetng 0.1.17 CaselessCandidate#current_word_len.;
762 }
763 self.current_word_lenrust-analyzer cargo chardetng 0.1.17 CaselessCandidate#current_word_len. = 0;
764 }
765
766 if !rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[bool][Not]not().ascii_pair {
767 score rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().self.datarust-analyzer cargo chardetng 0.1.17 CaselessCandidate#data..scorerust-analyzer cargo chardetng 0.1.17 data/impl#[SingleByteData]score().(caseless_class, self.prevrust-analyzer cargo chardetng 0.1.17 CaselessCandidate#prev., false);
768
769 if self.prevrust-analyzer cargo chardetng 0.1.17 CaselessCandidate#prev. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().LATIN_LETTERrust-analyzer cargo chardetng 0.1.17 LATIN_LETTER. && non_ascii_alphabetic {
770 score rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().LATIN_ADJACENCY_PENALTYrust-analyzer cargo chardetng 0.1.17 LATIN_ADJACENCY_PENALTY.;
771 } else if caseless_class rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().LATIN_LETTERrust-analyzer cargo chardetng 0.1.17 LATIN_LETTER.
772 && self.datarust-analyzer cargo chardetng 0.1.17 CaselessCandidate#data..is_non_latin_alphabeticrust-analyzer cargo chardetng 0.1.17 data/impl#[SingleByteData]is_non_latin_alphabetic().(self.prevrust-analyzer cargo chardetng 0.1.17 CaselessCandidate#prev., false)
773 {
774 score rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().LATIN_ADJACENCY_PENALTYrust-analyzer cargo chardetng 0.1.17 LATIN_ADJACENCY_PENALTY.;
775 }
776 }
777
778 self.prev_asciirust-analyzer cargo chardetng 0.1.17 CaselessCandidate#prev_ascii. = ascii;
779 self.prevrust-analyzer cargo chardetng 0.1.17 CaselessCandidate#prev. = caseless_class;
780 }
781 Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(score)
782 }
783 }
784
785 fn is_ascii_punctuationrust-analyzer cargo chardetng 0.1.17 is_ascii_punctuation().(byte: u8) -> bool {
786 match byte {
787 b'.' | b',' | b':' | b';' | b'?' | b'!' => true,
788 _ => false,
789 }
790 }
791
792 struct LogicalCandidaterust-analyzer cargo chardetng 0.1.17 LogicalCandidate# {
793 datarust-analyzer cargo chardetng 0.1.17 LogicalCandidate#data.: &'static SingleByteDatarust-analyzer cargo chardetng 0.1.17 data/SingleByteData#,
794 prevrust-analyzer cargo chardetng 0.1.17 LogicalCandidate#prev.: u8,
795 prev_asciirust-analyzer cargo chardetng 0.1.17 LogicalCandidate#prev_ascii.: bool,
796 plausible_punctuationrust-analyzer cargo chardetng 0.1.17 LogicalCandidate#plausible_punctuation.: u64,
797 current_word_lenrust-analyzer cargo chardetng 0.1.17 LogicalCandidate#current_word_len.: u64,
798 longest_wordrust-analyzer cargo chardetng 0.1.17 LogicalCandidate#longest_word.: u64,
799 }
800
801 impl LogicalCandidaterust-analyzer cargo chardetng 0.1.17 LogicalCandidate# {
802 fn newrust-analyzer cargo chardetng 0.1.17 impl#[LogicalCandidate]new().(data: &'static SingleByteDatarust-analyzer cargo chardetng 0.1.17 data/SingleByteData#) -> Selfrust-analyzer cargo chardetng 0.1.17 impl#[LogicalCandidate] {
803 LogicalCandidaterust-analyzer cargo chardetng 0.1.17 LogicalCandidate# {
804 datarust-analyzer cargo chardetng 0.1.17 LogicalCandidate#data.: data,
805 prevrust-analyzer cargo chardetng 0.1.17 LogicalCandidate#prev.: 0,
806 prev_asciirust-analyzer cargo chardetng 0.1.17 LogicalCandidate#prev_ascii.: true,
807 plausible_punctuationrust-analyzer cargo chardetng 0.1.17 LogicalCandidate#plausible_punctuation.: 0,
808 current_word_lenrust-analyzer cargo chardetng 0.1.17 LogicalCandidate#current_word_len.: 0,
809 longest_wordrust-analyzer cargo chardetng 0.1.17 LogicalCandidate#longest_word.: 0,
810 }
811 }
812
813 fn feedrust-analyzer cargo chardetng 0.1.17 impl#[LogicalCandidate]feed().(&mut self, buffer: &[u8]) -> Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<i64> {
814 let mut score = 0i64;
815 for &b in buffer {
816 let class = self.datarust-analyzer cargo chardetng 0.1.17 LogicalCandidate#data..classifyrust-analyzer cargo chardetng 0.1.17 data/impl#[SingleByteData]classify().(b);
817 if class rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().255 {
818 return Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#;
819 }
820 let caseless_class = class rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`BitAnd<Self>`]bitand().&rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`BitAnd<Self>`]bitand(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`BitAnd<Self>`]bitand().0x7F;
821
822 let ascii = b rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]lt().<rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]lt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]lt().0x80;
823 let ascii_pair = self.prev_asciirust-analyzer cargo chardetng 0.1.17 LogicalCandidate#prev_ascii. && ascii;
824
825 let non_ascii_alphabetic = self.datarust-analyzer cargo chardetng 0.1.17 LogicalCandidate#data..is_non_latin_alphabeticrust-analyzer cargo chardetng 0.1.17 data/impl#[SingleByteData]is_non_latin_alphabetic().(caseless_class, false);
826 // XXX apply penalty if > 22
827 if non_ascii_alphabetic {
828 self.current_word_lenrust-analyzer cargo chardetng 0.1.17 LogicalCandidate#current_word_len. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u64][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u64][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u64][`AddAssign<Self>`]add_assign().1;
829 } else {
830 if self.current_word_lenrust-analyzer cargo chardetng 0.1.17 LogicalCandidate#current_word_len. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u64][`PartialOrd<Self>`]gt().>rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u64][`PartialOrd<Self>`]gt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u64][`PartialOrd<Self>`]gt().self.longest_wordrust-analyzer cargo chardetng 0.1.17 LogicalCandidate#longest_word. {
831 self.longest_wordrust-analyzer cargo chardetng 0.1.17 LogicalCandidate#longest_word. = self.current_word_lenrust-analyzer cargo chardetng 0.1.17 LogicalCandidate#current_word_len.;
832 }
833 self.current_word_lenrust-analyzer cargo chardetng 0.1.17 LogicalCandidate#current_word_len. = 0;
834 }
835
836 if !rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[bool][Not]not().ascii_pair {
837 score rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().self.datarust-analyzer cargo chardetng 0.1.17 LogicalCandidate#data..scorerust-analyzer cargo chardetng 0.1.17 data/impl#[SingleByteData]score().(caseless_class, self.prevrust-analyzer cargo chardetng 0.1.17 LogicalCandidate#prev., false);
838
839 let prev_non_ascii_alphabetic = self.datarust-analyzer cargo chardetng 0.1.17 LogicalCandidate#data..is_non_latin_alphabeticrust-analyzer cargo chardetng 0.1.17 data/impl#[SingleByteData]is_non_latin_alphabetic().(self.prevrust-analyzer cargo chardetng 0.1.17 LogicalCandidate#prev., false);
840 if caseless_class rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().0 && prev_non_ascii_alphabetic && is_ascii_punctuationrust-analyzer cargo chardetng 0.1.17 is_ascii_punctuation().(b) {
841 self.plausible_punctuationrust-analyzer cargo chardetng 0.1.17 LogicalCandidate#plausible_punctuation. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u64][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u64][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u64][`AddAssign<Self>`]add_assign().1;
842 }
843
844 if self.prevrust-analyzer cargo chardetng 0.1.17 LogicalCandidate#prev. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().LATIN_LETTERrust-analyzer cargo chardetng 0.1.17 LATIN_LETTER. && non_ascii_alphabetic {
845 score rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().LATIN_ADJACENCY_PENALTYrust-analyzer cargo chardetng 0.1.17 LATIN_ADJACENCY_PENALTY.;
846 } else if caseless_class rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().LATIN_LETTERrust-analyzer cargo chardetng 0.1.17 LATIN_LETTER. && prev_non_ascii_alphabetic {
847 score rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().LATIN_ADJACENCY_PENALTYrust-analyzer cargo chardetng 0.1.17 LATIN_ADJACENCY_PENALTY.;
848 }
849 }
850
851 self.prev_asciirust-analyzer cargo chardetng 0.1.17 LogicalCandidate#prev_ascii. = ascii;
852 self.prevrust-analyzer cargo chardetng 0.1.17 LogicalCandidate#prev. = caseless_class;
853 }
854 Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(score)
855 }
856 }
857
858 struct VisualCandidaterust-analyzer cargo chardetng 0.1.17 VisualCandidate# {
859 datarust-analyzer cargo chardetng 0.1.17 VisualCandidate#data.: &'static SingleByteDatarust-analyzer cargo chardetng 0.1.17 data/SingleByteData#,
860 prevrust-analyzer cargo chardetng 0.1.17 VisualCandidate#prev.: u8,
861 prev_asciirust-analyzer cargo chardetng 0.1.17 VisualCandidate#prev_ascii.: bool,
862 prev_punctuationrust-analyzer cargo chardetng 0.1.17 VisualCandidate#prev_punctuation.: bool,
863 plausible_punctuationrust-analyzer cargo chardetng 0.1.17 VisualCandidate#plausible_punctuation.: u64,
864 current_word_lenrust-analyzer cargo chardetng 0.1.17 VisualCandidate#current_word_len.: u64,
865 longest_wordrust-analyzer cargo chardetng 0.1.17 VisualCandidate#longest_word.: u64,
866 }
867
868 impl VisualCandidaterust-analyzer cargo chardetng 0.1.17 VisualCandidate# {
869 fn newrust-analyzer cargo chardetng 0.1.17 impl#[VisualCandidate]new().(data: &'static SingleByteDatarust-analyzer cargo chardetng 0.1.17 data/SingleByteData#) -> Selfrust-analyzer cargo chardetng 0.1.17 impl#[VisualCandidate] {
870 VisualCandidaterust-analyzer cargo chardetng 0.1.17 VisualCandidate# {
871 datarust-analyzer cargo chardetng 0.1.17 VisualCandidate#data.: data,
872 prevrust-analyzer cargo chardetng 0.1.17 VisualCandidate#prev.: 0,
873 prev_asciirust-analyzer cargo chardetng 0.1.17 VisualCandidate#prev_ascii.: true,
874 prev_punctuationrust-analyzer cargo chardetng 0.1.17 VisualCandidate#prev_punctuation.: false,
875 plausible_punctuationrust-analyzer cargo chardetng 0.1.17 VisualCandidate#plausible_punctuation.: 0,
876 current_word_lenrust-analyzer cargo chardetng 0.1.17 VisualCandidate#current_word_len.: 0,
877 longest_wordrust-analyzer cargo chardetng 0.1.17 VisualCandidate#longest_word.: 0,
878 }
879 }
880
881 fn feedrust-analyzer cargo chardetng 0.1.17 impl#[VisualCandidate]feed().(&mut self, buffer: &[u8]) -> Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<i64> {
882 let mut score = 0i64;
883 for &b in buffer {
884 let class = self.datarust-analyzer cargo chardetng 0.1.17 VisualCandidate#data..classifyrust-analyzer cargo chardetng 0.1.17 data/impl#[SingleByteData]classify().(b);
885 if class rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().255 {
886 return Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#;
887 }
888 let caseless_class = class rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`BitAnd<Self>`]bitand().&rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`BitAnd<Self>`]bitand(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`BitAnd<Self>`]bitand().0x7F;
889
890 let ascii = b rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]lt().<rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]lt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]lt().0x80;
891 let ascii_pair = self.prev_asciirust-analyzer cargo chardetng 0.1.17 VisualCandidate#prev_ascii. && ascii;
892
893 let non_ascii_alphabetic = self.datarust-analyzer cargo chardetng 0.1.17 VisualCandidate#data..is_non_latin_alphabeticrust-analyzer cargo chardetng 0.1.17 data/impl#[SingleByteData]is_non_latin_alphabetic().(caseless_class, false);
894 // XXX apply penalty if > 22
895 if non_ascii_alphabetic {
896 self.current_word_lenrust-analyzer cargo chardetng 0.1.17 VisualCandidate#current_word_len. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u64][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u64][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u64][`AddAssign<Self>`]add_assign().1;
897 } else {
898 if self.current_word_lenrust-analyzer cargo chardetng 0.1.17 VisualCandidate#current_word_len. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u64][`PartialOrd<Self>`]gt().>rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u64][`PartialOrd<Self>`]gt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u64][`PartialOrd<Self>`]gt().self.longest_wordrust-analyzer cargo chardetng 0.1.17 VisualCandidate#longest_word. {
899 self.longest_wordrust-analyzer cargo chardetng 0.1.17 VisualCandidate#longest_word. = self.current_word_lenrust-analyzer cargo chardetng 0.1.17 VisualCandidate#current_word_len.;
900 }
901 self.current_word_lenrust-analyzer cargo chardetng 0.1.17 VisualCandidate#current_word_len. = 0;
902 }
903
904 if !rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[bool][Not]not().ascii_pair {
905 score rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().self.datarust-analyzer cargo chardetng 0.1.17 VisualCandidate#data..scorerust-analyzer cargo chardetng 0.1.17 data/impl#[SingleByteData]score().(caseless_class, self.prevrust-analyzer cargo chardetng 0.1.17 VisualCandidate#prev., false);
906
907 if non_ascii_alphabetic && self.prev_punctuationrust-analyzer cargo chardetng 0.1.17 VisualCandidate#prev_punctuation. {
908 self.plausible_punctuationrust-analyzer cargo chardetng 0.1.17 VisualCandidate#plausible_punctuation. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u64][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u64][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u64][`AddAssign<Self>`]add_assign().1;
909 }
910
911 if self.prevrust-analyzer cargo chardetng 0.1.17 VisualCandidate#prev. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().LATIN_LETTERrust-analyzer cargo chardetng 0.1.17 LATIN_LETTER. && non_ascii_alphabetic {
912 score rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().LATIN_ADJACENCY_PENALTYrust-analyzer cargo chardetng 0.1.17 LATIN_ADJACENCY_PENALTY.;
913 } else if caseless_class rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().LATIN_LETTERrust-analyzer cargo chardetng 0.1.17 LATIN_LETTER.
914 && self.datarust-analyzer cargo chardetng 0.1.17 VisualCandidate#data..is_non_latin_alphabeticrust-analyzer cargo chardetng 0.1.17 data/impl#[SingleByteData]is_non_latin_alphabetic().(self.prevrust-analyzer cargo chardetng 0.1.17 VisualCandidate#prev., false)
915 {
916 score rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().LATIN_ADJACENCY_PENALTYrust-analyzer cargo chardetng 0.1.17 LATIN_ADJACENCY_PENALTY.;
917 }
918 }
919
920 self.prev_asciirust-analyzer cargo chardetng 0.1.17 VisualCandidate#prev_ascii. = ascii;
921 self.prevrust-analyzer cargo chardetng 0.1.17 VisualCandidate#prev. = caseless_class;
922 self.prev_punctuationrust-analyzer cargo chardetng 0.1.17 VisualCandidate#prev_punctuation. = caseless_class rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().0 && is_ascii_punctuationrust-analyzer cargo chardetng 0.1.17 is_ascii_punctuation().(b);
923 }
924 Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(score)
925 }
926 }
927
928 struct Utf8Candidaterust-analyzer cargo chardetng 0.1.17 Utf8Candidate# {
929 decoderrust-analyzer cargo chardetng 0.1.17 Utf8Candidate#decoder.: Decoderrust-analyzer cargo encoding_rs 0.8.35 Decoder#,
930 }
931
932 impl Utf8Candidaterust-analyzer cargo chardetng 0.1.17 Utf8Candidate# {
933 fn feedrust-analyzer cargo chardetng 0.1.17 impl#[Utf8Candidate]feed().(&mut self, buffer: &[u8], last: bool) -> Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<i64> {
934 let mut dst = [0u8; 1024];
935 let mut total_read = 0;
936 loop {
937 let (result, read, _) = self.decoderrust-analyzer cargo chardetng 0.1.17 Utf8Candidate#decoder..decode_to_utf8_without_replacementrust-analyzer cargo encoding_rs 0.8.35 impl#[Decoder]decode_to_utf8_without_replacement().(
938 &buffer[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().total_read..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/RangeFrom#]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().,
939 &mut dst,
940 last,
941 );
942 total_read rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`AddAssign<Self>`]add_assign().read;
943 match result {
944 DecoderResultrust-analyzer cargo encoding_rs 0.8.35 DecoderResult#::InputEmptyrust-analyzer cargo encoding_rs 0.8.35 DecoderResult#InputEmpty# => {
945 return Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(0);
946 }
947 DecoderResultrust-analyzer cargo encoding_rs 0.8.35 DecoderResult#::Malformedrust-analyzer cargo encoding_rs 0.8.35 DecoderResult#Malformed#(_, _) => {
948 return Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#;
949 }
950 DecoderResultrust-analyzer cargo encoding_rs 0.8.35 DecoderResult#::OutputFullrust-analyzer cargo encoding_rs 0.8.35 DecoderResult#OutputFull# => {
951 continue;
952 }
953 }
954 }
955 }
956 }
957
958 struct Iso2022Candidaterust-analyzer cargo chardetng 0.1.17 Iso2022Candidate# {
959 decoderrust-analyzer cargo chardetng 0.1.17 Iso2022Candidate#decoder.: Decoderrust-analyzer cargo encoding_rs 0.8.35 Decoder#,
960 }
961
962 impl Iso2022Candidaterust-analyzer cargo chardetng 0.1.17 Iso2022Candidate# {
963 fn feedrust-analyzer cargo chardetng 0.1.17 impl#[Iso2022Candidate]feed().(&mut self, buffer: &[u8], last: bool) -> Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<i64> {
964 let mut dst = [0u16; 1024];
965 let mut total_read = 0;
966 loop {
967 let (result, read, _) = self.decoderrust-analyzer cargo chardetng 0.1.17 Iso2022Candidate#decoder..decode_to_utf16_without_replacementrust-analyzer cargo encoding_rs 0.8.35 impl#[Decoder]decode_to_utf16_without_replacement().(
968 &buffer[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().total_read..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/RangeFrom#]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().,
969 &mut dst,
970 last,
971 );
972 total_read rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`AddAssign<Self>`]add_assign().read;
973 match result {
974 DecoderResultrust-analyzer cargo encoding_rs 0.8.35 DecoderResult#::InputEmptyrust-analyzer cargo encoding_rs 0.8.35 DecoderResult#InputEmpty# => {
975 return Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(0);
976 }
977 DecoderResultrust-analyzer cargo encoding_rs 0.8.35 DecoderResult#::Malformedrust-analyzer cargo encoding_rs 0.8.35 DecoderResult#Malformed#(_, _) => {
978 return Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#;
979 }
980 DecoderResultrust-analyzer cargo encoding_rs 0.8.35 DecoderResult#::OutputFullrust-analyzer cargo encoding_rs 0.8.35 DecoderResult#OutputFull# => {
981 continue;
982 }
983 }
984 }
985 }
986 }
987
988 #[deriverust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/derive:(PartialEqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialEq:)]
989 enum LatinCjrust-analyzer cargo chardetng 0.1.17 LatinCj# {
990 AsciiLetterrust-analyzer cargo chardetng 0.1.17 LatinCj#AsciiLetter#,
991 Cjrust-analyzer cargo chardetng 0.1.17 LatinCj#Cj#,
992 Otherrust-analyzer cargo chardetng 0.1.17 LatinCj#Other#,
993 }
994
995 #[deriverust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/derive:(PartialEqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialEq:, Copyrust-analyzer cargo core https://github.com/rust-lang/rust/library/core marker/Copy:, Clonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core clone/Clone:)]
996 enum HalfWidthKatakanarust-analyzer cargo chardetng 0.1.17 HalfWidthKatakana# {
997 DakutenForbiddenrust-analyzer cargo chardetng 0.1.17 HalfWidthKatakana#DakutenForbidden#,
998 DakutenAllowedrust-analyzer cargo chardetng 0.1.17 HalfWidthKatakana#DakutenAllowed#,
999 DakutenOrHandakutenAllowedrust-analyzer cargo chardetng 0.1.17 HalfWidthKatakana#DakutenOrHandakutenAllowed#,
1000 }
1001
1002 #[deriverust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/derive:(PartialEqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialEq:)]
1003 enum LatinKoreanrust-analyzer cargo chardetng 0.1.17 LatinKorean# {
1004 AsciiLetterrust-analyzer cargo chardetng 0.1.17 LatinKorean#AsciiLetter#,
1005 Hangulrust-analyzer cargo chardetng 0.1.17 LatinKorean#Hangul#,
1006 Hanjarust-analyzer cargo chardetng 0.1.17 LatinKorean#Hanja#,
1007 Otherrust-analyzer cargo chardetng 0.1.17 LatinKorean#Other#,
1008 }
1009
1010 fn cjk_extra_scorerust-analyzer cargo chardetng 0.1.17 cjk_extra_score().(u: u16, table: &'static [u16; 128]) -> i64 {
1011 if let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(pos) = table.iterrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]iter().().positionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/iter/impl#[`Iter<'a, T>`][Iterator]position().(|&x| x rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialEq<Self>`]eq().u) {
1012 ((128 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Sub<Self>`]sub().pos) rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Div<Self>`]div()./rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Div<Self>`]div(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Div<Self>`]div().16) as i64
1013 } else {
1014 0
1015 }
1016 }
1017
1018 struct GbkCandidaterust-analyzer cargo chardetng 0.1.17 GbkCandidate# {
1019 decoderrust-analyzer cargo chardetng 0.1.17 GbkCandidate#decoder.: Decoderrust-analyzer cargo encoding_rs 0.8.35 Decoder#,
1020 prev_byterust-analyzer cargo chardetng 0.1.17 GbkCandidate#prev_byte.: u8,
1021 prevrust-analyzer cargo chardetng 0.1.17 GbkCandidate#prev.: LatinCjrust-analyzer cargo chardetng 0.1.17 LatinCj#,
1022 pending_scorerust-analyzer cargo chardetng 0.1.17 GbkCandidate#pending_score.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<i64>,
1023 }
1024
1025 impl GbkCandidaterust-analyzer cargo chardetng 0.1.17 GbkCandidate# {
1026 fn maybe_set_as_pendingrust-analyzer cargo chardetng 0.1.17 impl#[GbkCandidate]maybe_set_as_pending().(&mut self, s: i64) -> i64 {
1027 assertrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/assert!!(self.pending_scorerust-analyzer cargo chardetng 0.1.17 GbkCandidate#pending_score..is_nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]is_none().());
1028 if self.prevrust-analyzer cargo chardetng 0.1.17 GbkCandidate#prev. rust-analyzer cargo chardetng 0.1.17 impl#[LatinCj][`PartialEq<Self>`]eq().==rust-analyzer cargo chardetng 0.1.17 impl#[LatinCj][`PartialEq<Self>`]eq(). rust-analyzer cargo chardetng 0.1.17 impl#[LatinCj][`PartialEq<Self>`]eq().LatinCjrust-analyzer cargo chardetng 0.1.17 LatinCj#::Cjrust-analyzer cargo chardetng 0.1.17 LatinCj#Cj# || !rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[bool][Not]not().more_problematic_leadrust-analyzer cargo chardetng 0.1.17 more_problematic_lead().(self.prev_byterust-analyzer cargo chardetng 0.1.17 GbkCandidate#prev_byte.) {
1029 s
1030 } else {
1031 self.pending_scorerust-analyzer cargo chardetng 0.1.17 GbkCandidate#pending_score. = Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(s);
1032 0
1033 }
1034 }
1035
1036 fn feedrust-analyzer cargo chardetng 0.1.17 impl#[GbkCandidate]feed().(&mut self, buffer: &[u8], last: bool) -> Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<i64> {
1037 let mut score = 0i64;
1038 let mut src = [0u8];
1039 let mut dst = [0u16; 2];
1040 for &b in buffer {
1041 src[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`IndexMut<I>`]index_mut().0]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`IndexMut<I>`]index_mut(). = b;
1042 let (result, read, written) = self
1043 .decoderrust-analyzer cargo chardetng 0.1.17 GbkCandidate#decoder.
1044 .decode_to_utf16_without_replacementrust-analyzer cargo encoding_rs 0.8.35 impl#[Decoder]decode_to_utf16_without_replacement().(&src, &mut dst, false);
1045 if written rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq().1 {
1046 let u = dst[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().0]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().;
1047 if (u rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]ge().>=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]ge(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]ge().u16::fromrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/num/impl#[u16][`From<u8>`]from().(b'a') && u rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]le().<=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]le(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]le().u16::fromrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/num/impl#[u16][`From<u8>`]from().(b'z'))
1048 || (u rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]ge().>=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]ge(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]ge().u16::fromrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/num/impl#[u16][`From<u8>`]from().(b'A') && u rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]le().<=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]le(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]le().u16::fromrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/num/impl#[u16][`From<u8>`]from().(b'Z'))
1049 {
1050 self.pending_scorerust-analyzer cargo chardetng 0.1.17 GbkCandidate#pending_score. = Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#; // Discard pending score
1051 if self.prevrust-analyzer cargo chardetng 0.1.17 GbkCandidate#prev. rust-analyzer cargo chardetng 0.1.17 impl#[LatinCj][`PartialEq<Self>`]eq().==rust-analyzer cargo chardetng 0.1.17 impl#[LatinCj][`PartialEq<Self>`]eq(). rust-analyzer cargo chardetng 0.1.17 impl#[LatinCj][`PartialEq<Self>`]eq().LatinCjrust-analyzer cargo chardetng 0.1.17 LatinCj#::Cjrust-analyzer cargo chardetng 0.1.17 LatinCj#Cj# {
1052 score rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().CJK_LATIN_ADJACENCY_PENALTYrust-analyzer cargo chardetng 0.1.17 CJK_LATIN_ADJACENCY_PENALTY.;
1053 }
1054 self.prevrust-analyzer cargo chardetng 0.1.17 GbkCandidate#prev. = LatinCjrust-analyzer cargo chardetng 0.1.17 LatinCj#::AsciiLetterrust-analyzer cargo chardetng 0.1.17 LatinCj#AsciiLetter#;
1055 } else if u rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialEq<Self>`]eq().0x20AC {
1056 // euro sign
1057 self.pending_scorerust-analyzer cargo chardetng 0.1.17 GbkCandidate#pending_score. = Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#; // Discard pending score
1058 // Should there even be a penalty?
1059 self.prevrust-analyzer cargo chardetng 0.1.17 GbkCandidate#prev. = LatinCjrust-analyzer cargo chardetng 0.1.17 LatinCj#::Otherrust-analyzer cargo chardetng 0.1.17 LatinCj#Other#;
1060 } else if u rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]ge().>=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]ge(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]ge().0x4E00 && u rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]le().<=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]le(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]le().0x9FA5 {
1061 if let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(pending) = self.pending_scorerust-analyzer cargo chardetng 0.1.17 GbkCandidate#pending_score. {
1062 score rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().pending;
1063 self.pending_scorerust-analyzer cargo chardetng 0.1.17 GbkCandidate#pending_score. = Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#;
1064 }
1065 if b rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]ge().>=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]ge(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]ge().0xA1 && b rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]le().<=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]le(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]le().0xFE {
1066 match self.prev_byterust-analyzer cargo chardetng 0.1.17 GbkCandidate#prev_byte. {
1067 0xA1..=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/RangeInclusive#0xD7 => {
1068 score rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().GBK_SCORE_PER_LEVEL_1rust-analyzer cargo chardetng 0.1.17 GBK_SCORE_PER_LEVEL_1.;
1069 score rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().
1070 cjk_extra_scorerust-analyzer cargo chardetng 0.1.17 cjk_extra_score().(u, &datarust-analyzer cargo chardetng 0.1.17 data/::DETECTOR_DATArust-analyzer cargo chardetng 0.1.17 data/DETECTOR_DATA..frequent_simplifiedrust-analyzer cargo chardetng 0.1.17 data/DetectorData#frequent_simplified.);
1071 }
1072 0xD8..=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/RangeInclusive#0xFE => score rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().GBK_SCORE_PER_LEVEL_2rust-analyzer cargo chardetng 0.1.17 GBK_SCORE_PER_LEVEL_2.,
1073 _ => {
1074 score rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().GBK_SCORE_PER_NON_EUCrust-analyzer cargo chardetng 0.1.17 GBK_SCORE_PER_NON_EUC.;
1075 }
1076 }
1077 } else {
1078 score rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().self.maybe_set_as_pendingrust-analyzer cargo chardetng 0.1.17 impl#[GbkCandidate]maybe_set_as_pending().(GBK_SCORE_PER_NON_EUCrust-analyzer cargo chardetng 0.1.17 GBK_SCORE_PER_NON_EUC.);
1079 }
1080 if self.prevrust-analyzer cargo chardetng 0.1.17 GbkCandidate#prev. rust-analyzer cargo chardetng 0.1.17 impl#[LatinCj][`PartialEq<Self>`]eq().==rust-analyzer cargo chardetng 0.1.17 impl#[LatinCj][`PartialEq<Self>`]eq(). rust-analyzer cargo chardetng 0.1.17 impl#[LatinCj][`PartialEq<Self>`]eq().LatinCjrust-analyzer cargo chardetng 0.1.17 LatinCj#::AsciiLetterrust-analyzer cargo chardetng 0.1.17 LatinCj#AsciiLetter# {
1081 score rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().CJK_LATIN_ADJACENCY_PENALTYrust-analyzer cargo chardetng 0.1.17 CJK_LATIN_ADJACENCY_PENALTY.;
1082 }
1083 self.prevrust-analyzer cargo chardetng 0.1.17 GbkCandidate#prev. = LatinCjrust-analyzer cargo chardetng 0.1.17 LatinCj#::Cjrust-analyzer cargo chardetng 0.1.17 LatinCj#Cj#;
1084 } else if (u rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]ge().>=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]ge(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]ge().0x3400 && u rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]lt().<rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]lt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]lt().0xA000) || (u rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]ge().>=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]ge(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]ge().0xF900 && u rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]lt().<rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]lt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]lt().0xFB00) {
1085 if let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(pending) = self.pending_scorerust-analyzer cargo chardetng 0.1.17 GbkCandidate#pending_score. {
1086 score rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().pending;
1087 self.pending_scorerust-analyzer cargo chardetng 0.1.17 GbkCandidate#pending_score. = Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#;
1088 }
1089 // XXX score?
1090 if self.prevrust-analyzer cargo chardetng 0.1.17 GbkCandidate#prev. rust-analyzer cargo chardetng 0.1.17 impl#[LatinCj][`PartialEq<Self>`]eq().==rust-analyzer cargo chardetng 0.1.17 impl#[LatinCj][`PartialEq<Self>`]eq(). rust-analyzer cargo chardetng 0.1.17 impl#[LatinCj][`PartialEq<Self>`]eq().LatinCjrust-analyzer cargo chardetng 0.1.17 LatinCj#::AsciiLetterrust-analyzer cargo chardetng 0.1.17 LatinCj#AsciiLetter# {
1091 score rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().CJK_LATIN_ADJACENCY_PENALTYrust-analyzer cargo chardetng 0.1.17 CJK_LATIN_ADJACENCY_PENALTY.;
1092 }
1093 self.prevrust-analyzer cargo chardetng 0.1.17 GbkCandidate#prev. = LatinCjrust-analyzer cargo chardetng 0.1.17 LatinCj#::Cjrust-analyzer cargo chardetng 0.1.17 LatinCj#Cj#;
1094 } else if u rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]ge().>=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]ge(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]ge().0xE000 && u rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]lt().<rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]lt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]lt().0xF900 {
1095 if let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(pending) = self.pending_scorerust-analyzer cargo chardetng 0.1.17 GbkCandidate#pending_score. {
1096 score rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().pending;
1097 self.pending_scorerust-analyzer cargo chardetng 0.1.17 GbkCandidate#pending_score. = Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#;
1098 }
1099 // Treat the GB18030-required PUA mappings as non-EUC ideographs.
1100 match u {
1101 0xE78D..=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/RangeInclusive#0xE796
1102 | 0xE816..=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/RangeInclusive#0xE818
1103 | 0xE81E
1104 | 0xE826
1105 | 0xE82B
1106 | 0xE82C
1107 | 0xE831
1108 | 0xE832
1109 | 0xE83B
1110 | 0xE843
1111 | 0xE854
1112 | 0xE855
1113 | 0xE864 => {
1114 score rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().GBK_SCORE_PER_NON_EUCrust-analyzer cargo chardetng 0.1.17 GBK_SCORE_PER_NON_EUC.;
1115 if self.prevrust-analyzer cargo chardetng 0.1.17 GbkCandidate#prev. rust-analyzer cargo chardetng 0.1.17 impl#[LatinCj][`PartialEq<Self>`]eq().==rust-analyzer cargo chardetng 0.1.17 impl#[LatinCj][`PartialEq<Self>`]eq(). rust-analyzer cargo chardetng 0.1.17 impl#[LatinCj][`PartialEq<Self>`]eq().LatinCjrust-analyzer cargo chardetng 0.1.17 LatinCj#::AsciiLetterrust-analyzer cargo chardetng 0.1.17 LatinCj#AsciiLetter# {
1116 score rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().CJK_LATIN_ADJACENCY_PENALTYrust-analyzer cargo chardetng 0.1.17 CJK_LATIN_ADJACENCY_PENALTY.;
1117 }
1118 self.prevrust-analyzer cargo chardetng 0.1.17 GbkCandidate#prev. = LatinCjrust-analyzer cargo chardetng 0.1.17 LatinCj#::Cjrust-analyzer cargo chardetng 0.1.17 LatinCj#Cj#;
1119 }
1120 _ => {
1121 score rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().GBK_PUA_PENALTYrust-analyzer cargo chardetng 0.1.17 GBK_PUA_PENALTY.;
1122 self.prevrust-analyzer cargo chardetng 0.1.17 GbkCandidate#prev. = LatinCjrust-analyzer cargo chardetng 0.1.17 LatinCj#::Otherrust-analyzer cargo chardetng 0.1.17 LatinCj#Other#;
1123 }
1124 }
1125 } else {
1126 match u {
1127 0x3000 // Distinct from Korean, space
1128 | 0x3001 // Distinct from Korean, enumeration comma
1129 | 0x3002 // Distinct from Korean, full stop
1130 | 0xFF08 // Distinct from Korean, parenthesis
1131 | 0xFF09 // Distinct from Korean, parenthesis
1132 | 0xFF01 // Distinct from Japanese, exclamation
1133 | 0xFF0C // Distinct from Japanese, comma
1134 | 0xFF1B // Distinct from Japanese, semicolon
1135 | 0xFF1F // Distinct from Japanese, question
1136 => {
1137 if let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(pending) = self.pending_scorerust-analyzer cargo chardetng 0.1.17 GbkCandidate#pending_score. {
1138 score rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().pending;
1139 self.pending_scorerust-analyzer cargo chardetng 0.1.17 GbkCandidate#pending_score. = Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#;
1140 }
1141 score rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().CJ_PUNCTUATIONrust-analyzer cargo chardetng 0.1.17 CJ_PUNCTUATION.;
1142 }
1143 0..=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/RangeInclusive#0x7F => {
1144 self.pending_scorerust-analyzer cargo chardetng 0.1.17 GbkCandidate#pending_score. = Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#; // Discard pending score
1145 }
1146 _ => {
1147 if let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(pending) = self.pending_scorerust-analyzer cargo chardetng 0.1.17 GbkCandidate#pending_score. {
1148 score rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().pending;
1149 self.pending_scorerust-analyzer cargo chardetng 0.1.17 GbkCandidate#pending_score. = Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#;
1150 }
1151 score rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().CJK_OTHERrust-analyzer cargo chardetng 0.1.17 CJK_OTHER.;
1152 }
1153 }
1154 self.prevrust-analyzer cargo chardetng 0.1.17 GbkCandidate#prev. = LatinCjrust-analyzer cargo chardetng 0.1.17 LatinCj#::Otherrust-analyzer cargo chardetng 0.1.17 LatinCj#Other#;
1155 }
1156 } else if written rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq().2 {
1157 if let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(pending) = self.pending_scorerust-analyzer cargo chardetng 0.1.17 GbkCandidate#pending_score. {
1158 score rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().pending;
1159 self.pending_scorerust-analyzer cargo chardetng 0.1.17 GbkCandidate#pending_score. = Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#;
1160 }
1161 let u = dst[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().0]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().;
1162 if u rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]ge().>=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]ge(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]ge().0xDB80 && u rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]le().<=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]le(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]le().0xDBFF {
1163 score rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().GBK_PUA_PENALTYrust-analyzer cargo chardetng 0.1.17 GBK_PUA_PENALTY.;
1164 self.prevrust-analyzer cargo chardetng 0.1.17 GbkCandidate#prev. = LatinCjrust-analyzer cargo chardetng 0.1.17 LatinCj#::Otherrust-analyzer cargo chardetng 0.1.17 LatinCj#Other#;
1165 } else if u rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]ge().>=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]ge(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]ge().0xD480 && u rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]lt().<rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]lt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]lt().0xD880 {
1166 score rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().GBK_SCORE_PER_NON_EUCrust-analyzer cargo chardetng 0.1.17 GBK_SCORE_PER_NON_EUC.;
1167 if self.prevrust-analyzer cargo chardetng 0.1.17 GbkCandidate#prev. rust-analyzer cargo chardetng 0.1.17 impl#[LatinCj][`PartialEq<Self>`]eq().==rust-analyzer cargo chardetng 0.1.17 impl#[LatinCj][`PartialEq<Self>`]eq(). rust-analyzer cargo chardetng 0.1.17 impl#[LatinCj][`PartialEq<Self>`]eq().LatinCjrust-analyzer cargo chardetng 0.1.17 LatinCj#::AsciiLetterrust-analyzer cargo chardetng 0.1.17 LatinCj#AsciiLetter# {
1168 score rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().CJK_LATIN_ADJACENCY_PENALTYrust-analyzer cargo chardetng 0.1.17 CJK_LATIN_ADJACENCY_PENALTY.;
1169 }
1170 self.prevrust-analyzer cargo chardetng 0.1.17 GbkCandidate#prev. = LatinCjrust-analyzer cargo chardetng 0.1.17 LatinCj#::Cjrust-analyzer cargo chardetng 0.1.17 LatinCj#Cj#;
1171 } else {
1172 score rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().CJK_OTHERrust-analyzer cargo chardetng 0.1.17 CJK_OTHER.;
1173 self.prevrust-analyzer cargo chardetng 0.1.17 GbkCandidate#prev. = LatinCjrust-analyzer cargo chardetng 0.1.17 LatinCj#::Otherrust-analyzer cargo chardetng 0.1.17 LatinCj#Other#;
1174 }
1175 }
1176 match result {
1177 DecoderResultrust-analyzer cargo encoding_rs 0.8.35 DecoderResult#::InputEmptyrust-analyzer cargo encoding_rs 0.8.35 DecoderResult#InputEmpty# => {
1178 assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(read, 1);
1179 }
1180 DecoderResultrust-analyzer cargo encoding_rs 0.8.35 DecoderResult#::Malformedrust-analyzer cargo encoding_rs 0.8.35 DecoderResult#Malformed#(malformed_len, _) => {
1181 if (self.prev_byterust-analyzer cargo chardetng 0.1.17 GbkCandidate#prev_byte. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().0xA0 || self.prev_byterust-analyzer cargo chardetng 0.1.17 GbkCandidate#prev_byte. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().0xFE || self.prev_byterust-analyzer cargo chardetng 0.1.17 GbkCandidate#prev_byte. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().0xFD)
1182 && (b rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]lt().<rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]lt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]lt().0x80 || b rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().0xFF)
1183 {
1184 // Mac OS Chinese Simplified single-byte that conflicts with code page GBK lead byte
1185 // followed by ASCII or a non-conflicting single-byte extension.
1186 self.pending_scorerust-analyzer cargo chardetng 0.1.17 GbkCandidate#pending_score. = Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#; // Just in case
1187 score rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().GBK_SINGLE_BYTE_EXTENSION_PENALTYrust-analyzer cargo chardetng 0.1.17 GBK_SINGLE_BYTE_EXTENSION_PENALTY.;
1188 if (b rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]ge().>=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]ge(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]ge().b'a' && b rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]le().<=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]le(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]le().b'z') || (b rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]ge().>=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]ge(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]ge().b'A' && b rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]le().<=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]le(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]le().b'Z') {
1189 self.prevrust-analyzer cargo chardetng 0.1.17 GbkCandidate#prev. = LatinCjrust-analyzer cargo chardetng 0.1.17 LatinCj#::AsciiLetterrust-analyzer cargo chardetng 0.1.17 LatinCj#AsciiLetter#;
1190 } else if b rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().0xFF {
1191 score rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().GBK_SINGLE_BYTE_EXTENSION_PENALTYrust-analyzer cargo chardetng 0.1.17 GBK_SINGLE_BYTE_EXTENSION_PENALTY.;
1192 self.prevrust-analyzer cargo chardetng 0.1.17 GbkCandidate#prev. = LatinCjrust-analyzer cargo chardetng 0.1.17 LatinCj#::Otherrust-analyzer cargo chardetng 0.1.17 LatinCj#Other#;
1193 } else {
1194 self.prevrust-analyzer cargo chardetng 0.1.17 GbkCandidate#prev. = LatinCjrust-analyzer cargo chardetng 0.1.17 LatinCj#::Otherrust-analyzer cargo chardetng 0.1.17 LatinCj#Other#;
1195 }
1196 // The GBK decoder has the pending ASCII concept, which is
1197 // a problem with this trickery, so let's reset the state.
1198 self.decoderrust-analyzer cargo chardetng 0.1.17 GbkCandidate#decoder. = GBKrust-analyzer cargo encoding_rs 0.8.35 GBK..new_decoder_without_bom_handlingrust-analyzer cargo encoding_rs 0.8.35 impl#[Encoding]new_decoder_without_bom_handling().();
1199 } else if malformed_len rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().1 && b rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().0xFF {
1200 // Mac OS Chinese Simplified single-byte extension that doesn't conflict with lead bytes
1201 self.pending_scorerust-analyzer cargo chardetng 0.1.17 GbkCandidate#pending_score. = Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#; // Just in case
1202 score rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().GBK_SINGLE_BYTE_EXTENSION_PENALTYrust-analyzer cargo chardetng 0.1.17 GBK_SINGLE_BYTE_EXTENSION_PENALTY.;
1203 self.prevrust-analyzer cargo chardetng 0.1.17 GbkCandidate#prev. = LatinCjrust-analyzer cargo chardetng 0.1.17 LatinCj#::Otherrust-analyzer cargo chardetng 0.1.17 LatinCj#Other#;
1204 // The GBK decoder has the pending ASCII concept, which is
1205 // a problem with this trickery, so let's reset the state.
1206 self.decoderrust-analyzer cargo chardetng 0.1.17 GbkCandidate#decoder. = GBKrust-analyzer cargo encoding_rs 0.8.35 GBK..new_decoder_without_bom_handlingrust-analyzer cargo encoding_rs 0.8.35 impl#[Encoding]new_decoder_without_bom_handling().();
1207 } else {
1208 return Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#;
1209 }
1210 }
1211 DecoderResultrust-analyzer cargo encoding_rs 0.8.35 DecoderResult#::OutputFullrust-analyzer cargo encoding_rs 0.8.35 DecoderResult#OutputFull# => {
1212 unreachablerust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/unreachable!!();
1213 }
1214 }
1215 self.prev_byterust-analyzer cargo chardetng 0.1.17 GbkCandidate#prev_byte. = b;
1216 }
1217 if last {
1218 let (result, _, _) = self
1219 .decoderrust-analyzer cargo chardetng 0.1.17 GbkCandidate#decoder.
1220 .decode_to_utf16_without_replacementrust-analyzer cargo encoding_rs 0.8.35 impl#[Decoder]decode_to_utf16_without_replacement().(b"", &mut dst, true);
1221 match result {
1222 DecoderResultrust-analyzer cargo encoding_rs 0.8.35 DecoderResult#::InputEmptyrust-analyzer cargo encoding_rs 0.8.35 DecoderResult#InputEmpty# => {}
1223 DecoderResultrust-analyzer cargo encoding_rs 0.8.35 DecoderResult#::Malformedrust-analyzer cargo encoding_rs 0.8.35 DecoderResult#Malformed#(_, _) => {
1224 return Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#;
1225 }
1226 DecoderResultrust-analyzer cargo encoding_rs 0.8.35 DecoderResult#::OutputFullrust-analyzer cargo encoding_rs 0.8.35 DecoderResult#OutputFull# => {
1227 unreachablerust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/unreachable!!();
1228 }
1229 }
1230 }
1231 Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(score)
1232 }
1233 }
1234
1235 // Shift_JIS and Big5
1236 fn problematic_leadrust-analyzer cargo chardetng 0.1.17 problematic_lead().(b: u8) -> bool {
1237 match b {
1238 0x91..=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/RangeInclusive#0x97 | 0x9A | 0x8A | 0x9B | 0x8B | 0x9E | 0x8E | 0xB0 => true,
1239 _ => false,
1240 }
1241 }
1242
1243 // GBK and EUC-KR
1244 fn more_problematic_leadrust-analyzer cargo chardetng 0.1.17 more_problematic_lead().(b: u8) -> bool {
1245 problematic_leadrust-analyzer cargo chardetng 0.1.17 problematic_lead().(b) || b rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().0x82 || b rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().0x84 || b rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().0x85 || b rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().0xA0
1246 }
1247
1248 struct ShiftJisCandidaterust-analyzer cargo chardetng 0.1.17 ShiftJisCandidate# {
1249 decoderrust-analyzer cargo chardetng 0.1.17 ShiftJisCandidate#decoder.: Decoderrust-analyzer cargo encoding_rs 0.8.35 Decoder#,
1250 half_width_katakana_seenrust-analyzer cargo chardetng 0.1.17 ShiftJisCandidate#half_width_katakana_seen.: bool,
1251 half_width_katakana_staterust-analyzer cargo chardetng 0.1.17 ShiftJisCandidate#half_width_katakana_state.: HalfWidthKatakanarust-analyzer cargo chardetng 0.1.17 HalfWidthKatakana#,
1252 prevrust-analyzer cargo chardetng 0.1.17 ShiftJisCandidate#prev.: LatinCjrust-analyzer cargo chardetng 0.1.17 LatinCj#,
1253 prev_byterust-analyzer cargo chardetng 0.1.17 ShiftJisCandidate#prev_byte.: u8,
1254 pending_scorerust-analyzer cargo chardetng 0.1.17 ShiftJisCandidate#pending_score.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<i64>,
1255 }
1256
1257 impl ShiftJisCandidaterust-analyzer cargo chardetng 0.1.17 ShiftJisCandidate# {
1258 fn maybe_set_as_pendingrust-analyzer cargo chardetng 0.1.17 impl#[ShiftJisCandidate]maybe_set_as_pending().(&mut self, s: i64) -> i64 {
1259 assertrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/assert!!(self.pending_scorerust-analyzer cargo chardetng 0.1.17 ShiftJisCandidate#pending_score..is_nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]is_none().());
1260 if self.prevrust-analyzer cargo chardetng 0.1.17 ShiftJisCandidate#prev. rust-analyzer cargo chardetng 0.1.17 impl#[LatinCj][`PartialEq<Self>`]eq().==rust-analyzer cargo chardetng 0.1.17 impl#[LatinCj][`PartialEq<Self>`]eq(). rust-analyzer cargo chardetng 0.1.17 impl#[LatinCj][`PartialEq<Self>`]eq().LatinCjrust-analyzer cargo chardetng 0.1.17 LatinCj#::Cjrust-analyzer cargo chardetng 0.1.17 LatinCj#Cj# || !rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[bool][Not]not().problematic_leadrust-analyzer cargo chardetng 0.1.17 problematic_lead().(self.prev_byterust-analyzer cargo chardetng 0.1.17 ShiftJisCandidate#prev_byte.) {
1261 s
1262 } else {
1263 self.pending_scorerust-analyzer cargo chardetng 0.1.17 ShiftJisCandidate#pending_score. = Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(s);
1264 0
1265 }
1266 }
1267
1268 fn feedrust-analyzer cargo chardetng 0.1.17 impl#[ShiftJisCandidate]feed().(&mut self, buffer: &[u8], last: bool) -> Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<i64> {
1269 let mut score = 0i64;
1270 let mut src = [0u8];
1271 let mut dst = [0u16; 2];
1272 for &b in buffer {
1273 src[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`IndexMut<I>`]index_mut().0]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`IndexMut<I>`]index_mut(). = b;
1274 let (result, read, written) = self
1275 .decoderrust-analyzer cargo chardetng 0.1.17 ShiftJisCandidate#decoder.
1276 .decode_to_utf16_without_replacementrust-analyzer cargo encoding_rs 0.8.35 impl#[Decoder]decode_to_utf16_without_replacement().(&src, &mut dst, false);
1277 if written rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialOrd<Self>`]gt().>rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialOrd<Self>`]gt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialOrd<Self>`]gt().0 {
1278 let half_width_katakana_state = self.half_width_katakana_staterust-analyzer cargo chardetng 0.1.17 ShiftJisCandidate#half_width_katakana_state.;
1279 self.half_width_katakana_staterust-analyzer cargo chardetng 0.1.17 ShiftJisCandidate#half_width_katakana_state. = HalfWidthKatakanarust-analyzer cargo chardetng 0.1.17 HalfWidthKatakana#::DakutenForbiddenrust-analyzer cargo chardetng 0.1.17 HalfWidthKatakana#DakutenForbidden#;
1280 let u = dst[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().0]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().;
1281 if (u rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]ge().>=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]ge(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]ge().u16::fromrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/num/impl#[u16][`From<u8>`]from().(b'a') && u rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]le().<=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]le(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]le().u16::fromrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/num/impl#[u16][`From<u8>`]from().(b'z'))
1282 || (u rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]ge().>=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]ge(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]ge().u16::fromrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/num/impl#[u16][`From<u8>`]from().(b'A') && u rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]le().<=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]le(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]le().u16::fromrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/num/impl#[u16][`From<u8>`]from().(b'Z'))
1283 {
1284 self.pending_scorerust-analyzer cargo chardetng 0.1.17 ShiftJisCandidate#pending_score. = Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#; // Discard pending score
1285 if self.prevrust-analyzer cargo chardetng 0.1.17 ShiftJisCandidate#prev. rust-analyzer cargo chardetng 0.1.17 impl#[LatinCj][`PartialEq<Self>`]eq().==rust-analyzer cargo chardetng 0.1.17 impl#[LatinCj][`PartialEq<Self>`]eq(). rust-analyzer cargo chardetng 0.1.17 impl#[LatinCj][`PartialEq<Self>`]eq().LatinCjrust-analyzer cargo chardetng 0.1.17 LatinCj#::Cjrust-analyzer cargo chardetng 0.1.17 LatinCj#Cj# {
1286 score rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().CJK_LATIN_ADJACENCY_PENALTYrust-analyzer cargo chardetng 0.1.17 CJK_LATIN_ADJACENCY_PENALTY.;
1287 }
1288 self.prevrust-analyzer cargo chardetng 0.1.17 ShiftJisCandidate#prev. = LatinCjrust-analyzer cargo chardetng 0.1.17 LatinCj#::AsciiLetterrust-analyzer cargo chardetng 0.1.17 LatinCj#AsciiLetter#;
1289 } else if u rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]ge().>=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]ge(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]ge().0xFF61 && u rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]le().<=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]le(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]le().0xFF9F {
1290 if !rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[bool][Not]not().self.half_width_katakana_seenrust-analyzer cargo chardetng 0.1.17 ShiftJisCandidate#half_width_katakana_seen. {
1291 self.half_width_katakana_seenrust-analyzer cargo chardetng 0.1.17 ShiftJisCandidate#half_width_katakana_seen. = true;
1292 // To avoid misdetecting title-length inputs
1293 score rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().SHIFT_JIS_INITIAL_HALF_WIDTH_KATAKANA_PENALTYrust-analyzer cargo chardetng 0.1.17 SHIFT_JIS_INITIAL_HALF_WIDTH_KATAKANA_PENALTY.;
1294 }
1295 self.pending_scorerust-analyzer cargo chardetng 0.1.17 ShiftJisCandidate#pending_score. = Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#; // Discard pending score
1296 score rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().HALF_WIDTH_KATAKANA_SCORErust-analyzer cargo chardetng 0.1.17 HALF_WIDTH_KATAKANA_SCORE.;
1297
1298 if (u rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]ge().>=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]ge(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]ge().0xFF76 && u rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]le().<=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]le(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]le().0xFF84) || u rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialEq<Self>`]eq().0xFF73 {
1299 self.half_width_katakana_staterust-analyzer cargo chardetng 0.1.17 ShiftJisCandidate#half_width_katakana_state. = HalfWidthKatakanarust-analyzer cargo chardetng 0.1.17 HalfWidthKatakana#::DakutenAllowedrust-analyzer cargo chardetng 0.1.17 HalfWidthKatakana#DakutenAllowed#;
1300 } else if u rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]ge().>=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]ge(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]ge().0xFF8A && u rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]le().<=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]le(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]le().0xFF8E {
1301 self.half_width_katakana_staterust-analyzer cargo chardetng 0.1.17 ShiftJisCandidate#half_width_katakana_state. =
1302 HalfWidthKatakanarust-analyzer cargo chardetng 0.1.17 HalfWidthKatakana#::DakutenOrHandakutenAllowedrust-analyzer cargo chardetng 0.1.17 HalfWidthKatakana#DakutenOrHandakutenAllowed#;
1303 } else if u rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialEq<Self>`]eq().0xFF9E {
1304 if half_width_katakana_state rust-analyzer cargo chardetng 0.1.17 impl#[HalfWidthKatakana][`PartialEq<Self>`]eq().==rust-analyzer cargo chardetng 0.1.17 impl#[HalfWidthKatakana][`PartialEq<Self>`]eq(). rust-analyzer cargo chardetng 0.1.17 impl#[HalfWidthKatakana][`PartialEq<Self>`]eq().HalfWidthKatakanarust-analyzer cargo chardetng 0.1.17 HalfWidthKatakana#::DakutenForbiddenrust-analyzer cargo chardetng 0.1.17 HalfWidthKatakana#DakutenForbidden# {
1305 score rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().IMPLAUSIBILITY_PENALTYrust-analyzer cargo chardetng 0.1.17 IMPLAUSIBILITY_PENALTY.;
1306 } else {
1307 score rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().HALF_WIDTH_KATAKANA_VOICING_SCORErust-analyzer cargo chardetng 0.1.17 HALF_WIDTH_KATAKANA_VOICING_SCORE.;
1308 }
1309 } else if u rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialEq<Self>`]eq().0xFF9F {
1310 if half_width_katakana_state
1311 !=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialEq#ne(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialEq#ne().HalfWidthKatakanarust-analyzer cargo chardetng 0.1.17 HalfWidthKatakana#::DakutenOrHandakutenAllowedrust-analyzer cargo chardetng 0.1.17 HalfWidthKatakana#DakutenOrHandakutenAllowed#
1312 {
1313 score rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().IMPLAUSIBILITY_PENALTYrust-analyzer cargo chardetng 0.1.17 IMPLAUSIBILITY_PENALTY.;
1314 } else {
1315 score rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().HALF_WIDTH_KATAKANA_VOICING_SCORErust-analyzer cargo chardetng 0.1.17 HALF_WIDTH_KATAKANA_VOICING_SCORE.;
1316 }
1317 }
1318
1319 if self.prevrust-analyzer cargo chardetng 0.1.17 ShiftJisCandidate#prev. rust-analyzer cargo chardetng 0.1.17 impl#[LatinCj][`PartialEq<Self>`]eq().==rust-analyzer cargo chardetng 0.1.17 impl#[LatinCj][`PartialEq<Self>`]eq(). rust-analyzer cargo chardetng 0.1.17 impl#[LatinCj][`PartialEq<Self>`]eq().LatinCjrust-analyzer cargo chardetng 0.1.17 LatinCj#::AsciiLetterrust-analyzer cargo chardetng 0.1.17 LatinCj#AsciiLetter# {
1320 score rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().CJK_LATIN_ADJACENCY_PENALTYrust-analyzer cargo chardetng 0.1.17 CJK_LATIN_ADJACENCY_PENALTY.;
1321 }
1322 self.prevrust-analyzer cargo chardetng 0.1.17 ShiftJisCandidate#prev. = LatinCjrust-analyzer cargo chardetng 0.1.17 LatinCj#::Cjrust-analyzer cargo chardetng 0.1.17 LatinCj#Cj#;
1323 } else if u rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]ge().>=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]ge(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]ge().0x3040 && u rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]lt().<rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]lt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]lt().0x3100 {
1324 if let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(pending) = self.pending_scorerust-analyzer cargo chardetng 0.1.17 ShiftJisCandidate#pending_score. {
1325 score rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().pending;
1326 self.pending_scorerust-analyzer cargo chardetng 0.1.17 ShiftJisCandidate#pending_score. = Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#;
1327 }
1328 score rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().SHIFT_JIS_SCORE_PER_KANArust-analyzer cargo chardetng 0.1.17 SHIFT_JIS_SCORE_PER_KANA.;
1329 if self.prevrust-analyzer cargo chardetng 0.1.17 ShiftJisCandidate#prev. rust-analyzer cargo chardetng 0.1.17 impl#[LatinCj][`PartialEq<Self>`]eq().==rust-analyzer cargo chardetng 0.1.17 impl#[LatinCj][`PartialEq<Self>`]eq(). rust-analyzer cargo chardetng 0.1.17 impl#[LatinCj][`PartialEq<Self>`]eq().LatinCjrust-analyzer cargo chardetng 0.1.17 LatinCj#::AsciiLetterrust-analyzer cargo chardetng 0.1.17 LatinCj#AsciiLetter# {
1330 score rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().CJK_LATIN_ADJACENCY_PENALTYrust-analyzer cargo chardetng 0.1.17 CJK_LATIN_ADJACENCY_PENALTY.;
1331 }
1332 self.prevrust-analyzer cargo chardetng 0.1.17 ShiftJisCandidate#prev. = LatinCjrust-analyzer cargo chardetng 0.1.17 LatinCj#::Cjrust-analyzer cargo chardetng 0.1.17 LatinCj#Cj#;
1333 } else if (u rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]ge().>=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]ge(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]ge().0x3400 && u rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]lt().<rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]lt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]lt().0xA000) || (u rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]ge().>=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]ge(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]ge().0xF900 && u rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]lt().<rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]lt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]lt().0xFB00) {
1334 if let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(pending) = self.pending_scorerust-analyzer cargo chardetng 0.1.17 ShiftJisCandidate#pending_score. {
1335 score rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().pending;
1336 self.pending_scorerust-analyzer cargo chardetng 0.1.17 ShiftJisCandidate#pending_score. = Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#;
1337 }
1338 if self.prev_byterust-analyzer cargo chardetng 0.1.17 ShiftJisCandidate#prev_byte. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]lt().<rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]lt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]lt().0x98 || (self.prev_byterust-analyzer cargo chardetng 0.1.17 ShiftJisCandidate#prev_byte. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().0x98 && b rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]lt().<rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]lt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]lt().0x73) {
1339 score rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().self.maybe_set_as_pendingrust-analyzer cargo chardetng 0.1.17 impl#[ShiftJisCandidate]maybe_set_as_pending().(
1340 SHIFT_JIS_SCORE_PER_LEVEL_1_KANJIrust-analyzer cargo chardetng 0.1.17 SHIFT_JIS_SCORE_PER_LEVEL_1_KANJI.
1341 +rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`Add<Self>`]add().cjk_extra_scorerust-analyzer cargo chardetng 0.1.17 cjk_extra_score().(u, &datarust-analyzer cargo chardetng 0.1.17 data/::DETECTOR_DATArust-analyzer cargo chardetng 0.1.17 data/DETECTOR_DATA..frequent_kanjirust-analyzer cargo chardetng 0.1.17 data/DetectorData#frequent_kanji.),
1342 );
1343 } else {
1344 score rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().self.maybe_set_as_pendingrust-analyzer cargo chardetng 0.1.17 impl#[ShiftJisCandidate]maybe_set_as_pending().(SHIFT_JIS_SCORE_PER_LEVEL_2_KANJIrust-analyzer cargo chardetng 0.1.17 SHIFT_JIS_SCORE_PER_LEVEL_2_KANJI.);
1345 }
1346 if self.prevrust-analyzer cargo chardetng 0.1.17 ShiftJisCandidate#prev. rust-analyzer cargo chardetng 0.1.17 impl#[LatinCj][`PartialEq<Self>`]eq().==rust-analyzer cargo chardetng 0.1.17 impl#[LatinCj][`PartialEq<Self>`]eq(). rust-analyzer cargo chardetng 0.1.17 impl#[LatinCj][`PartialEq<Self>`]eq().LatinCjrust-analyzer cargo chardetng 0.1.17 LatinCj#::AsciiLetterrust-analyzer cargo chardetng 0.1.17 LatinCj#AsciiLetter# {
1347 score rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().CJK_LATIN_ADJACENCY_PENALTYrust-analyzer cargo chardetng 0.1.17 CJK_LATIN_ADJACENCY_PENALTY.;
1348 }
1349 self.prevrust-analyzer cargo chardetng 0.1.17 ShiftJisCandidate#prev. = LatinCjrust-analyzer cargo chardetng 0.1.17 LatinCj#::Cjrust-analyzer cargo chardetng 0.1.17 LatinCj#Cj#;
1350 } else if u rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]ge().>=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]ge(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]ge().0xE000 && u rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]lt().<rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]lt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]lt().0xF900 {
1351 if let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(pending) = self.pending_scorerust-analyzer cargo chardetng 0.1.17 ShiftJisCandidate#pending_score. {
1352 score rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().pending;
1353 self.pending_scorerust-analyzer cargo chardetng 0.1.17 ShiftJisCandidate#pending_score. = Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#;
1354 }
1355 score rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().SHIFT_JIS_PUA_PENALTYrust-analyzer cargo chardetng 0.1.17 SHIFT_JIS_PUA_PENALTY.;
1356 self.prevrust-analyzer cargo chardetng 0.1.17 ShiftJisCandidate#prev. = LatinCjrust-analyzer cargo chardetng 0.1.17 LatinCj#::Otherrust-analyzer cargo chardetng 0.1.17 LatinCj#Other#;
1357 } else {
1358 match u {
1359 0x3000 // Distinct from Korean, space
1360 | 0x3001 // Distinct from Korean, enumeration comma
1361 | 0x3002 // Distinct from Korean, full stop
1362 | 0xFF08 // Distinct from Korean, parenthesis
1363 | 0xFF09 // Distinct from Korean, parenthesis
1364 => {
1365 if let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(pending) = self.pending_scorerust-analyzer cargo chardetng 0.1.17 ShiftJisCandidate#pending_score. {
1366 score rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().pending;
1367 self.pending_scorerust-analyzer cargo chardetng 0.1.17 ShiftJisCandidate#pending_score. = Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#;
1368 }
1369 // Not really needed for CJK distinction
1370 // but let's give non-zero score for these
1371 // common byte pairs anyway.
1372 score rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().CJ_PUNCTUATIONrust-analyzer cargo chardetng 0.1.17 CJ_PUNCTUATION.;
1373 }
1374 0..=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/RangeInclusive#0x7F => {
1375 self.pending_scorerust-analyzer cargo chardetng 0.1.17 ShiftJisCandidate#pending_score. = Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#; // Discard pending score
1376 }
1377 0x80 => {
1378 // This is a control character that overlaps euro
1379 // in windows-1252 and happens to be a non-error
1380 // is Shift_JIS.
1381 self.pending_scorerust-analyzer cargo chardetng 0.1.17 ShiftJisCandidate#pending_score. = Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#; // Discard pending score
1382 score rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().IMPLAUSIBILITY_PENALTYrust-analyzer cargo chardetng 0.1.17 IMPLAUSIBILITY_PENALTY.;
1383 }
1384 _ => {
1385 if let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(pending) = self.pending_scorerust-analyzer cargo chardetng 0.1.17 ShiftJisCandidate#pending_score. {
1386 score rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().pending;
1387 self.pending_scorerust-analyzer cargo chardetng 0.1.17 ShiftJisCandidate#pending_score. = Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#;
1388 }
1389 score rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().CJK_OTHERrust-analyzer cargo chardetng 0.1.17 CJK_OTHER.;
1390 }
1391 }
1392 self.prevrust-analyzer cargo chardetng 0.1.17 ShiftJisCandidate#prev. = LatinCjrust-analyzer cargo chardetng 0.1.17 LatinCj#::Otherrust-analyzer cargo chardetng 0.1.17 LatinCj#Other#;
1393 }
1394 }
1395 match result {
1396 DecoderResultrust-analyzer cargo encoding_rs 0.8.35 DecoderResult#::InputEmptyrust-analyzer cargo encoding_rs 0.8.35 DecoderResult#InputEmpty# => {
1397 assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(read, 1);
1398 }
1399 DecoderResultrust-analyzer cargo encoding_rs 0.8.35 DecoderResult#::Malformedrust-analyzer cargo encoding_rs 0.8.35 DecoderResult#Malformed#(malformed_len, _) => {
1400 if (((self.prev_byterust-analyzer cargo chardetng 0.1.17 ShiftJisCandidate#prev_byte. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]ge().>=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]ge(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]ge().0x81 && self.prev_byterust-analyzer cargo chardetng 0.1.17 ShiftJisCandidate#prev_byte. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]le().<=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]le(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]le().0x9F)
1401 || (self.prev_byterust-analyzer cargo chardetng 0.1.17 ShiftJisCandidate#prev_byte. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]ge().>=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]ge(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]ge().0xE0 && self.prev_byterust-analyzer cargo chardetng 0.1.17 ShiftJisCandidate#prev_byte. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]le().<=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]le(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]le().0xFC))
1402 && ((b rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]ge().>=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]ge(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]ge().0x40 && b rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]le().<=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]le(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]le().0x7E) || (b rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]ge().>=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]ge(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]ge().0x80 && b rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]le().<=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]le(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]le().0xFC)))
1403 && !rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[bool][Not]not().((self.prev_byterust-analyzer cargo chardetng 0.1.17 ShiftJisCandidate#prev_byte. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().0x82 && b rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]ge().>=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]ge(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]ge().0xFA)
1404 || (self.prev_byterust-analyzer cargo chardetng 0.1.17 ShiftJisCandidate#prev_byte. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().0x84 && ((b rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]ge().>=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]ge(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]ge().0xDD && b rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]le().<=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]le(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]le().0xE4) || b rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]ge().>=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]ge(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]ge().0xFB))
1405 || (self.prev_byterust-analyzer cargo chardetng 0.1.17 ShiftJisCandidate#prev_byte. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().0x86 && b rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]ge().>=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]ge(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]ge().0xF2 && b rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]le().<=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]le(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]le().0xFA)
1406 || (self.prev_byterust-analyzer cargo chardetng 0.1.17 ShiftJisCandidate#prev_byte. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().0x87 && b rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]ge().>=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]ge(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]ge().0x77 && b rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]le().<=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]le(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]le().0x7D)
1407 || (self.prev_byterust-analyzer cargo chardetng 0.1.17 ShiftJisCandidate#prev_byte. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().0xFC && b rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]ge().>=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]ge(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]ge().0xF5))
1408 {
1409 // Shift_JIS2004 or MacJapanese
1410 if let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(pending) = self.pending_scorerust-analyzer cargo chardetng 0.1.17 ShiftJisCandidate#pending_score. {
1411 score rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().pending;
1412 self.pending_scorerust-analyzer cargo chardetng 0.1.17 ShiftJisCandidate#pending_score. = Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#;
1413 }
1414 score rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().SHIFT_JIS_EXTENSION_PENALTYrust-analyzer cargo chardetng 0.1.17 SHIFT_JIS_EXTENSION_PENALTY.;
1415 // Approximate boundary
1416 if self.prev_byterust-analyzer cargo chardetng 0.1.17 ShiftJisCandidate#prev_byte. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]lt().<rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]lt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]lt().0x87 {
1417 self.prevrust-analyzer cargo chardetng 0.1.17 ShiftJisCandidate#prev. = LatinCjrust-analyzer cargo chardetng 0.1.17 LatinCj#::Otherrust-analyzer cargo chardetng 0.1.17 LatinCj#Other#;
1418 } else {
1419 if self.prevrust-analyzer cargo chardetng 0.1.17 ShiftJisCandidate#prev. rust-analyzer cargo chardetng 0.1.17 impl#[LatinCj][`PartialEq<Self>`]eq().==rust-analyzer cargo chardetng 0.1.17 impl#[LatinCj][`PartialEq<Self>`]eq(). rust-analyzer cargo chardetng 0.1.17 impl#[LatinCj][`PartialEq<Self>`]eq().LatinCjrust-analyzer cargo chardetng 0.1.17 LatinCj#::AsciiLetterrust-analyzer cargo chardetng 0.1.17 LatinCj#AsciiLetter# {
1420 score rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().CJK_LATIN_ADJACENCY_PENALTYrust-analyzer cargo chardetng 0.1.17 CJK_LATIN_ADJACENCY_PENALTY.;
1421 }
1422 self.prevrust-analyzer cargo chardetng 0.1.17 ShiftJisCandidate#prev. = LatinCjrust-analyzer cargo chardetng 0.1.17 LatinCj#::Cjrust-analyzer cargo chardetng 0.1.17 LatinCj#Cj#;
1423 }
1424 } else if malformed_len rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().1 && (b rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().0xA0 || b rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]ge().>=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]ge(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]ge().0xFD) {
1425 self.pending_scorerust-analyzer cargo chardetng 0.1.17 ShiftJisCandidate#pending_score. = Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#; // Just in case
1426 score rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().SHIFT_JIS_SINGLE_BYTE_EXTENSION_PENALTYrust-analyzer cargo chardetng 0.1.17 SHIFT_JIS_SINGLE_BYTE_EXTENSION_PENALTY.;
1427 self.prevrust-analyzer cargo chardetng 0.1.17 ShiftJisCandidate#prev. = LatinCjrust-analyzer cargo chardetng 0.1.17 LatinCj#::Otherrust-analyzer cargo chardetng 0.1.17 LatinCj#Other#;
1428 } else {
1429 return Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#;
1430 }
1431 }
1432 DecoderResultrust-analyzer cargo encoding_rs 0.8.35 DecoderResult#::OutputFullrust-analyzer cargo encoding_rs 0.8.35 DecoderResult#OutputFull# => {
1433 unreachablerust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/unreachable!!();
1434 }
1435 }
1436 self.prev_byterust-analyzer cargo chardetng 0.1.17 ShiftJisCandidate#prev_byte. = b;
1437 }
1438 if last {
1439 let (result, _, _) = self
1440 .decoderrust-analyzer cargo chardetng 0.1.17 ShiftJisCandidate#decoder.
1441 .decode_to_utf16_without_replacementrust-analyzer cargo encoding_rs 0.8.35 impl#[Decoder]decode_to_utf16_without_replacement().(b"", &mut dst, true);
1442 match result {
1443 DecoderResultrust-analyzer cargo encoding_rs 0.8.35 DecoderResult#::InputEmptyrust-analyzer cargo encoding_rs 0.8.35 DecoderResult#InputEmpty# => {}
1444 DecoderResultrust-analyzer cargo encoding_rs 0.8.35 DecoderResult#::Malformedrust-analyzer cargo encoding_rs 0.8.35 DecoderResult#Malformed#(_, _) => {
1445 return Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#;
1446 }
1447 DecoderResultrust-analyzer cargo encoding_rs 0.8.35 DecoderResult#::OutputFullrust-analyzer cargo encoding_rs 0.8.35 DecoderResult#OutputFull# => {
1448 unreachablerust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/unreachable!!();
1449 }
1450 }
1451 }
1452 Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(score)
1453 }
1454 }
1455
1456 struct EucJpCandidaterust-analyzer cargo chardetng 0.1.17 EucJpCandidate# {
1457 decoderrust-analyzer cargo chardetng 0.1.17 EucJpCandidate#decoder.: Decoderrust-analyzer cargo encoding_rs 0.8.35 Decoder#,
1458 non_ascii_seenrust-analyzer cargo chardetng 0.1.17 EucJpCandidate#non_ascii_seen.: bool,
1459 half_width_katakana_staterust-analyzer cargo chardetng 0.1.17 EucJpCandidate#half_width_katakana_state.: HalfWidthKatakanarust-analyzer cargo chardetng 0.1.17 HalfWidthKatakana#,
1460 prevrust-analyzer cargo chardetng 0.1.17 EucJpCandidate#prev.: LatinCjrust-analyzer cargo chardetng 0.1.17 LatinCj#,
1461 prev_byterust-analyzer cargo chardetng 0.1.17 EucJpCandidate#prev_byte.: u8,
1462 prev_prev_byterust-analyzer cargo chardetng 0.1.17 EucJpCandidate#prev_prev_byte.: u8,
1463 }
1464
1465 impl EucJpCandidaterust-analyzer cargo chardetng 0.1.17 EucJpCandidate# {
1466 fn feedrust-analyzer cargo chardetng 0.1.17 impl#[EucJpCandidate]feed().(&mut self, buffer: &[u8], last: bool) -> Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<i64> {
1467 let mut score = 0i64;
1468 let mut src = [0u8];
1469 let mut dst = [0u16; 2];
1470 for &b in buffer {
1471 src[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`IndexMut<I>`]index_mut().0]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`IndexMut<I>`]index_mut(). = b;
1472 let (result, read, written) = self
1473 .decoderrust-analyzer cargo chardetng 0.1.17 EucJpCandidate#decoder.
1474 .decode_to_utf16_without_replacementrust-analyzer cargo encoding_rs 0.8.35 impl#[Decoder]decode_to_utf16_without_replacement().(&src, &mut dst, false);
1475 if written rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialOrd<Self>`]gt().>rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialOrd<Self>`]gt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialOrd<Self>`]gt().0 {
1476 let half_width_katakana_state = self.half_width_katakana_staterust-analyzer cargo chardetng 0.1.17 EucJpCandidate#half_width_katakana_state.;
1477 self.half_width_katakana_staterust-analyzer cargo chardetng 0.1.17 EucJpCandidate#half_width_katakana_state. = HalfWidthKatakanarust-analyzer cargo chardetng 0.1.17 HalfWidthKatakana#::DakutenForbiddenrust-analyzer cargo chardetng 0.1.17 HalfWidthKatakana#DakutenForbidden#;
1478 let u = dst[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().0]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().;
1479 if !rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[bool][Not]not().self.non_ascii_seenrust-analyzer cargo chardetng 0.1.17 EucJpCandidate#non_ascii_seen. && u rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]ge().>=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]ge(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]ge().0x80 {
1480 self.non_ascii_seenrust-analyzer cargo chardetng 0.1.17 EucJpCandidate#non_ascii_seen. = true;
1481 if u rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]ge().>=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]ge(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]ge().0xFF61 && u rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]le().<=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]le(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]le().0xFF9F {
1482 // return None;
1483 }
1484 if u rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]ge().>=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]ge(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]ge().0x3040 && u rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]lt().<rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]lt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]lt().0x3100 {
1485 // Remove the kana advantage over initial Big5
1486 // hanzi.
1487 score rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().EUC_JP_INITIAL_KANA_PENALTYrust-analyzer cargo chardetng 0.1.17 EUC_JP_INITIAL_KANA_PENALTY.;
1488 }
1489 }
1490 if (u rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]ge().>=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]ge(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]ge().u16::fromrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/num/impl#[u16][`From<u8>`]from().(b'a') && u rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]le().<=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]le(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]le().u16::fromrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/num/impl#[u16][`From<u8>`]from().(b'z'))
1491 || (u rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]ge().>=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]ge(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]ge().u16::fromrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/num/impl#[u16][`From<u8>`]from().(b'A') && u rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]le().<=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]le(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]le().u16::fromrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/num/impl#[u16][`From<u8>`]from().(b'Z'))
1492 {
1493 if self.prevrust-analyzer cargo chardetng 0.1.17 EucJpCandidate#prev. rust-analyzer cargo chardetng 0.1.17 impl#[LatinCj][`PartialEq<Self>`]eq().==rust-analyzer cargo chardetng 0.1.17 impl#[LatinCj][`PartialEq<Self>`]eq(). rust-analyzer cargo chardetng 0.1.17 impl#[LatinCj][`PartialEq<Self>`]eq().LatinCjrust-analyzer cargo chardetng 0.1.17 LatinCj#::Cjrust-analyzer cargo chardetng 0.1.17 LatinCj#Cj# {
1494 score rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().CJK_LATIN_ADJACENCY_PENALTYrust-analyzer cargo chardetng 0.1.17 CJK_LATIN_ADJACENCY_PENALTY.;
1495 }
1496 self.prevrust-analyzer cargo chardetng 0.1.17 EucJpCandidate#prev. = LatinCjrust-analyzer cargo chardetng 0.1.17 LatinCj#::AsciiLetterrust-analyzer cargo chardetng 0.1.17 LatinCj#AsciiLetter#;
1497 } else if u rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]ge().>=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]ge(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]ge().0xFF61 && u rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]le().<=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]le(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]le().0xFF9F {
1498 score rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().HALF_WIDTH_KATAKANA_SCORErust-analyzer cargo chardetng 0.1.17 HALF_WIDTH_KATAKANA_SCORE.;
1499
1500 if (u rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]ge().>=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]ge(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]ge().0xFF76 && u rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]le().<=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]le(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]le().0xFF84) || u rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialEq<Self>`]eq().0xFF73 {
1501 self.half_width_katakana_staterust-analyzer cargo chardetng 0.1.17 EucJpCandidate#half_width_katakana_state. = HalfWidthKatakanarust-analyzer cargo chardetng 0.1.17 HalfWidthKatakana#::DakutenAllowedrust-analyzer cargo chardetng 0.1.17 HalfWidthKatakana#DakutenAllowed#;
1502 } else if u rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]ge().>=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]ge(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]ge().0xFF8A && u rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]le().<=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]le(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]le().0xFF8E {
1503 self.half_width_katakana_staterust-analyzer cargo chardetng 0.1.17 EucJpCandidate#half_width_katakana_state. =
1504 HalfWidthKatakanarust-analyzer cargo chardetng 0.1.17 HalfWidthKatakana#::DakutenOrHandakutenAllowedrust-analyzer cargo chardetng 0.1.17 HalfWidthKatakana#DakutenOrHandakutenAllowed#;
1505 } else if u rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialEq<Self>`]eq().0xFF9E {
1506 if half_width_katakana_state rust-analyzer cargo chardetng 0.1.17 impl#[HalfWidthKatakana][`PartialEq<Self>`]eq().==rust-analyzer cargo chardetng 0.1.17 impl#[HalfWidthKatakana][`PartialEq<Self>`]eq(). rust-analyzer cargo chardetng 0.1.17 impl#[HalfWidthKatakana][`PartialEq<Self>`]eq().HalfWidthKatakanarust-analyzer cargo chardetng 0.1.17 HalfWidthKatakana#::DakutenForbiddenrust-analyzer cargo chardetng 0.1.17 HalfWidthKatakana#DakutenForbidden# {
1507 score rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().IMPLAUSIBILITY_PENALTYrust-analyzer cargo chardetng 0.1.17 IMPLAUSIBILITY_PENALTY.;
1508 } else {
1509 score rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().HALF_WIDTH_KATAKANA_VOICING_SCORErust-analyzer cargo chardetng 0.1.17 HALF_WIDTH_KATAKANA_VOICING_SCORE.;
1510 }
1511 } else if u rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialEq<Self>`]eq().0xFF9F {
1512 if half_width_katakana_state
1513 !=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialEq#ne(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialEq#ne().HalfWidthKatakanarust-analyzer cargo chardetng 0.1.17 HalfWidthKatakana#::DakutenOrHandakutenAllowedrust-analyzer cargo chardetng 0.1.17 HalfWidthKatakana#DakutenOrHandakutenAllowed#
1514 {
1515 score rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().IMPLAUSIBILITY_PENALTYrust-analyzer cargo chardetng 0.1.17 IMPLAUSIBILITY_PENALTY.;
1516 } else {
1517 score rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().HALF_WIDTH_KATAKANA_VOICING_SCORErust-analyzer cargo chardetng 0.1.17 HALF_WIDTH_KATAKANA_VOICING_SCORE.;
1518 }
1519 }
1520
1521 if self.prevrust-analyzer cargo chardetng 0.1.17 EucJpCandidate#prev. rust-analyzer cargo chardetng 0.1.17 impl#[LatinCj][`PartialEq<Self>`]eq().==rust-analyzer cargo chardetng 0.1.17 impl#[LatinCj][`PartialEq<Self>`]eq(). rust-analyzer cargo chardetng 0.1.17 impl#[LatinCj][`PartialEq<Self>`]eq().LatinCjrust-analyzer cargo chardetng 0.1.17 LatinCj#::AsciiLetterrust-analyzer cargo chardetng 0.1.17 LatinCj#AsciiLetter# {
1522 score rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().CJK_LATIN_ADJACENCY_PENALTYrust-analyzer cargo chardetng 0.1.17 CJK_LATIN_ADJACENCY_PENALTY.;
1523 }
1524 self.prevrust-analyzer cargo chardetng 0.1.17 EucJpCandidate#prev. = LatinCjrust-analyzer cargo chardetng 0.1.17 LatinCj#::Otherrust-analyzer cargo chardetng 0.1.17 LatinCj#Other#;
1525 } else if (u rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]ge().>=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]ge(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]ge().0x3041 && u rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]le().<=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]le(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]le().0x3093) || (u rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]ge().>=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]ge(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]ge().0x30A1 && u rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]le().<=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]le(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]le().0x30F6) {
1526 match u {
1527 0x3090 // hiragana wi
1528 | 0x3091 // hiragana we
1529 | 0x30F0 // katakana wi
1530 | 0x30F1 // katakana we
1531 => {
1532 // Remove advantage over Big5 Hanzi
1533 score rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().EUC_JP_SCORE_PER_NEAR_OBSOLETE_KANArust-analyzer cargo chardetng 0.1.17 EUC_JP_SCORE_PER_NEAR_OBSOLETE_KANA.;
1534 }
1535 _ => {
1536 score rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().EUC_JP_SCORE_PER_KANArust-analyzer cargo chardetng 0.1.17 EUC_JP_SCORE_PER_KANA.;
1537 }
1538 }
1539 if self.prevrust-analyzer cargo chardetng 0.1.17 EucJpCandidate#prev. rust-analyzer cargo chardetng 0.1.17 impl#[LatinCj][`PartialEq<Self>`]eq().==rust-analyzer cargo chardetng 0.1.17 impl#[LatinCj][`PartialEq<Self>`]eq(). rust-analyzer cargo chardetng 0.1.17 impl#[LatinCj][`PartialEq<Self>`]eq().LatinCjrust-analyzer cargo chardetng 0.1.17 LatinCj#::AsciiLetterrust-analyzer cargo chardetng 0.1.17 LatinCj#AsciiLetter# {
1540 score rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().CJK_LATIN_ADJACENCY_PENALTYrust-analyzer cargo chardetng 0.1.17 CJK_LATIN_ADJACENCY_PENALTY.;
1541 }
1542 self.prevrust-analyzer cargo chardetng 0.1.17 EucJpCandidate#prev. = LatinCjrust-analyzer cargo chardetng 0.1.17 LatinCj#::Cjrust-analyzer cargo chardetng 0.1.17 LatinCj#Cj#;
1543 } else if (u rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]ge().>=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]ge(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]ge().0x3400 && u rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]lt().<rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]lt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]lt().0xA000) || (u rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]ge().>=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]ge(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]ge().0xF900 && u rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]lt().<rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]lt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]lt().0xFB00) {
1544 if self.prev_prev_byterust-analyzer cargo chardetng 0.1.17 EucJpCandidate#prev_prev_byte. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().0x8F {
1545 score rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().EUC_JP_SCORE_PER_OTHER_KANJIrust-analyzer cargo chardetng 0.1.17 EUC_JP_SCORE_PER_OTHER_KANJI.;
1546 } else if self.prev_byterust-analyzer cargo chardetng 0.1.17 EucJpCandidate#prev_byte. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]lt().<rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]lt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]lt().0xD0 {
1547 score rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().EUC_JP_SCORE_PER_LEVEL_1_KANJIrust-analyzer cargo chardetng 0.1.17 EUC_JP_SCORE_PER_LEVEL_1_KANJI.;
1548 score rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().cjk_extra_scorerust-analyzer cargo chardetng 0.1.17 cjk_extra_score().(u, &datarust-analyzer cargo chardetng 0.1.17 data/::DETECTOR_DATArust-analyzer cargo chardetng 0.1.17 data/DETECTOR_DATA..frequent_kanjirust-analyzer cargo chardetng 0.1.17 data/DetectorData#frequent_kanji.);
1549 } else {
1550 score rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().EUC_JP_SCORE_PER_LEVEL_2_KANJIrust-analyzer cargo chardetng 0.1.17 EUC_JP_SCORE_PER_LEVEL_2_KANJI.;
1551 }
1552 if self.prevrust-analyzer cargo chardetng 0.1.17 EucJpCandidate#prev. rust-analyzer cargo chardetng 0.1.17 impl#[LatinCj][`PartialEq<Self>`]eq().==rust-analyzer cargo chardetng 0.1.17 impl#[LatinCj][`PartialEq<Self>`]eq(). rust-analyzer cargo chardetng 0.1.17 impl#[LatinCj][`PartialEq<Self>`]eq().LatinCjrust-analyzer cargo chardetng 0.1.17 LatinCj#::AsciiLetterrust-analyzer cargo chardetng 0.1.17 LatinCj#AsciiLetter# {
1553 score rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().CJK_LATIN_ADJACENCY_PENALTYrust-analyzer cargo chardetng 0.1.17 CJK_LATIN_ADJACENCY_PENALTY.;
1554 }
1555 self.prevrust-analyzer cargo chardetng 0.1.17 EucJpCandidate#prev. = LatinCjrust-analyzer cargo chardetng 0.1.17 LatinCj#::Cjrust-analyzer cargo chardetng 0.1.17 LatinCj#Cj#;
1556 } else {
1557 match u {
1558 0x3000 // Distinct from Korean, space
1559 | 0x3001 // Distinct from Korean, enumeration comma
1560 | 0x3002 // Distinct from Korean, full stop
1561 | 0xFF08 // Distinct from Korean, parenthesis
1562 | 0xFF09 // Distinct from Korean, parenthesis
1563 => {
1564 score rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().CJ_PUNCTUATIONrust-analyzer cargo chardetng 0.1.17 CJ_PUNCTUATION.;
1565 }
1566 0..=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/RangeInclusive#0x7F => {}
1567 _ => {
1568 score rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().CJK_OTHERrust-analyzer cargo chardetng 0.1.17 CJK_OTHER.;
1569 }
1570 }
1571 self.prevrust-analyzer cargo chardetng 0.1.17 EucJpCandidate#prev. = LatinCjrust-analyzer cargo chardetng 0.1.17 LatinCj#::Otherrust-analyzer cargo chardetng 0.1.17 LatinCj#Other#;
1572 }
1573 }
1574 match result {
1575 DecoderResultrust-analyzer cargo encoding_rs 0.8.35 DecoderResult#::InputEmptyrust-analyzer cargo encoding_rs 0.8.35 DecoderResult#InputEmpty# => {
1576 assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(read, 1);
1577 }
1578 DecoderResultrust-analyzer cargo encoding_rs 0.8.35 DecoderResult#::Malformedrust-analyzer cargo encoding_rs 0.8.35 DecoderResult#Malformed#(_, _) => {
1579 if b rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]ge().>=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]ge(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]ge().0xA1
1580 && b rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]le().<=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]le(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]le().0xFE
1581 && self.prev_byterust-analyzer cargo chardetng 0.1.17 EucJpCandidate#prev_byte. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]ge().>=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]ge(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]ge().0xA1
1582 && self.prev_byterust-analyzer cargo chardetng 0.1.17 EucJpCandidate#prev_byte. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]le().<=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]le(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]le().0xFE
1583 && ((self.prev_prev_byterust-analyzer cargo chardetng 0.1.17 EucJpCandidate#prev_prev_byte. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]ne().!=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]ne(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]ne().0x8F
1584 && !rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[bool][Not]not().(self.prev_byterust-analyzer cargo chardetng 0.1.17 EucJpCandidate#prev_byte. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().0xA8 && b rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]ge().>=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]ge(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]ge().0xDF && b rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]le().<=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]le(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]le().0xE6)
1585 && !rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[bool][Not]not().(self.prev_byterust-analyzer cargo chardetng 0.1.17 EucJpCandidate#prev_byte. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().0xAC && b rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]ge().>=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]ge(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]ge().0xF4 && b rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]le().<=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]le(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]le().0xFC)
1586 && !rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[bool][Not]not().(self.prev_byterust-analyzer cargo chardetng 0.1.17 EucJpCandidate#prev_byte. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().0xAD && b rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]ge().>=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]ge(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]ge().0xD8 && b rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]le().<=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]le(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]le().0xDE))
1587 || (self.prev_prev_byterust-analyzer cargo chardetng 0.1.17 EucJpCandidate#prev_prev_byte. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().0x8F
1588 && self.prev_byterust-analyzer cargo chardetng 0.1.17 EucJpCandidate#prev_byte. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]ne().!=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]ne(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]ne().0xA2
1589 && self.prev_byterust-analyzer cargo chardetng 0.1.17 EucJpCandidate#prev_byte. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]ne().!=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]ne(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]ne().0xA6
1590 && self.prev_byterust-analyzer cargo chardetng 0.1.17 EucJpCandidate#prev_byte. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]ne().!=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]ne(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]ne().0xA7
1591 && self.prev_byterust-analyzer cargo chardetng 0.1.17 EucJpCandidate#prev_byte. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]ne().!=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]ne(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]ne().0xA9
1592 && self.prev_byterust-analyzer cargo chardetng 0.1.17 EucJpCandidate#prev_byte. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]ne().!=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]ne(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]ne().0xAA
1593 && self.prev_byterust-analyzer cargo chardetng 0.1.17 EucJpCandidate#prev_byte. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]ne().!=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]ne(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]ne().0xAB
1594 && self.prev_byterust-analyzer cargo chardetng 0.1.17 EucJpCandidate#prev_byte. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]ne().!=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]ne(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]ne().0xED
1595 && !rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[bool][Not]not().(self.prev_byterust-analyzer cargo chardetng 0.1.17 EucJpCandidate#prev_byte. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().0xFE && b rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]ge().>=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]ge(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]ge().0xF7)))
1596 {
1597 score rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().EUC_JP_EXTENSION_PENALTYrust-analyzer cargo chardetng 0.1.17 EUC_JP_EXTENSION_PENALTY.;
1598 if self.prevrust-analyzer cargo chardetng 0.1.17 EucJpCandidate#prev. rust-analyzer cargo chardetng 0.1.17 impl#[LatinCj][`PartialEq<Self>`]eq().==rust-analyzer cargo chardetng 0.1.17 impl#[LatinCj][`PartialEq<Self>`]eq(). rust-analyzer cargo chardetng 0.1.17 impl#[LatinCj][`PartialEq<Self>`]eq().LatinCjrust-analyzer cargo chardetng 0.1.17 LatinCj#::AsciiLetterrust-analyzer cargo chardetng 0.1.17 LatinCj#AsciiLetter# {
1599 score rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().CJK_LATIN_ADJACENCY_PENALTYrust-analyzer cargo chardetng 0.1.17 CJK_LATIN_ADJACENCY_PENALTY.;
1600 }
1601 self.prevrust-analyzer cargo chardetng 0.1.17 EucJpCandidate#prev. = LatinCjrust-analyzer cargo chardetng 0.1.17 LatinCj#::Cjrust-analyzer cargo chardetng 0.1.17 LatinCj#Cj#;
1602 } else {
1603 return Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#;
1604 }
1605 }
1606 DecoderResultrust-analyzer cargo encoding_rs 0.8.35 DecoderResult#::OutputFullrust-analyzer cargo encoding_rs 0.8.35 DecoderResult#OutputFull# => {
1607 unreachablerust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/unreachable!!();
1608 }
1609 }
1610 self.prev_prev_byterust-analyzer cargo chardetng 0.1.17 EucJpCandidate#prev_prev_byte. = self.prev_byterust-analyzer cargo chardetng 0.1.17 EucJpCandidate#prev_byte.;
1611 self.prev_byterust-analyzer cargo chardetng 0.1.17 EucJpCandidate#prev_byte. = b;
1612 }
1613 if last {
1614 let (result, _, _) = self
1615 .decoderrust-analyzer cargo chardetng 0.1.17 EucJpCandidate#decoder.
1616 .decode_to_utf16_without_replacementrust-analyzer cargo encoding_rs 0.8.35 impl#[Decoder]decode_to_utf16_without_replacement().(b"", &mut dst, true);
1617 match result {
1618 DecoderResultrust-analyzer cargo encoding_rs 0.8.35 DecoderResult#::InputEmptyrust-analyzer cargo encoding_rs 0.8.35 DecoderResult#InputEmpty# => {}
1619 DecoderResultrust-analyzer cargo encoding_rs 0.8.35 DecoderResult#::Malformedrust-analyzer cargo encoding_rs 0.8.35 DecoderResult#Malformed#(_, _) => {
1620 return Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#;
1621 }
1622 DecoderResultrust-analyzer cargo encoding_rs 0.8.35 DecoderResult#::OutputFullrust-analyzer cargo encoding_rs 0.8.35 DecoderResult#OutputFull# => {
1623 unreachablerust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/unreachable!!();
1624 }
1625 }
1626 }
1627 Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(score)
1628 }
1629 }
1630
1631 struct Big5Candidaterust-analyzer cargo chardetng 0.1.17 Big5Candidate# {
1632 decoderrust-analyzer cargo chardetng 0.1.17 Big5Candidate#decoder.: Decoderrust-analyzer cargo encoding_rs 0.8.35 Decoder#,
1633 prevrust-analyzer cargo chardetng 0.1.17 Big5Candidate#prev.: LatinCjrust-analyzer cargo chardetng 0.1.17 LatinCj#,
1634 prev_byterust-analyzer cargo chardetng 0.1.17 Big5Candidate#prev_byte.: u8,
1635 pending_scorerust-analyzer cargo chardetng 0.1.17 Big5Candidate#pending_score.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<i64>,
1636 }
1637
1638 impl Big5Candidaterust-analyzer cargo chardetng 0.1.17 Big5Candidate# {
1639 fn maybe_set_as_pendingrust-analyzer cargo chardetng 0.1.17 impl#[Big5Candidate]maybe_set_as_pending().(&mut self, s: i64) -> i64 {
1640 assertrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/assert!!(self.pending_scorerust-analyzer cargo chardetng 0.1.17 Big5Candidate#pending_score..is_nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]is_none().());
1641 if self.prevrust-analyzer cargo chardetng 0.1.17 Big5Candidate#prev. rust-analyzer cargo chardetng 0.1.17 impl#[LatinCj][`PartialEq<Self>`]eq().==rust-analyzer cargo chardetng 0.1.17 impl#[LatinCj][`PartialEq<Self>`]eq(). rust-analyzer cargo chardetng 0.1.17 impl#[LatinCj][`PartialEq<Self>`]eq().LatinCjrust-analyzer cargo chardetng 0.1.17 LatinCj#::Cjrust-analyzer cargo chardetng 0.1.17 LatinCj#Cj# || !rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[bool][Not]not().problematic_leadrust-analyzer cargo chardetng 0.1.17 problematic_lead().(self.prev_byterust-analyzer cargo chardetng 0.1.17 Big5Candidate#prev_byte.) {
1642 s
1643 } else {
1644 self.pending_scorerust-analyzer cargo chardetng 0.1.17 Big5Candidate#pending_score. = Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(s);
1645 0
1646 }
1647 }
1648
1649 fn feedrust-analyzer cargo chardetng 0.1.17 impl#[Big5Candidate]feed().(&mut self, buffer: &[u8], last: bool) -> Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<i64> {
1650 let mut score = 0i64;
1651 let mut src = [0u8];
1652 let mut dst = [0u16; 2];
1653 for &b in buffer {
1654 src[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`IndexMut<I>`]index_mut().0]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`IndexMut<I>`]index_mut(). = b;
1655 let (result, read, written) = self
1656 .decoderrust-analyzer cargo chardetng 0.1.17 Big5Candidate#decoder.
1657 .decode_to_utf16_without_replacementrust-analyzer cargo encoding_rs 0.8.35 impl#[Decoder]decode_to_utf16_without_replacement().(&src, &mut dst, false);
1658 if written rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq().1 {
1659 let u = dst[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().0]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().;
1660 if (u rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]ge().>=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]ge(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]ge().u16::fromrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/num/impl#[u16][`From<u8>`]from().(b'a') && u rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]le().<=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]le(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]le().u16::fromrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/num/impl#[u16][`From<u8>`]from().(b'z'))
1661 || (u rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]ge().>=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]ge(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]ge().u16::fromrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/num/impl#[u16][`From<u8>`]from().(b'A') && u rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]le().<=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]le(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]le().u16::fromrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/num/impl#[u16][`From<u8>`]from().(b'Z'))
1662 {
1663 self.pending_scorerust-analyzer cargo chardetng 0.1.17 Big5Candidate#pending_score. = Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#; // Discard pending score
1664 if self.prevrust-analyzer cargo chardetng 0.1.17 Big5Candidate#prev. rust-analyzer cargo chardetng 0.1.17 impl#[LatinCj][`PartialEq<Self>`]eq().==rust-analyzer cargo chardetng 0.1.17 impl#[LatinCj][`PartialEq<Self>`]eq(). rust-analyzer cargo chardetng 0.1.17 impl#[LatinCj][`PartialEq<Self>`]eq().LatinCjrust-analyzer cargo chardetng 0.1.17 LatinCj#::Cjrust-analyzer cargo chardetng 0.1.17 LatinCj#Cj# {
1665 score rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().CJK_LATIN_ADJACENCY_PENALTYrust-analyzer cargo chardetng 0.1.17 CJK_LATIN_ADJACENCY_PENALTY.;
1666 }
1667 self.prevrust-analyzer cargo chardetng 0.1.17 Big5Candidate#prev. = LatinCjrust-analyzer cargo chardetng 0.1.17 LatinCj#::AsciiLetterrust-analyzer cargo chardetng 0.1.17 LatinCj#AsciiLetter#;
1668 } else if (u rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]ge().>=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]ge(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]ge().0x3400 && u rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]lt().<rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]lt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]lt().0xA000) || (u rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]ge().>=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]ge(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]ge().0xF900 && u rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]lt().<rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]lt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]lt().0xFB00) {
1669 if let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(pending) = self.pending_scorerust-analyzer cargo chardetng 0.1.17 Big5Candidate#pending_score. {
1670 score rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().pending;
1671 self.pending_scorerust-analyzer cargo chardetng 0.1.17 Big5Candidate#pending_score. = Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#;
1672 }
1673 match self.prev_byterust-analyzer cargo chardetng 0.1.17 Big5Candidate#prev_byte. {
1674 0xA4..=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/RangeInclusive#0xC6 => {
1675 score rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().self.maybe_set_as_pendingrust-analyzer cargo chardetng 0.1.17 impl#[Big5Candidate]maybe_set_as_pending().(BIG5_SCORE_PER_LEVEL_1_HANZIrust-analyzer cargo chardetng 0.1.17 BIG5_SCORE_PER_LEVEL_1_HANZI.);
1676 // score += cjk_extra_score(u, &data::DETECTOR_DATA.frequent_traditional);
1677 }
1678 _ => {
1679 score rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().self.maybe_set_as_pendingrust-analyzer cargo chardetng 0.1.17 impl#[Big5Candidate]maybe_set_as_pending().(BIG5_SCORE_PER_OTHER_HANZIrust-analyzer cargo chardetng 0.1.17 BIG5_SCORE_PER_OTHER_HANZI.);
1680 }
1681 }
1682 if self.prevrust-analyzer cargo chardetng 0.1.17 Big5Candidate#prev. rust-analyzer cargo chardetng 0.1.17 impl#[LatinCj][`PartialEq<Self>`]eq().==rust-analyzer cargo chardetng 0.1.17 impl#[LatinCj][`PartialEq<Self>`]eq(). rust-analyzer cargo chardetng 0.1.17 impl#[LatinCj][`PartialEq<Self>`]eq().LatinCjrust-analyzer cargo chardetng 0.1.17 LatinCj#::AsciiLetterrust-analyzer cargo chardetng 0.1.17 LatinCj#AsciiLetter# {
1683 score rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().CJK_LATIN_ADJACENCY_PENALTYrust-analyzer cargo chardetng 0.1.17 CJK_LATIN_ADJACENCY_PENALTY.;
1684 }
1685 self.prevrust-analyzer cargo chardetng 0.1.17 Big5Candidate#prev. = LatinCjrust-analyzer cargo chardetng 0.1.17 LatinCj#::Cjrust-analyzer cargo chardetng 0.1.17 LatinCj#Cj#;
1686 } else {
1687 match u {
1688 0x3000 // Distinct from Korean, space
1689 | 0x3001 // Distinct from Korean, enumeration comma
1690 | 0x3002 // Distinct from Korean, full stop
1691 | 0xFF08 // Distinct from Korean, parenthesis
1692 | 0xFF09 // Distinct from Korean, parenthesis
1693 | 0xFF01 // Distinct from Japanese, exclamation
1694 | 0xFF0C // Distinct from Japanese, comma
1695 | 0xFF1B // Distinct from Japanese, semicolon
1696 | 0xFF1F // Distinct from Japanese, question
1697 => {
1698 if let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(pending) = self.pending_scorerust-analyzer cargo chardetng 0.1.17 Big5Candidate#pending_score. {
1699 score rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().pending;
1700 self.pending_scorerust-analyzer cargo chardetng 0.1.17 Big5Candidate#pending_score. = Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#;
1701 }
1702 // Not really needed for CJK distinction
1703 // but let's give non-zero score for these
1704 // common byte pairs anyway.
1705 score rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().CJ_PUNCTUATIONrust-analyzer cargo chardetng 0.1.17 CJ_PUNCTUATION.;
1706 }
1707 0..=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/RangeInclusive#0x7F => {
1708 self.pending_scorerust-analyzer cargo chardetng 0.1.17 Big5Candidate#pending_score. = Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#; // Discard pending score
1709 }
1710 _ => {
1711 if let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(pending) = self.pending_scorerust-analyzer cargo chardetng 0.1.17 Big5Candidate#pending_score. {
1712 score rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().pending;
1713 self.pending_scorerust-analyzer cargo chardetng 0.1.17 Big5Candidate#pending_score. = Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#;
1714 }
1715 score rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().CJK_OTHERrust-analyzer cargo chardetng 0.1.17 CJK_OTHER.;
1716 }
1717 }
1718 self.prevrust-analyzer cargo chardetng 0.1.17 Big5Candidate#prev. = LatinCjrust-analyzer cargo chardetng 0.1.17 LatinCj#::Otherrust-analyzer cargo chardetng 0.1.17 LatinCj#Other#;
1719 }
1720 } else if written rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq().2 {
1721 if let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(pending) = self.pending_scorerust-analyzer cargo chardetng 0.1.17 Big5Candidate#pending_score. {
1722 score rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().pending;
1723 self.pending_scorerust-analyzer cargo chardetng 0.1.17 Big5Candidate#pending_score. = Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#;
1724 }
1725 if dst[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().0]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialEq<Self>`]eq().0xCA || dst[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().0]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialEq<Self>`]eq().0xEA {
1726 score rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().CJK_OTHERrust-analyzer cargo chardetng 0.1.17 CJK_OTHER.;
1727 self.prevrust-analyzer cargo chardetng 0.1.17 Big5Candidate#prev. = LatinCjrust-analyzer cargo chardetng 0.1.17 LatinCj#::Otherrust-analyzer cargo chardetng 0.1.17 LatinCj#Other#;
1728 } else {
1729 debug_assertrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/debug_assert!!(dst[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().0]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index(). >= 0xD480 && dst[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().0]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index(). <rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]lt(). 0xD880);
1730 score rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().self.maybe_set_as_pendingrust-analyzer cargo chardetng 0.1.17 impl#[Big5Candidate]maybe_set_as_pending().(BIG5_SCORE_PER_OTHER_HANZIrust-analyzer cargo chardetng 0.1.17 BIG5_SCORE_PER_OTHER_HANZI.);
1731 if self.prevrust-analyzer cargo chardetng 0.1.17 Big5Candidate#prev. rust-analyzer cargo chardetng 0.1.17 impl#[LatinCj][`PartialEq<Self>`]eq().==rust-analyzer cargo chardetng 0.1.17 impl#[LatinCj][`PartialEq<Self>`]eq(). rust-analyzer cargo chardetng 0.1.17 impl#[LatinCj][`PartialEq<Self>`]eq().LatinCjrust-analyzer cargo chardetng 0.1.17 LatinCj#::AsciiLetterrust-analyzer cargo chardetng 0.1.17 LatinCj#AsciiLetter# {
1732 score rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().CJK_LATIN_ADJACENCY_PENALTYrust-analyzer cargo chardetng 0.1.17 CJK_LATIN_ADJACENCY_PENALTY.;
1733 }
1734 self.prevrust-analyzer cargo chardetng 0.1.17 Big5Candidate#prev. = LatinCjrust-analyzer cargo chardetng 0.1.17 LatinCj#::Cjrust-analyzer cargo chardetng 0.1.17 LatinCj#Cj#;
1735 }
1736 }
1737 match result {
1738 DecoderResultrust-analyzer cargo encoding_rs 0.8.35 DecoderResult#::InputEmptyrust-analyzer cargo encoding_rs 0.8.35 DecoderResult#InputEmpty# => {
1739 assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(read, 1);
1740 }
1741 DecoderResultrust-analyzer cargo encoding_rs 0.8.35 DecoderResult#::Malformedrust-analyzer cargo encoding_rs 0.8.35 DecoderResult#Malformed#(malformed_len, _) => {
1742 if self.prev_byterust-analyzer cargo chardetng 0.1.17 Big5Candidate#prev_byte. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]ge().>=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]ge(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]ge().0x81
1743 && self.prev_byterust-analyzer cargo chardetng 0.1.17 Big5Candidate#prev_byte. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]le().<=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]le(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]le().0xFE
1744 && ((b rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]ge().>=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]ge(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]ge().0x40 && b rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]le().<=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]le(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]le().0x7E) || (b rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]ge().>=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]ge(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]ge().0xA1 && b rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]le().<=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]le(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]le().0xFE))
1745 {
1746 // The byte pair is in the Big5 range but unmapped.
1747 // Treat as PUA to avoid rejecting Big5-UAO, etc.
1748 // We don't reprocess `b` even if ASCII, since it's
1749 // logically part of the pair.
1750 if let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(pending) = self.pending_scorerust-analyzer cargo chardetng 0.1.17 Big5Candidate#pending_score. {
1751 score rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().pending;
1752 self.pending_scorerust-analyzer cargo chardetng 0.1.17 Big5Candidate#pending_score. = Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#;
1753 }
1754 score rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().BIG5_PUA_PENALTYrust-analyzer cargo chardetng 0.1.17 BIG5_PUA_PENALTY.;
1755 // Assume Hanzi semantics
1756 if self.prevrust-analyzer cargo chardetng 0.1.17 Big5Candidate#prev. rust-analyzer cargo chardetng 0.1.17 impl#[LatinCj][`PartialEq<Self>`]eq().==rust-analyzer cargo chardetng 0.1.17 impl#[LatinCj][`PartialEq<Self>`]eq(). rust-analyzer cargo chardetng 0.1.17 impl#[LatinCj][`PartialEq<Self>`]eq().LatinCjrust-analyzer cargo chardetng 0.1.17 LatinCj#::AsciiLetterrust-analyzer cargo chardetng 0.1.17 LatinCj#AsciiLetter# {
1757 score rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().CJK_LATIN_ADJACENCY_PENALTYrust-analyzer cargo chardetng 0.1.17 CJK_LATIN_ADJACENCY_PENALTY.;
1758 }
1759 self.prevrust-analyzer cargo chardetng 0.1.17 Big5Candidate#prev. = LatinCjrust-analyzer cargo chardetng 0.1.17 LatinCj#::Cjrust-analyzer cargo chardetng 0.1.17 LatinCj#Cj#;
1760 } else if (self.prev_byterust-analyzer cargo chardetng 0.1.17 Big5Candidate#prev_byte. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().0xA0
1761 || self.prev_byterust-analyzer cargo chardetng 0.1.17 Big5Candidate#prev_byte. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().0xFD
1762 || self.prev_byterust-analyzer cargo chardetng 0.1.17 Big5Candidate#prev_byte. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().0xFE)
1763 && (b rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]lt().<rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]lt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]lt().0x80 || b rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().0xFF)
1764 {
1765 // Mac OS Chinese Traditional single-byte that conflicts with code page Big5 lead byte
1766 // followed by ASCII or a non-conflicting single-byte extension.
1767 self.pending_scorerust-analyzer cargo chardetng 0.1.17 Big5Candidate#pending_score. = Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#; // Just in case
1768 score rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().BIG5_SINGLE_BYTE_EXTENSION_PENALTYrust-analyzer cargo chardetng 0.1.17 BIG5_SINGLE_BYTE_EXTENSION_PENALTY.;
1769 if (b rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]ge().>=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]ge(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]ge().b'a' && b rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]le().<=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]le(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]le().b'z') || (b rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]ge().>=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]ge(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]ge().b'A' && b rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]le().<=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]le(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]le().b'Z') {
1770 self.prevrust-analyzer cargo chardetng 0.1.17 Big5Candidate#prev. = LatinCjrust-analyzer cargo chardetng 0.1.17 LatinCj#::AsciiLetterrust-analyzer cargo chardetng 0.1.17 LatinCj#AsciiLetter#;
1771 } else if b rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().0xFF {
1772 score rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().BIG5_SINGLE_BYTE_EXTENSION_PENALTYrust-analyzer cargo chardetng 0.1.17 BIG5_SINGLE_BYTE_EXTENSION_PENALTY.;
1773 self.prevrust-analyzer cargo chardetng 0.1.17 Big5Candidate#prev. = LatinCjrust-analyzer cargo chardetng 0.1.17 LatinCj#::Otherrust-analyzer cargo chardetng 0.1.17 LatinCj#Other#;
1774 } else {
1775 self.prevrust-analyzer cargo chardetng 0.1.17 Big5Candidate#prev. = LatinCjrust-analyzer cargo chardetng 0.1.17 LatinCj#::Otherrust-analyzer cargo chardetng 0.1.17 LatinCj#Other#;
1776 }
1777 } else if malformed_len rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().1 && b rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().0xFF {
1778 // Mac OS Chinese Traditional single-byte extension that doesn't conflict with lead bytes
1779 self.pending_scorerust-analyzer cargo chardetng 0.1.17 Big5Candidate#pending_score. = Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#; // Just in case
1780 score rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().BIG5_SINGLE_BYTE_EXTENSION_PENALTYrust-analyzer cargo chardetng 0.1.17 BIG5_SINGLE_BYTE_EXTENSION_PENALTY.;
1781 self.prevrust-analyzer cargo chardetng 0.1.17 Big5Candidate#prev. = LatinCjrust-analyzer cargo chardetng 0.1.17 LatinCj#::Otherrust-analyzer cargo chardetng 0.1.17 LatinCj#Other#;
1782 } else {
1783 return Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#;
1784 }
1785 }
1786 DecoderResultrust-analyzer cargo encoding_rs 0.8.35 DecoderResult#::OutputFullrust-analyzer cargo encoding_rs 0.8.35 DecoderResult#OutputFull# => {
1787 unreachablerust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/unreachable!!();
1788 }
1789 }
1790 self.prev_byterust-analyzer cargo chardetng 0.1.17 Big5Candidate#prev_byte. = b;
1791 }
1792 if last {
1793 let (result, _, _) = self
1794 .decoderrust-analyzer cargo chardetng 0.1.17 Big5Candidate#decoder.
1795 .decode_to_utf16_without_replacementrust-analyzer cargo encoding_rs 0.8.35 impl#[Decoder]decode_to_utf16_without_replacement().(b"", &mut dst, true);
1796 match result {
1797 DecoderResultrust-analyzer cargo encoding_rs 0.8.35 DecoderResult#::InputEmptyrust-analyzer cargo encoding_rs 0.8.35 DecoderResult#InputEmpty# => {}
1798 DecoderResultrust-analyzer cargo encoding_rs 0.8.35 DecoderResult#::Malformedrust-analyzer cargo encoding_rs 0.8.35 DecoderResult#Malformed#(_, _) => {
1799 return Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#;
1800 }
1801 DecoderResultrust-analyzer cargo encoding_rs 0.8.35 DecoderResult#::OutputFullrust-analyzer cargo encoding_rs 0.8.35 DecoderResult#OutputFull# => {
1802 unreachablerust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/unreachable!!();
1803 }
1804 }
1805 }
1806 Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(score)
1807 }
1808 }
1809
1810 struct EucKrCandidaterust-analyzer cargo chardetng 0.1.17 EucKrCandidate# {
1811 decoderrust-analyzer cargo chardetng 0.1.17 EucKrCandidate#decoder.: Decoderrust-analyzer cargo encoding_rs 0.8.35 Decoder#,
1812 prev_byterust-analyzer cargo chardetng 0.1.17 EucKrCandidate#prev_byte.: u8,
1813 prev_was_euc_rangerust-analyzer cargo chardetng 0.1.17 EucKrCandidate#prev_was_euc_range.: bool,
1814 prevrust-analyzer cargo chardetng 0.1.17 EucKrCandidate#prev.: LatinKoreanrust-analyzer cargo chardetng 0.1.17 LatinKorean#,
1815 current_word_lenrust-analyzer cargo chardetng 0.1.17 EucKrCandidate#current_word_len.: u64,
1816 pending_scorerust-analyzer cargo chardetng 0.1.17 EucKrCandidate#pending_score.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<i64>,
1817 }
1818
1819 impl EucKrCandidaterust-analyzer cargo chardetng 0.1.17 EucKrCandidate# {
1820 fn maybe_set_as_pendingrust-analyzer cargo chardetng 0.1.17 impl#[EucKrCandidate]maybe_set_as_pending().(&mut self, s: i64) -> i64 {
1821 assertrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/assert!!(self.pending_scorerust-analyzer cargo chardetng 0.1.17 EucKrCandidate#pending_score..is_nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]is_none().());
1822 if self.prevrust-analyzer cargo chardetng 0.1.17 EucKrCandidate#prev. rust-analyzer cargo chardetng 0.1.17 impl#[LatinKorean][`PartialEq<Self>`]eq().==rust-analyzer cargo chardetng 0.1.17 impl#[LatinKorean][`PartialEq<Self>`]eq(). rust-analyzer cargo chardetng 0.1.17 impl#[LatinKorean][`PartialEq<Self>`]eq().LatinKoreanrust-analyzer cargo chardetng 0.1.17 LatinKorean#::Hangulrust-analyzer cargo chardetng 0.1.17 LatinKorean#Hangul# || !rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[bool][Not]not().more_problematic_leadrust-analyzer cargo chardetng 0.1.17 more_problematic_lead().(self.prev_byterust-analyzer cargo chardetng 0.1.17 EucKrCandidate#prev_byte.) {
1823 s
1824 } else {
1825 self.pending_scorerust-analyzer cargo chardetng 0.1.17 EucKrCandidate#pending_score. = Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(s);
1826 0
1827 }
1828 }
1829
1830 fn feedrust-analyzer cargo chardetng 0.1.17 impl#[EucKrCandidate]feed().(&mut self, buffer: &[u8], last: bool) -> Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<i64> {
1831 let mut score = 0i64;
1832 let mut src = [0u8];
1833 let mut dst = [0u16; 2];
1834 for &b in buffer {
1835 let in_euc_range = b rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]ge().>=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]ge(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]ge().0xA1 && b rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]le().<=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]le(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]le().0xFE;
1836 src[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`IndexMut<I>`]index_mut().0]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`IndexMut<I>`]index_mut(). = b;
1837 let (result, read, written) = self
1838 .decoderrust-analyzer cargo chardetng 0.1.17 EucKrCandidate#decoder.
1839 .decode_to_utf16_without_replacementrust-analyzer cargo encoding_rs 0.8.35 impl#[Decoder]decode_to_utf16_without_replacement().(&src, &mut dst, false);
1840 if written rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialOrd<Self>`]gt().>rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialOrd<Self>`]gt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialOrd<Self>`]gt().0 {
1841 let u = dst[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().0]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().;
1842 if (u rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]ge().>=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]ge(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]ge().u16::fromrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/num/impl#[u16][`From<u8>`]from().(b'a') && u rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]le().<=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]le(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]le().u16::fromrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/num/impl#[u16][`From<u8>`]from().(b'z'))
1843 || (u rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]ge().>=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]ge(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]ge().u16::fromrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/num/impl#[u16][`From<u8>`]from().(b'A') && u rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]le().<=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]le(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]le().u16::fromrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/num/impl#[u16][`From<u8>`]from().(b'Z'))
1844 {
1845 self.pending_scorerust-analyzer cargo chardetng 0.1.17 EucKrCandidate#pending_score. = Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#; // Discard pending score
1846 match self.prevrust-analyzer cargo chardetng 0.1.17 EucKrCandidate#prev. {
1847 LatinKoreanrust-analyzer cargo chardetng 0.1.17 LatinKorean#::Hangulrust-analyzer cargo chardetng 0.1.17 LatinKorean#Hangul# | LatinKoreanrust-analyzer cargo chardetng 0.1.17 LatinKorean#::Hanjarust-analyzer cargo chardetng 0.1.17 LatinKorean#Hanja# => {
1848 score rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().CJK_LATIN_ADJACENCY_PENALTYrust-analyzer cargo chardetng 0.1.17 CJK_LATIN_ADJACENCY_PENALTY.;
1849 }
1850 _ => {}
1851 }
1852 self.prevrust-analyzer cargo chardetng 0.1.17 EucKrCandidate#prev. = LatinKoreanrust-analyzer cargo chardetng 0.1.17 LatinKorean#::AsciiLetterrust-analyzer cargo chardetng 0.1.17 LatinKorean#AsciiLetter#;
1853 self.current_word_lenrust-analyzer cargo chardetng 0.1.17 EucKrCandidate#current_word_len. = 0;
1854 } else if u rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]ge().>=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]ge(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]ge().0xAC00 && u rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]le().<=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]le(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]le().0xD7A3 {
1855 if let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(pending) = self.pending_scorerust-analyzer cargo chardetng 0.1.17 EucKrCandidate#pending_score. {
1856 score rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().pending;
1857 self.pending_scorerust-analyzer cargo chardetng 0.1.17 EucKrCandidate#pending_score. = Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#;
1858 }
1859 if self.prev_was_euc_rangerust-analyzer cargo chardetng 0.1.17 EucKrCandidate#prev_was_euc_range. && in_euc_range {
1860 score rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().EUC_KR_SCORE_PER_EUC_HANGULrust-analyzer cargo chardetng 0.1.17 EUC_KR_SCORE_PER_EUC_HANGUL.;
1861 score rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().cjk_extra_scorerust-analyzer cargo chardetng 0.1.17 cjk_extra_score().(u, &datarust-analyzer cargo chardetng 0.1.17 data/::DETECTOR_DATArust-analyzer cargo chardetng 0.1.17 data/DETECTOR_DATA..frequent_hangulrust-analyzer cargo chardetng 0.1.17 data/DetectorData#frequent_hangul.);
1862 } else {
1863 score rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().self.maybe_set_as_pendingrust-analyzer cargo chardetng 0.1.17 impl#[EucKrCandidate]maybe_set_as_pending().(EUC_KR_SCORE_PER_NON_EUC_HANGULrust-analyzer cargo chardetng 0.1.17 EUC_KR_SCORE_PER_NON_EUC_HANGUL.);
1864 }
1865 if self.prevrust-analyzer cargo chardetng 0.1.17 EucKrCandidate#prev. rust-analyzer cargo chardetng 0.1.17 impl#[LatinKorean][`PartialEq<Self>`]eq().==rust-analyzer cargo chardetng 0.1.17 impl#[LatinKorean][`PartialEq<Self>`]eq(). rust-analyzer cargo chardetng 0.1.17 impl#[LatinKorean][`PartialEq<Self>`]eq().LatinKoreanrust-analyzer cargo chardetng 0.1.17 LatinKorean#::AsciiLetterrust-analyzer cargo chardetng 0.1.17 LatinKorean#AsciiLetter# {
1866 score rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().CJK_LATIN_ADJACENCY_PENALTYrust-analyzer cargo chardetng 0.1.17 CJK_LATIN_ADJACENCY_PENALTY.;
1867 }
1868 self.prevrust-analyzer cargo chardetng 0.1.17 EucKrCandidate#prev. = LatinKoreanrust-analyzer cargo chardetng 0.1.17 LatinKorean#::Hangulrust-analyzer cargo chardetng 0.1.17 LatinKorean#Hangul#;
1869 self.current_word_lenrust-analyzer cargo chardetng 0.1.17 EucKrCandidate#current_word_len. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u64][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u64][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u64][`AddAssign<Self>`]add_assign().1;
1870 if self.current_word_lenrust-analyzer cargo chardetng 0.1.17 EucKrCandidate#current_word_len. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u64][`PartialOrd<Self>`]gt().>rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u64][`PartialOrd<Self>`]gt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u64][`PartialOrd<Self>`]gt().5 {
1871 score rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().EUC_KR_LONG_WORD_PENALTYrust-analyzer cargo chardetng 0.1.17 EUC_KR_LONG_WORD_PENALTY.;
1872 }
1873 } else if (u rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]ge().>=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]ge(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]ge().0x4E00 && u rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]lt().<rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]lt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]lt().0xAC00) || (u rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]ge().>=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]ge(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]ge().0xF900 && u rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]le().<=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]le(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]le().0xFA0B) {
1874 if let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(pending) = self.pending_scorerust-analyzer cargo chardetng 0.1.17 EucKrCandidate#pending_score. {
1875 score rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().pending;
1876 self.pending_scorerust-analyzer cargo chardetng 0.1.17 EucKrCandidate#pending_score. = Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#;
1877 }
1878 score rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().EUC_KR_SCORE_PER_HANJArust-analyzer cargo chardetng 0.1.17 EUC_KR_SCORE_PER_HANJA.;
1879 match self.prevrust-analyzer cargo chardetng 0.1.17 EucKrCandidate#prev. {
1880 LatinKoreanrust-analyzer cargo chardetng 0.1.17 LatinKorean#::AsciiLetterrust-analyzer cargo chardetng 0.1.17 LatinKorean#AsciiLetter# => {
1881 score rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().CJK_LATIN_ADJACENCY_PENALTYrust-analyzer cargo chardetng 0.1.17 CJK_LATIN_ADJACENCY_PENALTY.;
1882 }
1883 LatinKoreanrust-analyzer cargo chardetng 0.1.17 LatinKorean#::Hangulrust-analyzer cargo chardetng 0.1.17 LatinKorean#Hangul# => {
1884 score rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().EUC_KR_HANJA_AFTER_HANGUL_PENALTYrust-analyzer cargo chardetng 0.1.17 EUC_KR_HANJA_AFTER_HANGUL_PENALTY.;
1885 }
1886 _ => {}
1887 }
1888 self.prevrust-analyzer cargo chardetng 0.1.17 EucKrCandidate#prev. = LatinKoreanrust-analyzer cargo chardetng 0.1.17 LatinKorean#::Hanjarust-analyzer cargo chardetng 0.1.17 LatinKorean#Hanja#;
1889 self.current_word_lenrust-analyzer cargo chardetng 0.1.17 EucKrCandidate#current_word_len. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u64][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u64][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u64][`AddAssign<Self>`]add_assign().1;
1890 if self.current_word_lenrust-analyzer cargo chardetng 0.1.17 EucKrCandidate#current_word_len. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u64][`PartialOrd<Self>`]gt().>rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u64][`PartialOrd<Self>`]gt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u64][`PartialOrd<Self>`]gt().5 {
1891 score rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().EUC_KR_LONG_WORD_PENALTYrust-analyzer cargo chardetng 0.1.17 EUC_KR_LONG_WORD_PENALTY.;
1892 }
1893 } else {
1894 if u rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]ge().>=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]ge(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]ge().0x80 {
1895 if let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(pending) = self.pending_scorerust-analyzer cargo chardetng 0.1.17 EucKrCandidate#pending_score. {
1896 score rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().pending;
1897 self.pending_scorerust-analyzer cargo chardetng 0.1.17 EucKrCandidate#pending_score. = Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#;
1898 }
1899 score rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().CJK_OTHERrust-analyzer cargo chardetng 0.1.17 CJK_OTHER.;
1900 } else {
1901 self.pending_scorerust-analyzer cargo chardetng 0.1.17 EucKrCandidate#pending_score. = Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#; // Discard pending score
1902 }
1903 self.prevrust-analyzer cargo chardetng 0.1.17 EucKrCandidate#prev. = LatinKoreanrust-analyzer cargo chardetng 0.1.17 LatinKorean#::Otherrust-analyzer cargo chardetng 0.1.17 LatinKorean#Other#;
1904 self.current_word_lenrust-analyzer cargo chardetng 0.1.17 EucKrCandidate#current_word_len. = 0;
1905 }
1906 }
1907 match result {
1908 DecoderResultrust-analyzer cargo encoding_rs 0.8.35 DecoderResult#::InputEmptyrust-analyzer cargo encoding_rs 0.8.35 DecoderResult#InputEmpty# => {
1909 assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(read, 1);
1910 }
1911 DecoderResultrust-analyzer cargo encoding_rs 0.8.35 DecoderResult#::Malformedrust-analyzer cargo encoding_rs 0.8.35 DecoderResult#Malformed#(malformed_len, _) => {
1912 if (self.prev_byterust-analyzer cargo chardetng 0.1.17 EucKrCandidate#prev_byte. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().0xC9 || self.prev_byterust-analyzer cargo chardetng 0.1.17 EucKrCandidate#prev_byte. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().0xFE) && b rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]ge().>=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]ge(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]ge().0xA1 && b rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]le().<=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]le(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]le().0xFE
1913 {
1914 if let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(pending) = self.pending_scorerust-analyzer cargo chardetng 0.1.17 EucKrCandidate#pending_score. {
1915 score rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().pending;
1916 self.pending_scorerust-analyzer cargo chardetng 0.1.17 EucKrCandidate#pending_score. = Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#;
1917 }
1918 // The byte pair is in code page 949 EUDC range
1919 score rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().EUC_KR_PUA_PENALTYrust-analyzer cargo chardetng 0.1.17 EUC_KR_PUA_PENALTY.;
1920 // Assume Hanja semantics
1921 match self.prevrust-analyzer cargo chardetng 0.1.17 EucKrCandidate#prev. {
1922 LatinKoreanrust-analyzer cargo chardetng 0.1.17 LatinKorean#::AsciiLetterrust-analyzer cargo chardetng 0.1.17 LatinKorean#AsciiLetter# => {
1923 score rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().CJK_LATIN_ADJACENCY_PENALTYrust-analyzer cargo chardetng 0.1.17 CJK_LATIN_ADJACENCY_PENALTY.;
1924 }
1925 LatinKoreanrust-analyzer cargo chardetng 0.1.17 LatinKorean#::Hangulrust-analyzer cargo chardetng 0.1.17 LatinKorean#Hangul# => {
1926 score rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().EUC_KR_HANJA_AFTER_HANGUL_PENALTYrust-analyzer cargo chardetng 0.1.17 EUC_KR_HANJA_AFTER_HANGUL_PENALTY.;
1927 }
1928 _ => {}
1929 }
1930 self.prevrust-analyzer cargo chardetng 0.1.17 EucKrCandidate#prev. = LatinKoreanrust-analyzer cargo chardetng 0.1.17 LatinKorean#::Hanjarust-analyzer cargo chardetng 0.1.17 LatinKorean#Hanja#;
1931 self.current_word_lenrust-analyzer cargo chardetng 0.1.17 EucKrCandidate#current_word_len. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u64][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u64][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u64][`AddAssign<Self>`]add_assign().1;
1932 if self.current_word_lenrust-analyzer cargo chardetng 0.1.17 EucKrCandidate#current_word_len. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u64][`PartialOrd<Self>`]gt().>rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u64][`PartialOrd<Self>`]gt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u64][`PartialOrd<Self>`]gt().5 {
1933 score rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().EUC_KR_LONG_WORD_PENALTYrust-analyzer cargo chardetng 0.1.17 EUC_KR_LONG_WORD_PENALTY.;
1934 }
1935 } else if (self.prev_byterust-analyzer cargo chardetng 0.1.17 EucKrCandidate#prev_byte. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().0xA1
1936 || (self.prev_byterust-analyzer cargo chardetng 0.1.17 EucKrCandidate#prev_byte. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]ge().>=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]ge(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]ge().0xA3 && self.prev_byterust-analyzer cargo chardetng 0.1.17 EucKrCandidate#prev_byte. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]le().<=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]le(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]le().0xA8)
1937 || (self.prev_byterust-analyzer cargo chardetng 0.1.17 EucKrCandidate#prev_byte. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]ge().>=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]ge(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]ge().0xAA && self.prev_byterust-analyzer cargo chardetng 0.1.17 EucKrCandidate#prev_byte. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]le().<=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]le(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]le().0xAD))
1938 && (b rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]ge().>=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]ge(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]ge().0x7B && b rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]le().<=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]le(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]le().0x7D)
1939 {
1940 if let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(pending) = self.pending_scorerust-analyzer cargo chardetng 0.1.17 EucKrCandidate#pending_score. {
1941 score rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().pending;
1942 self.pending_scorerust-analyzer cargo chardetng 0.1.17 EucKrCandidate#pending_score. = Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#;
1943 }
1944 // MacKorean symbols in range not part of code page 949
1945 score rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().EUC_KR_MAC_KOREAN_PENALTYrust-analyzer cargo chardetng 0.1.17 EUC_KR_MAC_KOREAN_PENALTY.;
1946 self.prevrust-analyzer cargo chardetng 0.1.17 EucKrCandidate#prev. = LatinKoreanrust-analyzer cargo chardetng 0.1.17 LatinKorean#::Otherrust-analyzer cargo chardetng 0.1.17 LatinKorean#Other#;
1947 self.current_word_lenrust-analyzer cargo chardetng 0.1.17 EucKrCandidate#current_word_len. = 0;
1948 } else if (self.prev_byterust-analyzer cargo chardetng 0.1.17 EucKrCandidate#prev_byte. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]ge().>=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]ge(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]ge().0x81 && self.prev_byterust-analyzer cargo chardetng 0.1.17 EucKrCandidate#prev_byte. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]le().<=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]le(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]le().0x84)
1949 && (b rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]le().<=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]le(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]le().0x80 || b rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().0xFF)
1950 {
1951 // MacKorean single-byte that conflicts with code page 949 lead byte
1952 // followed by ASCII or a non-conflicting single-byte extension.
1953 self.pending_scorerust-analyzer cargo chardetng 0.1.17 EucKrCandidate#pending_score. = Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#; // Just in case
1954 score rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().EUC_KR_SINGLE_BYTE_EXTENSION_PENALTYrust-analyzer cargo chardetng 0.1.17 EUC_KR_SINGLE_BYTE_EXTENSION_PENALTY.;
1955 if (b rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]ge().>=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]ge(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]ge().b'a' && b rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]le().<=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]le(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]le().b'z') || (b rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]ge().>=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]ge(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]ge().b'A' && b rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]le().<=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]le(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]le().b'Z') {
1956 self.prevrust-analyzer cargo chardetng 0.1.17 EucKrCandidate#prev. = LatinKoreanrust-analyzer cargo chardetng 0.1.17 LatinKorean#::AsciiLetterrust-analyzer cargo chardetng 0.1.17 LatinKorean#AsciiLetter#;
1957 } else if b rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().0x80 || b rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().0xFF {
1958 score rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().EUC_KR_SINGLE_BYTE_EXTENSION_PENALTYrust-analyzer cargo chardetng 0.1.17 EUC_KR_SINGLE_BYTE_EXTENSION_PENALTY.;
1959 self.prevrust-analyzer cargo chardetng 0.1.17 EucKrCandidate#prev. = LatinKoreanrust-analyzer cargo chardetng 0.1.17 LatinKorean#::Otherrust-analyzer cargo chardetng 0.1.17 LatinKorean#Other#;
1960 } else {
1961 self.prevrust-analyzer cargo chardetng 0.1.17 EucKrCandidate#prev. = LatinKoreanrust-analyzer cargo chardetng 0.1.17 LatinKorean#::Otherrust-analyzer cargo chardetng 0.1.17 LatinKorean#Other#;
1962 }
1963 self.current_word_lenrust-analyzer cargo chardetng 0.1.17 EucKrCandidate#current_word_len. = 0;
1964 } else if malformed_len rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().1 && (b rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().0x80 || b rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().0xFF) {
1965 // MacKorean single-byte extensions that don't conflict with lead bytes
1966 self.pending_scorerust-analyzer cargo chardetng 0.1.17 EucKrCandidate#pending_score. = Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#; // Just in case
1967 score rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`AddAssign<Self>`]add_assign().EUC_KR_SINGLE_BYTE_EXTENSION_PENALTYrust-analyzer cargo chardetng 0.1.17 EUC_KR_SINGLE_BYTE_EXTENSION_PENALTY.;
1968 self.prevrust-analyzer cargo chardetng 0.1.17 EucKrCandidate#prev. = LatinKoreanrust-analyzer cargo chardetng 0.1.17 LatinKorean#::Otherrust-analyzer cargo chardetng 0.1.17 LatinKorean#Other#;
1969 self.current_word_lenrust-analyzer cargo chardetng 0.1.17 EucKrCandidate#current_word_len. = 0;
1970 } else {
1971 return Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#;
1972 }
1973 }
1974 DecoderResultrust-analyzer cargo encoding_rs 0.8.35 DecoderResult#::OutputFullrust-analyzer cargo encoding_rs 0.8.35 DecoderResult#OutputFull# => {
1975 unreachablerust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/unreachable!!();
1976 }
1977 }
1978 self.prev_was_euc_rangerust-analyzer cargo chardetng 0.1.17 EucKrCandidate#prev_was_euc_range. = in_euc_range;
1979 self.prev_byterust-analyzer cargo chardetng 0.1.17 EucKrCandidate#prev_byte. = b;
1980 }
1981 if last {
1982 let (result, _, _) = self
1983 .decoderrust-analyzer cargo chardetng 0.1.17 EucKrCandidate#decoder.
1984 .decode_to_utf16_without_replacementrust-analyzer cargo encoding_rs 0.8.35 impl#[Decoder]decode_to_utf16_without_replacement().(b"", &mut dst, true);
1985 match result {
1986 DecoderResultrust-analyzer cargo encoding_rs 0.8.35 DecoderResult#::InputEmptyrust-analyzer cargo encoding_rs 0.8.35 DecoderResult#InputEmpty# => {}
1987 DecoderResultrust-analyzer cargo encoding_rs 0.8.35 DecoderResult#::Malformedrust-analyzer cargo encoding_rs 0.8.35 DecoderResult#Malformed#(_, _) => {
1988 return Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#;
1989 }
1990 DecoderResultrust-analyzer cargo encoding_rs 0.8.35 DecoderResult#::OutputFullrust-analyzer cargo encoding_rs 0.8.35 DecoderResult#OutputFull# => {
1991 unreachablerust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/unreachable!!();
1992 }
1993 }
1994 }
1995 Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(score)
1996 }
1997 }
1998
1999 enum InnerCandidaterust-analyzer cargo chardetng 0.1.17 InnerCandidate# {
2000 Latinrust-analyzer cargo chardetng 0.1.17 InnerCandidate#Latin#(LatinCandidaterust-analyzer cargo chardetng 0.1.17 LatinCandidate#),
2001 NonLatinCasedrust-analyzer cargo chardetng 0.1.17 InnerCandidate#NonLatinCased#(NonLatinCasedCandidaterust-analyzer cargo chardetng 0.1.17 NonLatinCasedCandidate#),
2002 Caselessrust-analyzer cargo chardetng 0.1.17 InnerCandidate#Caseless#(CaselessCandidaterust-analyzer cargo chardetng 0.1.17 CaselessCandidate#),
2003 ArabicFrenchrust-analyzer cargo chardetng 0.1.17 InnerCandidate#ArabicFrench#(ArabicFrenchCandidaterust-analyzer cargo chardetng 0.1.17 ArabicFrenchCandidate#),
2004 Logicalrust-analyzer cargo chardetng 0.1.17 InnerCandidate#Logical#(LogicalCandidaterust-analyzer cargo chardetng 0.1.17 LogicalCandidate#),
2005 Visualrust-analyzer cargo chardetng 0.1.17 InnerCandidate#Visual#(VisualCandidaterust-analyzer cargo chardetng 0.1.17 VisualCandidate#),
2006 Utf8rust-analyzer cargo chardetng 0.1.17 InnerCandidate#Utf8#(Utf8Candidaterust-analyzer cargo chardetng 0.1.17 Utf8Candidate#),
2007 Iso2022rust-analyzer cargo chardetng 0.1.17 InnerCandidate#Iso2022#(Iso2022Candidaterust-analyzer cargo chardetng 0.1.17 Iso2022Candidate#),
2008 Shiftrust-analyzer cargo chardetng 0.1.17 InnerCandidate#Shift#(ShiftJisCandidaterust-analyzer cargo chardetng 0.1.17 ShiftJisCandidate#),
2009 EucJprust-analyzer cargo chardetng 0.1.17 InnerCandidate#EucJp#(EucJpCandidaterust-analyzer cargo chardetng 0.1.17 EucJpCandidate#),
2010 EucKrrust-analyzer cargo chardetng 0.1.17 InnerCandidate#EucKr#(EucKrCandidaterust-analyzer cargo chardetng 0.1.17 EucKrCandidate#),
2011 Big5rust-analyzer cargo chardetng 0.1.17 InnerCandidate#Big5#(Big5Candidaterust-analyzer cargo chardetng 0.1.17 Big5Candidate#),
2012 Gbkrust-analyzer cargo chardetng 0.1.17 InnerCandidate#Gbk#(GbkCandidaterust-analyzer cargo chardetng 0.1.17 GbkCandidate#),
2013 }
2014
2015 impl InnerCandidaterust-analyzer cargo chardetng 0.1.17 InnerCandidate# {
2016 fn feedrust-analyzer cargo chardetng 0.1.17 impl#[InnerCandidate]feed().(&mut self, buffer: &[u8], last: bool) -> Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<i64> {
2017 match self {
2018 InnerCandidaterust-analyzer cargo chardetng 0.1.17 InnerCandidate#::Latinrust-analyzer cargo chardetng 0.1.17 InnerCandidate#Latin#(c) => {
2019 if let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(new_score) = c.feedrust-analyzer cargo chardetng 0.1.17 impl#[LatinCandidate]feed().(buffer) {
2020 if last {
2021 // Treat EOF as space-like
2022 if let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(additional_score) = c.feedrust-analyzer cargo chardetng 0.1.17 impl#[LatinCandidate]feed().(b" ") {
2023 Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(new_score rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`Add<Self>`]add().additional_score)
2024 } else {
2025 Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#
2026 }
2027 } else {
2028 Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(new_score)
2029 }
2030 } else {
2031 Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#
2032 }
2033 }
2034 InnerCandidaterust-analyzer cargo chardetng 0.1.17 InnerCandidate#::NonLatinCasedrust-analyzer cargo chardetng 0.1.17 InnerCandidate#NonLatinCased#(c) => {
2035 if let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(new_score) = c.feedrust-analyzer cargo chardetng 0.1.17 impl#[NonLatinCasedCandidate]feed().(buffer) {
2036 if last {
2037 // Treat EOF as space-like
2038 if let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(additional_score) = c.feedrust-analyzer cargo chardetng 0.1.17 impl#[NonLatinCasedCandidate]feed().(b" ") {
2039 Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(new_score rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`Add<Self>`]add().additional_score)
2040 } else {
2041 Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#
2042 }
2043 } else {
2044 Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(new_score)
2045 }
2046 } else {
2047 Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#
2048 }
2049 }
2050 InnerCandidaterust-analyzer cargo chardetng 0.1.17 InnerCandidate#::Caselessrust-analyzer cargo chardetng 0.1.17 InnerCandidate#Caseless#(c) => {
2051 if let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(new_score) = c.feedrust-analyzer cargo chardetng 0.1.17 impl#[CaselessCandidate]feed().(buffer) {
2052 if last {
2053 // Treat EOF as space-like
2054 if let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(additional_score) = c.feedrust-analyzer cargo chardetng 0.1.17 impl#[CaselessCandidate]feed().(b" ") {
2055 Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(new_score rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`Add<Self>`]add().additional_score)
2056 } else {
2057 Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#
2058 }
2059 } else {
2060 Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(new_score)
2061 }
2062 } else {
2063 Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#
2064 }
2065 }
2066 InnerCandidaterust-analyzer cargo chardetng 0.1.17 InnerCandidate#::ArabicFrenchrust-analyzer cargo chardetng 0.1.17 InnerCandidate#ArabicFrench#(c) => {
2067 if let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(new_score) = c.feedrust-analyzer cargo chardetng 0.1.17 impl#[ArabicFrenchCandidate]feed().(buffer) {
2068 if last {
2069 // Treat EOF as space-like
2070 if let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(additional_score) = c.feedrust-analyzer cargo chardetng 0.1.17 impl#[ArabicFrenchCandidate]feed().(b" ") {
2071 Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(new_score rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`Add<Self>`]add().additional_score)
2072 } else {
2073 Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#
2074 }
2075 } else {
2076 Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(new_score)
2077 }
2078 } else {
2079 Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#
2080 }
2081 }
2082 InnerCandidaterust-analyzer cargo chardetng 0.1.17 InnerCandidate#::Logicalrust-analyzer cargo chardetng 0.1.17 InnerCandidate#Logical#(c) => {
2083 if let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(new_score) = c.feedrust-analyzer cargo chardetng 0.1.17 impl#[LogicalCandidate]feed().(buffer) {
2084 if last {
2085 // Treat EOF as space-like
2086 if let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(additional_score) = c.feedrust-analyzer cargo chardetng 0.1.17 impl#[LogicalCandidate]feed().(b" ") {
2087 Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(new_score rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`Add<Self>`]add().additional_score)
2088 } else {
2089 Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#
2090 }
2091 } else {
2092 Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(new_score)
2093 }
2094 } else {
2095 Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#
2096 }
2097 }
2098 InnerCandidaterust-analyzer cargo chardetng 0.1.17 InnerCandidate#::Visualrust-analyzer cargo chardetng 0.1.17 InnerCandidate#Visual#(c) => {
2099 if let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(new_score) = c.feedrust-analyzer cargo chardetng 0.1.17 impl#[VisualCandidate]feed().(buffer) {
2100 if last {
2101 // Treat EOF as space-like
2102 if let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(additional_score) = c.feedrust-analyzer cargo chardetng 0.1.17 impl#[VisualCandidate]feed().(b" ") {
2103 Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(new_score rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`Add<Self>`]add().additional_score)
2104 } else {
2105 Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#
2106 }
2107 } else {
2108 Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(new_score)
2109 }
2110 } else {
2111 Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#
2112 }
2113 }
2114 InnerCandidaterust-analyzer cargo chardetng 0.1.17 InnerCandidate#::Utf8rust-analyzer cargo chardetng 0.1.17 InnerCandidate#Utf8#(c) => c.feedrust-analyzer cargo chardetng 0.1.17 impl#[Utf8Candidate]feed().(buffer, last),
2115 InnerCandidaterust-analyzer cargo chardetng 0.1.17 InnerCandidate#::Iso2022rust-analyzer cargo chardetng 0.1.17 InnerCandidate#Iso2022#(c) => c.feedrust-analyzer cargo chardetng 0.1.17 impl#[Iso2022Candidate]feed().(buffer, last),
2116 InnerCandidaterust-analyzer cargo chardetng 0.1.17 InnerCandidate#::Shiftrust-analyzer cargo chardetng 0.1.17 InnerCandidate#Shift#(c) => c.feedrust-analyzer cargo chardetng 0.1.17 impl#[ShiftJisCandidate]feed().(buffer, last),
2117 InnerCandidaterust-analyzer cargo chardetng 0.1.17 InnerCandidate#::EucJprust-analyzer cargo chardetng 0.1.17 InnerCandidate#EucJp#(c) => c.feedrust-analyzer cargo chardetng 0.1.17 impl#[EucJpCandidate]feed().(buffer, last),
2118 InnerCandidaterust-analyzer cargo chardetng 0.1.17 InnerCandidate#::EucKrrust-analyzer cargo chardetng 0.1.17 InnerCandidate#EucKr#(c) => c.feedrust-analyzer cargo chardetng 0.1.17 impl#[EucKrCandidate]feed().(buffer, last),
2119 InnerCandidaterust-analyzer cargo chardetng 0.1.17 InnerCandidate#::Big5rust-analyzer cargo chardetng 0.1.17 InnerCandidate#Big5#(c) => c.feedrust-analyzer cargo chardetng 0.1.17 impl#[Big5Candidate]feed().(buffer, last),
2120 InnerCandidaterust-analyzer cargo chardetng 0.1.17 InnerCandidate#::Gbkrust-analyzer cargo chardetng 0.1.17 InnerCandidate#Gbk#(c) => c.feedrust-analyzer cargo chardetng 0.1.17 impl#[GbkCandidate]feed().(buffer, last),
2121 }
2122 }
2123 }
2124
2125 fn encoding_for_tldrust-analyzer cargo chardetng 0.1.17 encoding_for_tld().(tld: Tldrust-analyzer cargo chardetng 0.1.17 tld/Tld#) -> usize {
2126 match tld {
2127 Tldrust-analyzer cargo chardetng 0.1.17 tld/Tld#::CentralWindowsrust-analyzer cargo chardetng 0.1.17 tld/Tld#CentralWindows# | Tldrust-analyzer cargo chardetng 0.1.17 tld/Tld#::CentralCyrillicrust-analyzer cargo chardetng 0.1.17 tld/Tld#CentralCyrillic# => EncodingDetectorrust-analyzer cargo chardetng 0.1.17 EncodingDetector#::CENTRAL_WINDOWS_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]CENTRAL_WINDOWS_INDEX.,
2128 Tldrust-analyzer cargo chardetng 0.1.17 tld/Tld#::Cyrillicrust-analyzer cargo chardetng 0.1.17 tld/Tld#Cyrillic# => EncodingDetectorrust-analyzer cargo chardetng 0.1.17 EncodingDetector#::CYRILLIC_WINDOWS_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]CYRILLIC_WINDOWS_INDEX.,
2129 Tldrust-analyzer cargo chardetng 0.1.17 tld/Tld#::Genericrust-analyzer cargo chardetng 0.1.17 tld/Tld#Generic# | Tldrust-analyzer cargo chardetng 0.1.17 tld/Tld#::Westernrust-analyzer cargo chardetng 0.1.17 tld/Tld#Western# | Tldrust-analyzer cargo chardetng 0.1.17 tld/Tld#::WesternCyrillicrust-analyzer cargo chardetng 0.1.17 tld/Tld#WesternCyrillic# | Tldrust-analyzer cargo chardetng 0.1.17 tld/Tld#::WesternArabicrust-analyzer cargo chardetng 0.1.17 tld/Tld#WesternArabic# | Tldrust-analyzer cargo chardetng 0.1.17 tld/Tld#::Eurust-analyzer cargo chardetng 0.1.17 tld/Tld#Eu# => {
2130 EncodingDetectorrust-analyzer cargo chardetng 0.1.17 EncodingDetector#::WESTERN_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]WESTERN_INDEX.
2131 }
2132 Tldrust-analyzer cargo chardetng 0.1.17 tld/Tld#::IcelandicFaroeserust-analyzer cargo chardetng 0.1.17 tld/Tld#IcelandicFaroese# => EncodingDetectorrust-analyzer cargo chardetng 0.1.17 EncodingDetector#::ICELANDIC_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]ICELANDIC_INDEX.,
2133 Tldrust-analyzer cargo chardetng 0.1.17 tld/Tld#::Greekrust-analyzer cargo chardetng 0.1.17 tld/Tld#Greek# => EncodingDetectorrust-analyzer cargo chardetng 0.1.17 EncodingDetector#::GREEK_ISO_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]GREEK_ISO_INDEX.,
2134 Tldrust-analyzer cargo chardetng 0.1.17 tld/Tld#::TurkishAzerirust-analyzer cargo chardetng 0.1.17 tld/Tld#TurkishAzeri# => EncodingDetectorrust-analyzer cargo chardetng 0.1.17 EncodingDetector#::TURKISH_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]TURKISH_INDEX.,
2135 Tldrust-analyzer cargo chardetng 0.1.17 tld/Tld#::Hebrewrust-analyzer cargo chardetng 0.1.17 tld/Tld#Hebrew# => EncodingDetectorrust-analyzer cargo chardetng 0.1.17 EncodingDetector#::LOGICAL_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]LOGICAL_INDEX.,
2136 Tldrust-analyzer cargo chardetng 0.1.17 tld/Tld#::Arabicrust-analyzer cargo chardetng 0.1.17 tld/Tld#Arabic# => EncodingDetectorrust-analyzer cargo chardetng 0.1.17 EncodingDetector#::ARABIC_WINDOWS_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]ARABIC_WINDOWS_INDEX.,
2137 Tldrust-analyzer cargo chardetng 0.1.17 tld/Tld#::Balticrust-analyzer cargo chardetng 0.1.17 tld/Tld#Baltic# => EncodingDetectorrust-analyzer cargo chardetng 0.1.17 EncodingDetector#::BALTIC_WINDOWS_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]BALTIC_WINDOWS_INDEX.,
2138 Tldrust-analyzer cargo chardetng 0.1.17 tld/Tld#::Vietnameserust-analyzer cargo chardetng 0.1.17 tld/Tld#Vietnamese# => EncodingDetectorrust-analyzer cargo chardetng 0.1.17 EncodingDetector#::VIETNAMESE_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]VIETNAMESE_INDEX.,
2139 Tldrust-analyzer cargo chardetng 0.1.17 tld/Tld#::Thairust-analyzer cargo chardetng 0.1.17 tld/Tld#Thai# => EncodingDetectorrust-analyzer cargo chardetng 0.1.17 EncodingDetector#::THAI_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]THAI_INDEX.,
2140 Tldrust-analyzer cargo chardetng 0.1.17 tld/Tld#::Simplifiedrust-analyzer cargo chardetng 0.1.17 tld/Tld#Simplified# | Tldrust-analyzer cargo chardetng 0.1.17 tld/Tld#::SimplifiedTraditionalrust-analyzer cargo chardetng 0.1.17 tld/Tld#SimplifiedTraditional# => EncodingDetectorrust-analyzer cargo chardetng 0.1.17 EncodingDetector#::GBK_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]GBK_INDEX.,
2141 Tldrust-analyzer cargo chardetng 0.1.17 tld/Tld#::Traditionalrust-analyzer cargo chardetng 0.1.17 tld/Tld#Traditional# | Tldrust-analyzer cargo chardetng 0.1.17 tld/Tld#::TraditionalSimplifiedrust-analyzer cargo chardetng 0.1.17 tld/Tld#TraditionalSimplified# => EncodingDetectorrust-analyzer cargo chardetng 0.1.17 EncodingDetector#::BIG5_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]BIG5_INDEX.,
2142 Tldrust-analyzer cargo chardetng 0.1.17 tld/Tld#::Japaneserust-analyzer cargo chardetng 0.1.17 tld/Tld#Japanese# => EncodingDetectorrust-analyzer cargo chardetng 0.1.17 EncodingDetector#::SHIFT_JIS_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]SHIFT_JIS_INDEX.,
2143 Tldrust-analyzer cargo chardetng 0.1.17 tld/Tld#::Koreanrust-analyzer cargo chardetng 0.1.17 tld/Tld#Korean# => EncodingDetectorrust-analyzer cargo chardetng 0.1.17 EncodingDetector#::EUC_KR_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]EUC_KR_INDEX.,
2144 Tldrust-analyzer cargo chardetng 0.1.17 tld/Tld#::CentralIsorust-analyzer cargo chardetng 0.1.17 tld/Tld#CentralIso# => EncodingDetectorrust-analyzer cargo chardetng 0.1.17 EncodingDetector#::CENTRAL_ISO_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]CENTRAL_ISO_INDEX.,
2145 }
2146 }
2147
2148 fn encoding_is_native_to_tldrust-analyzer cargo chardetng 0.1.17 encoding_is_native_to_tld().(tld: Tldrust-analyzer cargo chardetng 0.1.17 tld/Tld#, encoding: usize) -> bool {
2149 match tld {
2150 Tldrust-analyzer cargo chardetng 0.1.17 tld/Tld#::CentralWindowsrust-analyzer cargo chardetng 0.1.17 tld/Tld#CentralWindows# => encoding rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq().EncodingDetectorrust-analyzer cargo chardetng 0.1.17 EncodingDetector#::CENTRAL_WINDOWS_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]CENTRAL_WINDOWS_INDEX.,
2151 Tldrust-analyzer cargo chardetng 0.1.17 tld/Tld#::Cyrillicrust-analyzer cargo chardetng 0.1.17 tld/Tld#Cyrillic# => {
2152 encoding rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq().EncodingDetectorrust-analyzer cargo chardetng 0.1.17 EncodingDetector#::CYRILLIC_WINDOWS_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]CYRILLIC_WINDOWS_INDEX.
2153 || encoding rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq().EncodingDetectorrust-analyzer cargo chardetng 0.1.17 EncodingDetector#::CYRILLIC_KOI_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]CYRILLIC_KOI_INDEX.
2154 || encoding rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq().EncodingDetectorrust-analyzer cargo chardetng 0.1.17 EncodingDetector#::CYRILLIC_IBM_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]CYRILLIC_IBM_INDEX.
2155 || encoding rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq().EncodingDetectorrust-analyzer cargo chardetng 0.1.17 EncodingDetector#::CYRILLIC_ISO_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]CYRILLIC_ISO_INDEX.
2156 }
2157 Tldrust-analyzer cargo chardetng 0.1.17 tld/Tld#::Westernrust-analyzer cargo chardetng 0.1.17 tld/Tld#Western# => encoding rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq().EncodingDetectorrust-analyzer cargo chardetng 0.1.17 EncodingDetector#::WESTERN_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]WESTERN_INDEX.,
2158 Tldrust-analyzer cargo chardetng 0.1.17 tld/Tld#::Greekrust-analyzer cargo chardetng 0.1.17 tld/Tld#Greek# => {
2159 encoding rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq().EncodingDetectorrust-analyzer cargo chardetng 0.1.17 EncodingDetector#::GREEK_WINDOWS_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]GREEK_WINDOWS_INDEX.
2160 || encoding rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq().EncodingDetectorrust-analyzer cargo chardetng 0.1.17 EncodingDetector#::GREEK_ISO_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]GREEK_ISO_INDEX.
2161 }
2162 Tldrust-analyzer cargo chardetng 0.1.17 tld/Tld#::TurkishAzerirust-analyzer cargo chardetng 0.1.17 tld/Tld#TurkishAzeri# => encoding rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq().EncodingDetectorrust-analyzer cargo chardetng 0.1.17 EncodingDetector#::TURKISH_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]TURKISH_INDEX.,
2163 Tldrust-analyzer cargo chardetng 0.1.17 tld/Tld#::Hebrewrust-analyzer cargo chardetng 0.1.17 tld/Tld#Hebrew# => encoding rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq().EncodingDetectorrust-analyzer cargo chardetng 0.1.17 EncodingDetector#::LOGICAL_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]LOGICAL_INDEX.,
2164 Tldrust-analyzer cargo chardetng 0.1.17 tld/Tld#::Arabicrust-analyzer cargo chardetng 0.1.17 tld/Tld#Arabic# => {
2165 encoding rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq().EncodingDetectorrust-analyzer cargo chardetng 0.1.17 EncodingDetector#::ARABIC_WINDOWS_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]ARABIC_WINDOWS_INDEX.
2166 || encoding rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq().EncodingDetectorrust-analyzer cargo chardetng 0.1.17 EncodingDetector#::ARABIC_ISO_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]ARABIC_ISO_INDEX.
2167 }
2168 Tldrust-analyzer cargo chardetng 0.1.17 tld/Tld#::Balticrust-analyzer cargo chardetng 0.1.17 tld/Tld#Baltic# => {
2169 encoding rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq().EncodingDetectorrust-analyzer cargo chardetng 0.1.17 EncodingDetector#::BALTIC_WINDOWS_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]BALTIC_WINDOWS_INDEX.
2170 || encoding rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq().EncodingDetectorrust-analyzer cargo chardetng 0.1.17 EncodingDetector#::BALTIC_ISO13_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]BALTIC_ISO13_INDEX.
2171 || encoding rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq().EncodingDetectorrust-analyzer cargo chardetng 0.1.17 EncodingDetector#::BALTIC_ISO4_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]BALTIC_ISO4_INDEX.
2172 }
2173 Tldrust-analyzer cargo chardetng 0.1.17 tld/Tld#::Vietnameserust-analyzer cargo chardetng 0.1.17 tld/Tld#Vietnamese# => encoding rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq().EncodingDetectorrust-analyzer cargo chardetng 0.1.17 EncodingDetector#::VIETNAMESE_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]VIETNAMESE_INDEX.,
2174 Tldrust-analyzer cargo chardetng 0.1.17 tld/Tld#::Thairust-analyzer cargo chardetng 0.1.17 tld/Tld#Thai# => encoding rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq().EncodingDetectorrust-analyzer cargo chardetng 0.1.17 EncodingDetector#::THAI_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]THAI_INDEX.,
2175 Tldrust-analyzer cargo chardetng 0.1.17 tld/Tld#::Simplifiedrust-analyzer cargo chardetng 0.1.17 tld/Tld#Simplified# => encoding rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq().EncodingDetectorrust-analyzer cargo chardetng 0.1.17 EncodingDetector#::GBK_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]GBK_INDEX.,
2176 Tldrust-analyzer cargo chardetng 0.1.17 tld/Tld#::Traditionalrust-analyzer cargo chardetng 0.1.17 tld/Tld#Traditional# => encoding rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq().EncodingDetectorrust-analyzer cargo chardetng 0.1.17 EncodingDetector#::BIG5_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]BIG5_INDEX.,
2177 Tldrust-analyzer cargo chardetng 0.1.17 tld/Tld#::Japaneserust-analyzer cargo chardetng 0.1.17 tld/Tld#Japanese# => {
2178 encoding rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq().EncodingDetectorrust-analyzer cargo chardetng 0.1.17 EncodingDetector#::SHIFT_JIS_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]SHIFT_JIS_INDEX.
2179 || encoding rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq().EncodingDetectorrust-analyzer cargo chardetng 0.1.17 EncodingDetector#::EUC_JP_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]EUC_JP_INDEX.
2180 }
2181 Tldrust-analyzer cargo chardetng 0.1.17 tld/Tld#::Koreanrust-analyzer cargo chardetng 0.1.17 tld/Tld#Korean# => encoding rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq().EncodingDetectorrust-analyzer cargo chardetng 0.1.17 EncodingDetector#::EUC_KR_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]EUC_KR_INDEX.,
2182 Tldrust-analyzer cargo chardetng 0.1.17 tld/Tld#::SimplifiedTraditionalrust-analyzer cargo chardetng 0.1.17 tld/Tld#SimplifiedTraditional# | Tldrust-analyzer cargo chardetng 0.1.17 tld/Tld#::TraditionalSimplifiedrust-analyzer cargo chardetng 0.1.17 tld/Tld#TraditionalSimplified# => {
2183 encoding rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq().EncodingDetectorrust-analyzer cargo chardetng 0.1.17 EncodingDetector#::GBK_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]GBK_INDEX. || encoding rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq().EncodingDetectorrust-analyzer cargo chardetng 0.1.17 EncodingDetector#::BIG5_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]BIG5_INDEX.
2184 }
2185 Tldrust-analyzer cargo chardetng 0.1.17 tld/Tld#::CentralIsorust-analyzer cargo chardetng 0.1.17 tld/Tld#CentralIso# => encoding rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq().EncodingDetectorrust-analyzer cargo chardetng 0.1.17 EncodingDetector#::CENTRAL_ISO_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]CENTRAL_ISO_INDEX.,
2186 Tldrust-analyzer cargo chardetng 0.1.17 tld/Tld#::IcelandicFaroeserust-analyzer cargo chardetng 0.1.17 tld/Tld#IcelandicFaroese# => encoding rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq().EncodingDetectorrust-analyzer cargo chardetng 0.1.17 EncodingDetector#::ICELANDIC_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]ICELANDIC_INDEX.,
2187 Tldrust-analyzer cargo chardetng 0.1.17 tld/Tld#::WesternCyrillicrust-analyzer cargo chardetng 0.1.17 tld/Tld#WesternCyrillic# => {
2188 encoding rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq().EncodingDetectorrust-analyzer cargo chardetng 0.1.17 EncodingDetector#::WESTERN_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]WESTERN_INDEX.
2189 || encoding rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq().EncodingDetectorrust-analyzer cargo chardetng 0.1.17 EncodingDetector#::CYRILLIC_WINDOWS_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]CYRILLIC_WINDOWS_INDEX.
2190 || encoding rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq().EncodingDetectorrust-analyzer cargo chardetng 0.1.17 EncodingDetector#::CYRILLIC_KOI_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]CYRILLIC_KOI_INDEX.
2191 || encoding rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq().EncodingDetectorrust-analyzer cargo chardetng 0.1.17 EncodingDetector#::CYRILLIC_IBM_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]CYRILLIC_IBM_INDEX.
2192 || encoding rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq().EncodingDetectorrust-analyzer cargo chardetng 0.1.17 EncodingDetector#::CYRILLIC_ISO_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]CYRILLIC_ISO_INDEX.
2193 }
2194 Tldrust-analyzer cargo chardetng 0.1.17 tld/Tld#::CentralCyrillicrust-analyzer cargo chardetng 0.1.17 tld/Tld#CentralCyrillic# => {
2195 encoding rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq().EncodingDetectorrust-analyzer cargo chardetng 0.1.17 EncodingDetector#::CENTRAL_WINDOWS_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]CENTRAL_WINDOWS_INDEX.
2196 || encoding rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq().EncodingDetectorrust-analyzer cargo chardetng 0.1.17 EncodingDetector#::CENTRAL_ISO_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]CENTRAL_ISO_INDEX.
2197 || encoding rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq().EncodingDetectorrust-analyzer cargo chardetng 0.1.17 EncodingDetector#::CYRILLIC_WINDOWS_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]CYRILLIC_WINDOWS_INDEX.
2198 || encoding rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq().EncodingDetectorrust-analyzer cargo chardetng 0.1.17 EncodingDetector#::CYRILLIC_KOI_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]CYRILLIC_KOI_INDEX.
2199 || encoding rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq().EncodingDetectorrust-analyzer cargo chardetng 0.1.17 EncodingDetector#::CYRILLIC_IBM_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]CYRILLIC_IBM_INDEX.
2200 || encoding rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq().EncodingDetectorrust-analyzer cargo chardetng 0.1.17 EncodingDetector#::CYRILLIC_ISO_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]CYRILLIC_ISO_INDEX.
2201 }
2202 Tldrust-analyzer cargo chardetng 0.1.17 tld/Tld#::WesternArabicrust-analyzer cargo chardetng 0.1.17 tld/Tld#WesternArabic# => {
2203 encoding rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq().EncodingDetectorrust-analyzer cargo chardetng 0.1.17 EncodingDetector#::WESTERN_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]WESTERN_INDEX.
2204 || encoding rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq().EncodingDetectorrust-analyzer cargo chardetng 0.1.17 EncodingDetector#::ARABIC_WINDOWS_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]ARABIC_WINDOWS_INDEX.
2205 || encoding rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq().EncodingDetectorrust-analyzer cargo chardetng 0.1.17 EncodingDetector#::ARABIC_ISO_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]ARABIC_ISO_INDEX.
2206 }
2207 Tldrust-analyzer cargo chardetng 0.1.17 tld/Tld#::Eurust-analyzer cargo chardetng 0.1.17 tld/Tld#Eu# => {
2208 encoding rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq().EncodingDetectorrust-analyzer cargo chardetng 0.1.17 EncodingDetector#::WESTERN_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]WESTERN_INDEX.
2209 || encoding rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq().EncodingDetectorrust-analyzer cargo chardetng 0.1.17 EncodingDetector#::ICELANDIC_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]ICELANDIC_INDEX.
2210 || encoding rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq().EncodingDetectorrust-analyzer cargo chardetng 0.1.17 EncodingDetector#::CENTRAL_WINDOWS_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]CENTRAL_WINDOWS_INDEX.
2211 || encoding rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq().EncodingDetectorrust-analyzer cargo chardetng 0.1.17 EncodingDetector#::CENTRAL_ISO_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]CENTRAL_ISO_INDEX.
2212 || encoding rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq().EncodingDetectorrust-analyzer cargo chardetng 0.1.17 EncodingDetector#::CYRILLIC_WINDOWS_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]CYRILLIC_WINDOWS_INDEX.
2213 || encoding rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq().EncodingDetectorrust-analyzer cargo chardetng 0.1.17 EncodingDetector#::CYRILLIC_KOI_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]CYRILLIC_KOI_INDEX.
2214 || encoding rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq().EncodingDetectorrust-analyzer cargo chardetng 0.1.17 EncodingDetector#::CYRILLIC_IBM_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]CYRILLIC_IBM_INDEX.
2215 || encoding rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq().EncodingDetectorrust-analyzer cargo chardetng 0.1.17 EncodingDetector#::CYRILLIC_ISO_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]CYRILLIC_ISO_INDEX.
2216 || encoding rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq().EncodingDetectorrust-analyzer cargo chardetng 0.1.17 EncodingDetector#::GREEK_WINDOWS_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]GREEK_WINDOWS_INDEX.
2217 || encoding rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq().EncodingDetectorrust-analyzer cargo chardetng 0.1.17 EncodingDetector#::GREEK_ISO_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]GREEK_ISO_INDEX.
2218 || encoding rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq().EncodingDetectorrust-analyzer cargo chardetng 0.1.17 EncodingDetector#::BALTIC_WINDOWS_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]BALTIC_WINDOWS_INDEX.
2219 || encoding rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq().EncodingDetectorrust-analyzer cargo chardetng 0.1.17 EncodingDetector#::BALTIC_ISO13_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]BALTIC_ISO13_INDEX.
2220 || encoding rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq().EncodingDetectorrust-analyzer cargo chardetng 0.1.17 EncodingDetector#::BALTIC_ISO4_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]BALTIC_ISO4_INDEX.
2221 }
2222 Tldrust-analyzer cargo chardetng 0.1.17 tld/Tld#::Genericrust-analyzer cargo chardetng 0.1.17 tld/Tld#Generic# => false,
2223 }
2224 }
2225
2226 fn score_adjustmentrust-analyzer cargo chardetng 0.1.17 score_adjustment().(score: i64, encoding: usize, tld: Tldrust-analyzer cargo chardetng 0.1.17 tld/Tld#) -> i64 {
2227 if score rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i64][`PartialOrd<Self>`]lt().<rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i64][`PartialOrd<Self>`]lt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i64][`PartialOrd<Self>`]lt().1 {
2228 return 0;
2229 }
2230 // This is the most ad hoc part of this library.
2231 let (divisor, constant) = match tld {
2232 Tldrust-analyzer cargo chardetng 0.1.17 tld/Tld#::Genericrust-analyzer cargo chardetng 0.1.17 tld/Tld#Generic# => {
2233 unreachablerust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/unreachable!!();
2234 }
2235 Tldrust-analyzer cargo chardetng 0.1.17 tld/Tld#::CentralWindowsrust-analyzer cargo chardetng 0.1.17 tld/Tld#CentralWindows# | Tldrust-analyzer cargo chardetng 0.1.17 tld/Tld#::CentralIsorust-analyzer cargo chardetng 0.1.17 tld/Tld#CentralIso# => {
2236 match encoding {
2237 EncodingDetectorrust-analyzer cargo chardetng 0.1.17 EncodingDetector#::WESTERN_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]WESTERN_INDEX.
2238 | EncodingDetectorrust-analyzer cargo chardetng 0.1.17 EncodingDetector#::ICELANDIC_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]ICELANDIC_INDEX.
2239 | EncodingDetectorrust-analyzer cargo chardetng 0.1.17 EncodingDetector#::BALTIC_WINDOWS_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]BALTIC_WINDOWS_INDEX.
2240 | EncodingDetectorrust-analyzer cargo chardetng 0.1.17 EncodingDetector#::BALTIC_ISO4_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]BALTIC_ISO4_INDEX.
2241 | EncodingDetectorrust-analyzer cargo chardetng 0.1.17 EncodingDetector#::BALTIC_ISO13_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]BALTIC_ISO13_INDEX.
2242 | EncodingDetectorrust-analyzer cargo chardetng 0.1.17 EncodingDetector#::VIETNAMESE_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]VIETNAMESE_INDEX.
2243 | EncodingDetectorrust-analyzer cargo chardetng 0.1.17 EncodingDetector#::TURKISH_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]TURKISH_INDEX. => {
2244 // XXX Tune this better instead of this kind of absolute.
2245 return score;
2246 }
2247 _ => (50, 60),
2248 }
2249 }
2250 Tldrust-analyzer cargo chardetng 0.1.17 tld/Tld#::Cyrillicrust-analyzer cargo chardetng 0.1.17 tld/Tld#Cyrillic# => {
2251 match encoding {
2252 EncodingDetectorrust-analyzer cargo chardetng 0.1.17 EncodingDetector#::BIG5_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]BIG5_INDEX.
2253 | EncodingDetectorrust-analyzer cargo chardetng 0.1.17 EncodingDetector#::GBK_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]GBK_INDEX.
2254 | EncodingDetectorrust-analyzer cargo chardetng 0.1.17 EncodingDetector#::EUC_JP_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]EUC_JP_INDEX.
2255 | EncodingDetectorrust-analyzer cargo chardetng 0.1.17 EncodingDetector#::CENTRAL_WINDOWS_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]CENTRAL_WINDOWS_INDEX.
2256 | EncodingDetectorrust-analyzer cargo chardetng 0.1.17 EncodingDetector#::CENTRAL_ISO_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]CENTRAL_ISO_INDEX.
2257 | EncodingDetectorrust-analyzer cargo chardetng 0.1.17 EncodingDetector#::GREEK_WINDOWS_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]GREEK_WINDOWS_INDEX.
2258 | EncodingDetectorrust-analyzer cargo chardetng 0.1.17 EncodingDetector#::GREEK_ISO_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]GREEK_ISO_INDEX.
2259 | EncodingDetectorrust-analyzer cargo chardetng 0.1.17 EncodingDetector#::VISUAL_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]VISUAL_INDEX.
2260 | EncodingDetectorrust-analyzer cargo chardetng 0.1.17 EncodingDetector#::LOGICAL_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]LOGICAL_INDEX.
2261 | EncodingDetectorrust-analyzer cargo chardetng 0.1.17 EncodingDetector#::BALTIC_WINDOWS_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]BALTIC_WINDOWS_INDEX.
2262 | EncodingDetectorrust-analyzer cargo chardetng 0.1.17 EncodingDetector#::BALTIC_ISO4_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]BALTIC_ISO4_INDEX.
2263 | EncodingDetectorrust-analyzer cargo chardetng 0.1.17 EncodingDetector#::BALTIC_ISO13_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]BALTIC_ISO13_INDEX.
2264 | EncodingDetectorrust-analyzer cargo chardetng 0.1.17 EncodingDetector#::TURKISH_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]TURKISH_INDEX. => {
2265 // XXX Tune this better instead of this kind of absolute.
2266 return score;
2267 }
2268 _ => (50, 60),
2269 }
2270 }
2271 Tldrust-analyzer cargo chardetng 0.1.17 tld/Tld#::Westernrust-analyzer cargo chardetng 0.1.17 tld/Tld#Western# | Tldrust-analyzer cargo chardetng 0.1.17 tld/Tld#::WesternCyrillicrust-analyzer cargo chardetng 0.1.17 tld/Tld#WesternCyrillic# | Tldrust-analyzer cargo chardetng 0.1.17 tld/Tld#::WesternArabicrust-analyzer cargo chardetng 0.1.17 tld/Tld#WesternArabic# => {
2272 match encoding {
2273 EncodingDetectorrust-analyzer cargo chardetng 0.1.17 EncodingDetector#::CENTRAL_WINDOWS_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]CENTRAL_WINDOWS_INDEX.
2274 | EncodingDetectorrust-analyzer cargo chardetng 0.1.17 EncodingDetector#::CENTRAL_ISO_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]CENTRAL_ISO_INDEX.
2275 | EncodingDetectorrust-analyzer cargo chardetng 0.1.17 EncodingDetector#::BALTIC_WINDOWS_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]BALTIC_WINDOWS_INDEX.
2276 | EncodingDetectorrust-analyzer cargo chardetng 0.1.17 EncodingDetector#::BALTIC_ISO4_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]BALTIC_ISO4_INDEX.
2277 | EncodingDetectorrust-analyzer cargo chardetng 0.1.17 EncodingDetector#::BALTIC_ISO13_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]BALTIC_ISO13_INDEX.
2278 | EncodingDetectorrust-analyzer cargo chardetng 0.1.17 EncodingDetector#::TURKISH_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]TURKISH_INDEX.
2279 | EncodingDetectorrust-analyzer cargo chardetng 0.1.17 EncodingDetector#::VIETNAMESE_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]VIETNAMESE_INDEX. => {
2280 // XXX Tune this better instead of this kind of absolute.
2281 return score;
2282 }
2283 _ => (50, 60),
2284 }
2285 }
2286 Tldrust-analyzer cargo chardetng 0.1.17 tld/Tld#::Greekrust-analyzer cargo chardetng 0.1.17 tld/Tld#Greek# => {
2287 match encoding {
2288 EncodingDetectorrust-analyzer cargo chardetng 0.1.17 EncodingDetector#::BIG5_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]BIG5_INDEX.
2289 | EncodingDetectorrust-analyzer cargo chardetng 0.1.17 EncodingDetector#::GBK_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]GBK_INDEX.
2290 | EncodingDetectorrust-analyzer cargo chardetng 0.1.17 EncodingDetector#::EUC_JP_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]EUC_JP_INDEX.
2291 | EncodingDetectorrust-analyzer cargo chardetng 0.1.17 EncodingDetector#::CENTRAL_WINDOWS_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]CENTRAL_WINDOWS_INDEX.
2292 | EncodingDetectorrust-analyzer cargo chardetng 0.1.17 EncodingDetector#::CENTRAL_ISO_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]CENTRAL_ISO_INDEX.
2293 | EncodingDetectorrust-analyzer cargo chardetng 0.1.17 EncodingDetector#::CYRILLIC_WINDOWS_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]CYRILLIC_WINDOWS_INDEX.
2294 | EncodingDetectorrust-analyzer cargo chardetng 0.1.17 EncodingDetector#::CYRILLIC_ISO_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]CYRILLIC_ISO_INDEX.
2295 | EncodingDetectorrust-analyzer cargo chardetng 0.1.17 EncodingDetector#::CYRILLIC_KOI_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]CYRILLIC_KOI_INDEX.
2296 | EncodingDetectorrust-analyzer cargo chardetng 0.1.17 EncodingDetector#::CYRILLIC_IBM_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]CYRILLIC_IBM_INDEX.
2297 | EncodingDetectorrust-analyzer cargo chardetng 0.1.17 EncodingDetector#::VISUAL_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]VISUAL_INDEX.
2298 | EncodingDetectorrust-analyzer cargo chardetng 0.1.17 EncodingDetector#::LOGICAL_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]LOGICAL_INDEX.
2299 | EncodingDetectorrust-analyzer cargo chardetng 0.1.17 EncodingDetector#::BALTIC_WINDOWS_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]BALTIC_WINDOWS_INDEX.
2300 | EncodingDetectorrust-analyzer cargo chardetng 0.1.17 EncodingDetector#::BALTIC_ISO4_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]BALTIC_ISO4_INDEX.
2301 | EncodingDetectorrust-analyzer cargo chardetng 0.1.17 EncodingDetector#::BALTIC_ISO13_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]BALTIC_ISO13_INDEX.
2302 | EncodingDetectorrust-analyzer cargo chardetng 0.1.17 EncodingDetector#::TURKISH_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]TURKISH_INDEX. => {
2303 // XXX Tune this better instead of this kind of absolute.
2304 return score;
2305 }
2306 _ => (50, 60),
2307 }
2308 }
2309 Tldrust-analyzer cargo chardetng 0.1.17 tld/Tld#::TurkishAzerirust-analyzer cargo chardetng 0.1.17 tld/Tld#TurkishAzeri# => {
2310 match encoding {
2311 EncodingDetectorrust-analyzer cargo chardetng 0.1.17 EncodingDetector#::CENTRAL_WINDOWS_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]CENTRAL_WINDOWS_INDEX.
2312 | EncodingDetectorrust-analyzer cargo chardetng 0.1.17 EncodingDetector#::CENTRAL_ISO_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]CENTRAL_ISO_INDEX.
2313 | EncodingDetectorrust-analyzer cargo chardetng 0.1.17 EncodingDetector#::BALTIC_WINDOWS_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]BALTIC_WINDOWS_INDEX.
2314 | EncodingDetectorrust-analyzer cargo chardetng 0.1.17 EncodingDetector#::BALTIC_ISO4_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]BALTIC_ISO4_INDEX.
2315 | EncodingDetectorrust-analyzer cargo chardetng 0.1.17 EncodingDetector#::BALTIC_ISO13_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]BALTIC_ISO13_INDEX.
2316 | EncodingDetectorrust-analyzer cargo chardetng 0.1.17 EncodingDetector#::VIETNAMESE_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]VIETNAMESE_INDEX.
2317 | EncodingDetectorrust-analyzer cargo chardetng 0.1.17 EncodingDetector#::ICELANDIC_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]ICELANDIC_INDEX. => {
2318 // XXX Tune this better instead of this kind of absolute.
2319 return score;
2320 }
2321 _ => (50, 60),
2322 }
2323 }
2324 Tldrust-analyzer cargo chardetng 0.1.17 tld/Tld#::Hebrewrust-analyzer cargo chardetng 0.1.17 tld/Tld#Hebrew# => {
2325 match encoding {
2326 EncodingDetectorrust-analyzer cargo chardetng 0.1.17 EncodingDetector#::CENTRAL_WINDOWS_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]CENTRAL_WINDOWS_INDEX.
2327 | EncodingDetectorrust-analyzer cargo chardetng 0.1.17 EncodingDetector#::CENTRAL_ISO_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]CENTRAL_ISO_INDEX.
2328 | EncodingDetectorrust-analyzer cargo chardetng 0.1.17 EncodingDetector#::CYRILLIC_WINDOWS_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]CYRILLIC_WINDOWS_INDEX.
2329 | EncodingDetectorrust-analyzer cargo chardetng 0.1.17 EncodingDetector#::CYRILLIC_ISO_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]CYRILLIC_ISO_INDEX.
2330 | EncodingDetectorrust-analyzer cargo chardetng 0.1.17 EncodingDetector#::CYRILLIC_KOI_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]CYRILLIC_KOI_INDEX.
2331 | EncodingDetectorrust-analyzer cargo chardetng 0.1.17 EncodingDetector#::CYRILLIC_IBM_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]CYRILLIC_IBM_INDEX.
2332 | EncodingDetectorrust-analyzer cargo chardetng 0.1.17 EncodingDetector#::GREEK_WINDOWS_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]GREEK_WINDOWS_INDEX.
2333 | EncodingDetectorrust-analyzer cargo chardetng 0.1.17 EncodingDetector#::GREEK_ISO_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]GREEK_ISO_INDEX.
2334 | EncodingDetectorrust-analyzer cargo chardetng 0.1.17 EncodingDetector#::BALTIC_WINDOWS_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]BALTIC_WINDOWS_INDEX.
2335 | EncodingDetectorrust-analyzer cargo chardetng 0.1.17 EncodingDetector#::BALTIC_ISO4_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]BALTIC_ISO4_INDEX.
2336 | EncodingDetectorrust-analyzer cargo chardetng 0.1.17 EncodingDetector#::BALTIC_ISO13_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]BALTIC_ISO13_INDEX.
2337 | EncodingDetectorrust-analyzer cargo chardetng 0.1.17 EncodingDetector#::VIETNAMESE_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]VIETNAMESE_INDEX.
2338 | EncodingDetectorrust-analyzer cargo chardetng 0.1.17 EncodingDetector#::TURKISH_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]TURKISH_INDEX. => {
2339 // XXX Tune this better instead of this kind of absolute.
2340 return score;
2341 }
2342 _ => (50, 60),
2343 }
2344 }
2345 Tldrust-analyzer cargo chardetng 0.1.17 tld/Tld#::Arabicrust-analyzer cargo chardetng 0.1.17 tld/Tld#Arabic# => {
2346 match encoding {
2347 EncodingDetectorrust-analyzer cargo chardetng 0.1.17 EncodingDetector#::BIG5_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]BIG5_INDEX.
2348 | EncodingDetectorrust-analyzer cargo chardetng 0.1.17 EncodingDetector#::GBK_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]GBK_INDEX.
2349 | EncodingDetectorrust-analyzer cargo chardetng 0.1.17 EncodingDetector#::EUC_JP_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]EUC_JP_INDEX.
2350 | EncodingDetectorrust-analyzer cargo chardetng 0.1.17 EncodingDetector#::EUC_KR_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]EUC_KR_INDEX.
2351 | EncodingDetectorrust-analyzer cargo chardetng 0.1.17 EncodingDetector#::CENTRAL_WINDOWS_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]CENTRAL_WINDOWS_INDEX.
2352 | EncodingDetectorrust-analyzer cargo chardetng 0.1.17 EncodingDetector#::CENTRAL_ISO_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]CENTRAL_ISO_INDEX.
2353 | EncodingDetectorrust-analyzer cargo chardetng 0.1.17 EncodingDetector#::CYRILLIC_WINDOWS_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]CYRILLIC_WINDOWS_INDEX.
2354 | EncodingDetectorrust-analyzer cargo chardetng 0.1.17 EncodingDetector#::CYRILLIC_ISO_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]CYRILLIC_ISO_INDEX.
2355 | EncodingDetectorrust-analyzer cargo chardetng 0.1.17 EncodingDetector#::CYRILLIC_KOI_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]CYRILLIC_KOI_INDEX.
2356 | EncodingDetectorrust-analyzer cargo chardetng 0.1.17 EncodingDetector#::CYRILLIC_IBM_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]CYRILLIC_IBM_INDEX.
2357 | EncodingDetectorrust-analyzer cargo chardetng 0.1.17 EncodingDetector#::GREEK_WINDOWS_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]GREEK_WINDOWS_INDEX.
2358 | EncodingDetectorrust-analyzer cargo chardetng 0.1.17 EncodingDetector#::GREEK_ISO_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]GREEK_ISO_INDEX.
2359 | EncodingDetectorrust-analyzer cargo chardetng 0.1.17 EncodingDetector#::VISUAL_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]VISUAL_INDEX.
2360 | EncodingDetectorrust-analyzer cargo chardetng 0.1.17 EncodingDetector#::LOGICAL_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]LOGICAL_INDEX.
2361 | EncodingDetectorrust-analyzer cargo chardetng 0.1.17 EncodingDetector#::BALTIC_WINDOWS_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]BALTIC_WINDOWS_INDEX.
2362 | EncodingDetectorrust-analyzer cargo chardetng 0.1.17 EncodingDetector#::BALTIC_ISO4_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]BALTIC_ISO4_INDEX.
2363 | EncodingDetectorrust-analyzer cargo chardetng 0.1.17 EncodingDetector#::BALTIC_ISO13_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]BALTIC_ISO13_INDEX.
2364 | EncodingDetectorrust-analyzer cargo chardetng 0.1.17 EncodingDetector#::VIETNAMESE_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]VIETNAMESE_INDEX.
2365 | EncodingDetectorrust-analyzer cargo chardetng 0.1.17 EncodingDetector#::TURKISH_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]TURKISH_INDEX. => {
2366 // XXX Tune this better instead of this kind of absolute.
2367 return score;
2368 }
2369 _ => (50, 60),
2370 }
2371 }
2372 Tldrust-analyzer cargo chardetng 0.1.17 tld/Tld#::Balticrust-analyzer cargo chardetng 0.1.17 tld/Tld#Baltic# => {
2373 match encoding {
2374 EncodingDetectorrust-analyzer cargo chardetng 0.1.17 EncodingDetector#::CENTRAL_WINDOWS_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]CENTRAL_WINDOWS_INDEX.
2375 | EncodingDetectorrust-analyzer cargo chardetng 0.1.17 EncodingDetector#::CENTRAL_ISO_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]CENTRAL_ISO_INDEX.
2376 | EncodingDetectorrust-analyzer cargo chardetng 0.1.17 EncodingDetector#::ICELANDIC_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]ICELANDIC_INDEX.
2377 | EncodingDetectorrust-analyzer cargo chardetng 0.1.17 EncodingDetector#::TURKISH_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]TURKISH_INDEX.
2378 | EncodingDetectorrust-analyzer cargo chardetng 0.1.17 EncodingDetector#::VIETNAMESE_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]VIETNAMESE_INDEX. => {
2379 // XXX Tune this better instead of this kind of absolute.
2380 return score;
2381 }
2382 _ => (50, 60),
2383 }
2384 }
2385 Tldrust-analyzer cargo chardetng 0.1.17 tld/Tld#::Vietnameserust-analyzer cargo chardetng 0.1.17 tld/Tld#Vietnamese# => {
2386 match encoding {
2387 EncodingDetectorrust-analyzer cargo chardetng 0.1.17 EncodingDetector#::CENTRAL_WINDOWS_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]CENTRAL_WINDOWS_INDEX.
2388 | EncodingDetectorrust-analyzer cargo chardetng 0.1.17 EncodingDetector#::CENTRAL_ISO_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]CENTRAL_ISO_INDEX.
2389 | EncodingDetectorrust-analyzer cargo chardetng 0.1.17 EncodingDetector#::BALTIC_WINDOWS_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]BALTIC_WINDOWS_INDEX.
2390 | EncodingDetectorrust-analyzer cargo chardetng 0.1.17 EncodingDetector#::BALTIC_ISO4_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]BALTIC_ISO4_INDEX.
2391 | EncodingDetectorrust-analyzer cargo chardetng 0.1.17 EncodingDetector#::BALTIC_ISO13_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]BALTIC_ISO13_INDEX.
2392 | EncodingDetectorrust-analyzer cargo chardetng 0.1.17 EncodingDetector#::TURKISH_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]TURKISH_INDEX.
2393 | EncodingDetectorrust-analyzer cargo chardetng 0.1.17 EncodingDetector#::ICELANDIC_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]ICELANDIC_INDEX. => {
2394 // XXX Tune this better instead of this kind of absolute.
2395 return score;
2396 }
2397 _ => (50, 60),
2398 }
2399 }
2400 Tldrust-analyzer cargo chardetng 0.1.17 tld/Tld#::Thairust-analyzer cargo chardetng 0.1.17 tld/Tld#Thai# => {
2401 match encoding {
2402 EncodingDetectorrust-analyzer cargo chardetng 0.1.17 EncodingDetector#::BIG5_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]BIG5_INDEX.
2403 | EncodingDetectorrust-analyzer cargo chardetng 0.1.17 EncodingDetector#::GBK_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]GBK_INDEX.
2404 | EncodingDetectorrust-analyzer cargo chardetng 0.1.17 EncodingDetector#::EUC_JP_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]EUC_JP_INDEX.
2405 | EncodingDetectorrust-analyzer cargo chardetng 0.1.17 EncodingDetector#::EUC_KR_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]EUC_KR_INDEX.
2406 | EncodingDetectorrust-analyzer cargo chardetng 0.1.17 EncodingDetector#::SHIFT_JIS_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]SHIFT_JIS_INDEX.
2407 | EncodingDetectorrust-analyzer cargo chardetng 0.1.17 EncodingDetector#::CENTRAL_WINDOWS_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]CENTRAL_WINDOWS_INDEX.
2408 | EncodingDetectorrust-analyzer cargo chardetng 0.1.17 EncodingDetector#::CENTRAL_ISO_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]CENTRAL_ISO_INDEX.
2409 | EncodingDetectorrust-analyzer cargo chardetng 0.1.17 EncodingDetector#::CYRILLIC_WINDOWS_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]CYRILLIC_WINDOWS_INDEX.
2410 | EncodingDetectorrust-analyzer cargo chardetng 0.1.17 EncodingDetector#::CYRILLIC_ISO_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]CYRILLIC_ISO_INDEX.
2411 | EncodingDetectorrust-analyzer cargo chardetng 0.1.17 EncodingDetector#::CYRILLIC_KOI_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]CYRILLIC_KOI_INDEX.
2412 | EncodingDetectorrust-analyzer cargo chardetng 0.1.17 EncodingDetector#::CYRILLIC_IBM_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]CYRILLIC_IBM_INDEX.
2413 | EncodingDetectorrust-analyzer cargo chardetng 0.1.17 EncodingDetector#::GREEK_WINDOWS_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]GREEK_WINDOWS_INDEX.
2414 | EncodingDetectorrust-analyzer cargo chardetng 0.1.17 EncodingDetector#::GREEK_ISO_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]GREEK_ISO_INDEX.
2415 | EncodingDetectorrust-analyzer cargo chardetng 0.1.17 EncodingDetector#::ARABIC_WINDOWS_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]ARABIC_WINDOWS_INDEX.
2416 | EncodingDetectorrust-analyzer cargo chardetng 0.1.17 EncodingDetector#::ARABIC_ISO_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]ARABIC_ISO_INDEX.
2417 | EncodingDetectorrust-analyzer cargo chardetng 0.1.17 EncodingDetector#::VISUAL_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]VISUAL_INDEX.
2418 | EncodingDetectorrust-analyzer cargo chardetng 0.1.17 EncodingDetector#::LOGICAL_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]LOGICAL_INDEX.
2419 | EncodingDetectorrust-analyzer cargo chardetng 0.1.17 EncodingDetector#::BALTIC_WINDOWS_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]BALTIC_WINDOWS_INDEX.
2420 | EncodingDetectorrust-analyzer cargo chardetng 0.1.17 EncodingDetector#::BALTIC_ISO4_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]BALTIC_ISO4_INDEX.
2421 | EncodingDetectorrust-analyzer cargo chardetng 0.1.17 EncodingDetector#::BALTIC_ISO13_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]BALTIC_ISO13_INDEX.
2422 | EncodingDetectorrust-analyzer cargo chardetng 0.1.17 EncodingDetector#::TURKISH_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]TURKISH_INDEX. => {
2423 // XXX Tune this better instead of this kind of absolute.
2424 return score;
2425 }
2426 _ => (50, 60),
2427 }
2428 }
2429 Tldrust-analyzer cargo chardetng 0.1.17 tld/Tld#::Simplifiedrust-analyzer cargo chardetng 0.1.17 tld/Tld#Simplified#
2430 | Tldrust-analyzer cargo chardetng 0.1.17 tld/Tld#::Traditionalrust-analyzer cargo chardetng 0.1.17 tld/Tld#Traditional#
2431 | Tldrust-analyzer cargo chardetng 0.1.17 tld/Tld#::TraditionalSimplifiedrust-analyzer cargo chardetng 0.1.17 tld/Tld#TraditionalSimplified#
2432 | Tldrust-analyzer cargo chardetng 0.1.17 tld/Tld#::SimplifiedTraditionalrust-analyzer cargo chardetng 0.1.17 tld/Tld#SimplifiedTraditional#
2433 | Tldrust-analyzer cargo chardetng 0.1.17 tld/Tld#::Japaneserust-analyzer cargo chardetng 0.1.17 tld/Tld#Japanese#
2434 | Tldrust-analyzer cargo chardetng 0.1.17 tld/Tld#::Koreanrust-analyzer cargo chardetng 0.1.17 tld/Tld#Korean# => {
2435 // If TLD default is valid, everything else scores zero
2436 return score;
2437 }
2438 Tldrust-analyzer cargo chardetng 0.1.17 tld/Tld#::IcelandicFaroeserust-analyzer cargo chardetng 0.1.17 tld/Tld#IcelandicFaroese# => {
2439 match encoding {
2440 EncodingDetectorrust-analyzer cargo chardetng 0.1.17 EncodingDetector#::CENTRAL_WINDOWS_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]CENTRAL_WINDOWS_INDEX.
2441 | EncodingDetectorrust-analyzer cargo chardetng 0.1.17 EncodingDetector#::CENTRAL_ISO_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]CENTRAL_ISO_INDEX.
2442 | EncodingDetectorrust-analyzer cargo chardetng 0.1.17 EncodingDetector#::BALTIC_WINDOWS_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]BALTIC_WINDOWS_INDEX.
2443 | EncodingDetectorrust-analyzer cargo chardetng 0.1.17 EncodingDetector#::BALTIC_ISO4_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]BALTIC_ISO4_INDEX.
2444 | EncodingDetectorrust-analyzer cargo chardetng 0.1.17 EncodingDetector#::BALTIC_ISO13_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]BALTIC_ISO13_INDEX.
2445 | EncodingDetectorrust-analyzer cargo chardetng 0.1.17 EncodingDetector#::TURKISH_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]TURKISH_INDEX.
2446 | EncodingDetectorrust-analyzer cargo chardetng 0.1.17 EncodingDetector#::VIETNAMESE_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]VIETNAMESE_INDEX. => {
2447 // XXX Tune this better instead of this kind of absolute.
2448 return score;
2449 }
2450 _ => (50, 60),
2451 }
2452 }
2453 Tldrust-analyzer cargo chardetng 0.1.17 tld/Tld#::CentralCyrillicrust-analyzer cargo chardetng 0.1.17 tld/Tld#CentralCyrillic# => {
2454 match encoding {
2455 EncodingDetectorrust-analyzer cargo chardetng 0.1.17 EncodingDetector#::BIG5_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]BIG5_INDEX.
2456 | EncodingDetectorrust-analyzer cargo chardetng 0.1.17 EncodingDetector#::GBK_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]GBK_INDEX.
2457 | EncodingDetectorrust-analyzer cargo chardetng 0.1.17 EncodingDetector#::EUC_JP_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]EUC_JP_INDEX.
2458 | EncodingDetectorrust-analyzer cargo chardetng 0.1.17 EncodingDetector#::GREEK_WINDOWS_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]GREEK_WINDOWS_INDEX.
2459 | EncodingDetectorrust-analyzer cargo chardetng 0.1.17 EncodingDetector#::GREEK_ISO_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]GREEK_ISO_INDEX.
2460 | EncodingDetectorrust-analyzer cargo chardetng 0.1.17 EncodingDetector#::VISUAL_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]VISUAL_INDEX.
2461 | EncodingDetectorrust-analyzer cargo chardetng 0.1.17 EncodingDetector#::LOGICAL_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]LOGICAL_INDEX.
2462 | EncodingDetectorrust-analyzer cargo chardetng 0.1.17 EncodingDetector#::BALTIC_WINDOWS_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]BALTIC_WINDOWS_INDEX.
2463 | EncodingDetectorrust-analyzer cargo chardetng 0.1.17 EncodingDetector#::BALTIC_ISO4_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]BALTIC_ISO4_INDEX.
2464 | EncodingDetectorrust-analyzer cargo chardetng 0.1.17 EncodingDetector#::BALTIC_ISO13_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]BALTIC_ISO13_INDEX.
2465 | EncodingDetectorrust-analyzer cargo chardetng 0.1.17 EncodingDetector#::TURKISH_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]TURKISH_INDEX. => {
2466 // XXX Tune this better instead of this kind of absolute.
2467 return score;
2468 }
2469 _ => (50, 60),
2470 }
2471 }
2472 Tldrust-analyzer cargo chardetng 0.1.17 tld/Tld#::Eurust-analyzer cargo chardetng 0.1.17 tld/Tld#Eu# => {
2473 match encoding {
2474 EncodingDetectorrust-analyzer cargo chardetng 0.1.17 EncodingDetector#::BIG5_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]BIG5_INDEX.
2475 | EncodingDetectorrust-analyzer cargo chardetng 0.1.17 EncodingDetector#::GBK_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]GBK_INDEX.
2476 | EncodingDetectorrust-analyzer cargo chardetng 0.1.17 EncodingDetector#::EUC_JP_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]EUC_JP_INDEX.
2477 | EncodingDetectorrust-analyzer cargo chardetng 0.1.17 EncodingDetector#::TURKISH_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]TURKISH_INDEX.
2478 | EncodingDetectorrust-analyzer cargo chardetng 0.1.17 EncodingDetector#::VIETNAMESE_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]VIETNAMESE_INDEX. => {
2479 // XXX Tune this better instead of this kind of absolute.
2480 return score;
2481 }
2482 _ => (50, 60),
2483 }
2484 }
2485 };
2486 (score rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`Div<Self>`]div()./rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`Div<Self>`]div(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`Div<Self>`]div().divisor) rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`Add<Self>`]add().constant
2487 }
2488
2489 cfg_ifrust-analyzer cargo cfg-if 1.0.4 crate/::cfg_ifrust-analyzer cargo cfg-if 1.0.4 cfg_if!! {
2490 if #[cfg(feature = "multithreading")] {
2491 #[repr(align(64))] // Align to cache lines to avoid false sharing in the Rayon case
2492 struct Candidaterust-analyzer cargo chardetng 0.1.17 Candidate# {
2493 innerrust-analyzer cargo chardetng 0.1.17 Candidate#inner.: InnerCandidaterust-analyzer cargo chardetng 0.1.17 InnerCandidate#,
2494 scorerust-analyzer cargo chardetng 0.1.17 Candidate#score.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<i64>,
2495 }
2496 } else {
2497 struct Candidate {
2498 inner: InnerCandidate,
2499 score: Option<i64>,
2500 }
2501 }
2502 }
2503
2504 impl Candidaterust-analyzer cargo chardetng 0.1.17 Candidate# {
2505 fn feedrust-analyzer cargo chardetng 0.1.17 impl#[Candidate]feed().(&mut self, buffer: &[u8], last: bool) {
2506 if let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(old_score) = self.scorerust-analyzer cargo chardetng 0.1.17 Candidate#score. {
2507 if let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(new_score) = self.innerrust-analyzer cargo chardetng 0.1.17 Candidate#inner..feedrust-analyzer cargo chardetng 0.1.17 impl#[InnerCandidate]feed().(buffer, last) {
2508 self.scorerust-analyzer cargo chardetng 0.1.17 Candidate#score. = Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(old_score rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`Add<Self>`]add().new_score);
2509 } else {
2510 self.scorerust-analyzer cargo chardetng 0.1.17 Candidate#score. = Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#;
2511 }
2512 }
2513 }
2514
2515 #[cfg(feature = "multithreading")]
2516 fn qualifiedrust-analyzer cargo chardetng 0.1.17 impl#[Candidate]qualified().(&self) -> bool {
2517 !rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[bool][Not]not().self.scorerust-analyzer cargo chardetng 0.1.17 Candidate#score..is_nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]is_none().()
2518 }
2519
2520 fn new_latinrust-analyzer cargo chardetng 0.1.17 impl#[Candidate]new_latin().(data: &'static SingleByteDatarust-analyzer cargo chardetng 0.1.17 data/SingleByteData#) -> Selfrust-analyzer cargo chardetng 0.1.17 impl#[Candidate] {
2521 Candidaterust-analyzer cargo chardetng 0.1.17 Candidate# {
2522 innerrust-analyzer cargo chardetng 0.1.17 Candidate#inner.: InnerCandidaterust-analyzer cargo chardetng 0.1.17 InnerCandidate#::Latinrust-analyzer cargo chardetng 0.1.17 InnerCandidate#Latin#(LatinCandidaterust-analyzer cargo chardetng 0.1.17 LatinCandidate#::newrust-analyzer cargo chardetng 0.1.17 impl#[LatinCandidate]new().(data)),
2523 scorerust-analyzer cargo chardetng 0.1.17 Candidate#score.: Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(0),
2524 }
2525 }
2526
2527 fn new_non_latin_casedrust-analyzer cargo chardetng 0.1.17 impl#[Candidate]new_non_latin_cased().(data: &'static SingleByteDatarust-analyzer cargo chardetng 0.1.17 data/SingleByteData#) -> Selfrust-analyzer cargo chardetng 0.1.17 impl#[Candidate] {
2528 Candidaterust-analyzer cargo chardetng 0.1.17 Candidate# {
2529 innerrust-analyzer cargo chardetng 0.1.17 Candidate#inner.: InnerCandidaterust-analyzer cargo chardetng 0.1.17 InnerCandidate#::NonLatinCasedrust-analyzer cargo chardetng 0.1.17 InnerCandidate#NonLatinCased#(NonLatinCasedCandidaterust-analyzer cargo chardetng 0.1.17 NonLatinCasedCandidate#::newrust-analyzer cargo chardetng 0.1.17 impl#[NonLatinCasedCandidate]new().(data)),
2530 scorerust-analyzer cargo chardetng 0.1.17 Candidate#score.: Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(0),
2531 }
2532 }
2533
2534 fn new_caselessrust-analyzer cargo chardetng 0.1.17 impl#[Candidate]new_caseless().(data: &'static SingleByteDatarust-analyzer cargo chardetng 0.1.17 data/SingleByteData#) -> Selfrust-analyzer cargo chardetng 0.1.17 impl#[Candidate] {
2535 Candidaterust-analyzer cargo chardetng 0.1.17 Candidate# {
2536 innerrust-analyzer cargo chardetng 0.1.17 Candidate#inner.: InnerCandidaterust-analyzer cargo chardetng 0.1.17 InnerCandidate#::Caselessrust-analyzer cargo chardetng 0.1.17 InnerCandidate#Caseless#(CaselessCandidaterust-analyzer cargo chardetng 0.1.17 CaselessCandidate#::newrust-analyzer cargo chardetng 0.1.17 impl#[CaselessCandidate]new().(data)),
2537 scorerust-analyzer cargo chardetng 0.1.17 Candidate#score.: Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(0),
2538 }
2539 }
2540
2541 fn new_arabic_frenchrust-analyzer cargo chardetng 0.1.17 impl#[Candidate]new_arabic_french().(data: &'static SingleByteDatarust-analyzer cargo chardetng 0.1.17 data/SingleByteData#) -> Selfrust-analyzer cargo chardetng 0.1.17 impl#[Candidate] {
2542 Candidaterust-analyzer cargo chardetng 0.1.17 Candidate# {
2543 innerrust-analyzer cargo chardetng 0.1.17 Candidate#inner.: InnerCandidaterust-analyzer cargo chardetng 0.1.17 InnerCandidate#::ArabicFrenchrust-analyzer cargo chardetng 0.1.17 InnerCandidate#ArabicFrench#(ArabicFrenchCandidaterust-analyzer cargo chardetng 0.1.17 ArabicFrenchCandidate#::newrust-analyzer cargo chardetng 0.1.17 impl#[ArabicFrenchCandidate]new().(data)),
2544 scorerust-analyzer cargo chardetng 0.1.17 Candidate#score.: Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(0),
2545 }
2546 }
2547
2548 fn new_logicalrust-analyzer cargo chardetng 0.1.17 impl#[Candidate]new_logical().(data: &'static SingleByteDatarust-analyzer cargo chardetng 0.1.17 data/SingleByteData#) -> Selfrust-analyzer cargo chardetng 0.1.17 impl#[Candidate] {
2549 Candidaterust-analyzer cargo chardetng 0.1.17 Candidate# {
2550 innerrust-analyzer cargo chardetng 0.1.17 Candidate#inner.: InnerCandidaterust-analyzer cargo chardetng 0.1.17 InnerCandidate#::Logicalrust-analyzer cargo chardetng 0.1.17 InnerCandidate#Logical#(LogicalCandidaterust-analyzer cargo chardetng 0.1.17 LogicalCandidate#::newrust-analyzer cargo chardetng 0.1.17 impl#[LogicalCandidate]new().(data)),
2551 scorerust-analyzer cargo chardetng 0.1.17 Candidate#score.: Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(0),
2552 }
2553 }
2554
2555 fn new_visualrust-analyzer cargo chardetng 0.1.17 impl#[Candidate]new_visual().(data: &'static SingleByteDatarust-analyzer cargo chardetng 0.1.17 data/SingleByteData#) -> Selfrust-analyzer cargo chardetng 0.1.17 impl#[Candidate] {
2556 Candidaterust-analyzer cargo chardetng 0.1.17 Candidate# {
2557 innerrust-analyzer cargo chardetng 0.1.17 Candidate#inner.: InnerCandidaterust-analyzer cargo chardetng 0.1.17 InnerCandidate#::Visualrust-analyzer cargo chardetng 0.1.17 InnerCandidate#Visual#(VisualCandidaterust-analyzer cargo chardetng 0.1.17 VisualCandidate#::newrust-analyzer cargo chardetng 0.1.17 impl#[VisualCandidate]new().(data)),
2558 scorerust-analyzer cargo chardetng 0.1.17 Candidate#score.: Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(0),
2559 }
2560 }
2561
2562 fn new_utf_8rust-analyzer cargo chardetng 0.1.17 impl#[Candidate]new_utf_8().() -> Selfrust-analyzer cargo chardetng 0.1.17 impl#[Candidate] {
2563 Candidaterust-analyzer cargo chardetng 0.1.17 Candidate# {
2564 innerrust-analyzer cargo chardetng 0.1.17 Candidate#inner.: InnerCandidaterust-analyzer cargo chardetng 0.1.17 InnerCandidate#::Utf8rust-analyzer cargo chardetng 0.1.17 InnerCandidate#Utf8#(Utf8Candidaterust-analyzer cargo chardetng 0.1.17 Utf8Candidate# {
2565 decoderrust-analyzer cargo chardetng 0.1.17 Utf8Candidate#decoder.: UTF_8rust-analyzer cargo encoding_rs 0.8.35 UTF_8..new_decoder_without_bom_handlingrust-analyzer cargo encoding_rs 0.8.35 impl#[Encoding]new_decoder_without_bom_handling().(),
2566 }),
2567 scorerust-analyzer cargo chardetng 0.1.17 Candidate#score.: Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(0),
2568 }
2569 }
2570
2571 fn new_iso_2022_jprust-analyzer cargo chardetng 0.1.17 impl#[Candidate]new_iso_2022_jp().() -> Selfrust-analyzer cargo chardetng 0.1.17 impl#[Candidate] {
2572 Candidaterust-analyzer cargo chardetng 0.1.17 Candidate# {
2573 innerrust-analyzer cargo chardetng 0.1.17 Candidate#inner.: InnerCandidaterust-analyzer cargo chardetng 0.1.17 InnerCandidate#::Iso2022rust-analyzer cargo chardetng 0.1.17 InnerCandidate#Iso2022#(Iso2022Candidaterust-analyzer cargo chardetng 0.1.17 Iso2022Candidate# {
2574 decoderrust-analyzer cargo chardetng 0.1.17 Iso2022Candidate#decoder.: ISO_2022_JPrust-analyzer cargo encoding_rs 0.8.35 ISO_2022_JP..new_decoder_without_bom_handlingrust-analyzer cargo encoding_rs 0.8.35 impl#[Encoding]new_decoder_without_bom_handling().(),
2575 }),
2576 scorerust-analyzer cargo chardetng 0.1.17 Candidate#score.: Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(0),
2577 }
2578 }
2579
2580 fn new_shift_jisrust-analyzer cargo chardetng 0.1.17 impl#[Candidate]new_shift_jis().() -> Selfrust-analyzer cargo chardetng 0.1.17 impl#[Candidate] {
2581 Candidaterust-analyzer cargo chardetng 0.1.17 Candidate# {
2582 innerrust-analyzer cargo chardetng 0.1.17 Candidate#inner.: InnerCandidaterust-analyzer cargo chardetng 0.1.17 InnerCandidate#::Shiftrust-analyzer cargo chardetng 0.1.17 InnerCandidate#Shift#(ShiftJisCandidaterust-analyzer cargo chardetng 0.1.17 ShiftJisCandidate# {
2583 decoderrust-analyzer cargo chardetng 0.1.17 ShiftJisCandidate#decoder.: SHIFT_JISrust-analyzer cargo encoding_rs 0.8.35 SHIFT_JIS..new_decoder_without_bom_handlingrust-analyzer cargo encoding_rs 0.8.35 impl#[Encoding]new_decoder_without_bom_handling().(),
2584 half_width_katakana_seenrust-analyzer cargo chardetng 0.1.17 ShiftJisCandidate#half_width_katakana_seen.: false,
2585 half_width_katakana_staterust-analyzer cargo chardetng 0.1.17 ShiftJisCandidate#half_width_katakana_state.: HalfWidthKatakanarust-analyzer cargo chardetng 0.1.17 HalfWidthKatakana#::DakutenForbiddenrust-analyzer cargo chardetng 0.1.17 HalfWidthKatakana#DakutenForbidden#,
2586 prevrust-analyzer cargo chardetng 0.1.17 ShiftJisCandidate#prev.: LatinCjrust-analyzer cargo chardetng 0.1.17 LatinCj#::Otherrust-analyzer cargo chardetng 0.1.17 LatinCj#Other#,
2587 prev_byterust-analyzer cargo chardetng 0.1.17 ShiftJisCandidate#prev_byte.: 0,
2588 pending_scorerust-analyzer cargo chardetng 0.1.17 ShiftJisCandidate#pending_score.: Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#,
2589 }),
2590 scorerust-analyzer cargo chardetng 0.1.17 Candidate#score.: Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(0),
2591 }
2592 }
2593
2594 fn new_euc_jprust-analyzer cargo chardetng 0.1.17 impl#[Candidate]new_euc_jp().() -> Selfrust-analyzer cargo chardetng 0.1.17 impl#[Candidate] {
2595 Candidaterust-analyzer cargo chardetng 0.1.17 Candidate# {
2596 innerrust-analyzer cargo chardetng 0.1.17 Candidate#inner.: InnerCandidaterust-analyzer cargo chardetng 0.1.17 InnerCandidate#::EucJprust-analyzer cargo chardetng 0.1.17 InnerCandidate#EucJp#(EucJpCandidaterust-analyzer cargo chardetng 0.1.17 EucJpCandidate# {
2597 decoderrust-analyzer cargo chardetng 0.1.17 EucJpCandidate#decoder.: EUC_JPrust-analyzer cargo encoding_rs 0.8.35 EUC_JP..new_decoder_without_bom_handlingrust-analyzer cargo encoding_rs 0.8.35 impl#[Encoding]new_decoder_without_bom_handling().(),
2598 non_ascii_seenrust-analyzer cargo chardetng 0.1.17 EucJpCandidate#non_ascii_seen.: false,
2599 half_width_katakana_staterust-analyzer cargo chardetng 0.1.17 EucJpCandidate#half_width_katakana_state.: HalfWidthKatakanarust-analyzer cargo chardetng 0.1.17 HalfWidthKatakana#::DakutenForbiddenrust-analyzer cargo chardetng 0.1.17 HalfWidthKatakana#DakutenForbidden#,
2600 prevrust-analyzer cargo chardetng 0.1.17 EucJpCandidate#prev.: LatinCjrust-analyzer cargo chardetng 0.1.17 LatinCj#::Otherrust-analyzer cargo chardetng 0.1.17 LatinCj#Other#,
2601 prev_byterust-analyzer cargo chardetng 0.1.17 EucJpCandidate#prev_byte.: 0,
2602 prev_prev_byterust-analyzer cargo chardetng 0.1.17 EucJpCandidate#prev_prev_byte.: 0,
2603 }),
2604 scorerust-analyzer cargo chardetng 0.1.17 Candidate#score.: Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(0),
2605 }
2606 }
2607
2608 fn new_euc_krrust-analyzer cargo chardetng 0.1.17 impl#[Candidate]new_euc_kr().() -> Selfrust-analyzer cargo chardetng 0.1.17 impl#[Candidate] {
2609 Candidaterust-analyzer cargo chardetng 0.1.17 Candidate# {
2610 innerrust-analyzer cargo chardetng 0.1.17 Candidate#inner.: InnerCandidaterust-analyzer cargo chardetng 0.1.17 InnerCandidate#::EucKrrust-analyzer cargo chardetng 0.1.17 InnerCandidate#EucKr#(EucKrCandidaterust-analyzer cargo chardetng 0.1.17 EucKrCandidate# {
2611 decoderrust-analyzer cargo chardetng 0.1.17 EucKrCandidate#decoder.: EUC_KRrust-analyzer cargo encoding_rs 0.8.35 EUC_KR..new_decoder_without_bom_handlingrust-analyzer cargo encoding_rs 0.8.35 impl#[Encoding]new_decoder_without_bom_handling().(),
2612 prev_byterust-analyzer cargo chardetng 0.1.17 EucKrCandidate#prev_byte.: 0,
2613 prev_was_euc_rangerust-analyzer cargo chardetng 0.1.17 EucKrCandidate#prev_was_euc_range.: false,
2614 prevrust-analyzer cargo chardetng 0.1.17 EucKrCandidate#prev.: LatinKoreanrust-analyzer cargo chardetng 0.1.17 LatinKorean#::Otherrust-analyzer cargo chardetng 0.1.17 LatinKorean#Other#,
2615 current_word_lenrust-analyzer cargo chardetng 0.1.17 EucKrCandidate#current_word_len.: 0,
2616 pending_scorerust-analyzer cargo chardetng 0.1.17 EucKrCandidate#pending_score.: Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#,
2617 }),
2618 scorerust-analyzer cargo chardetng 0.1.17 Candidate#score.: Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(0),
2619 }
2620 }
2621
2622 fn new_big5rust-analyzer cargo chardetng 0.1.17 impl#[Candidate]new_big5().() -> Selfrust-analyzer cargo chardetng 0.1.17 impl#[Candidate] {
2623 Candidaterust-analyzer cargo chardetng 0.1.17 Candidate# {
2624 innerrust-analyzer cargo chardetng 0.1.17 Candidate#inner.: InnerCandidaterust-analyzer cargo chardetng 0.1.17 InnerCandidate#::Big5rust-analyzer cargo chardetng 0.1.17 InnerCandidate#Big5#(Big5Candidaterust-analyzer cargo chardetng 0.1.17 Big5Candidate# {
2625 decoderrust-analyzer cargo chardetng 0.1.17 Big5Candidate#decoder.: BIG5rust-analyzer cargo encoding_rs 0.8.35 BIG5..new_decoder_without_bom_handlingrust-analyzer cargo encoding_rs 0.8.35 impl#[Encoding]new_decoder_without_bom_handling().(),
2626 prevrust-analyzer cargo chardetng 0.1.17 Big5Candidate#prev.: LatinCjrust-analyzer cargo chardetng 0.1.17 LatinCj#::Otherrust-analyzer cargo chardetng 0.1.17 LatinCj#Other#,
2627 prev_byterust-analyzer cargo chardetng 0.1.17 Big5Candidate#prev_byte.: 0,
2628 pending_scorerust-analyzer cargo chardetng 0.1.17 Big5Candidate#pending_score.: Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#,
2629 }),
2630 scorerust-analyzer cargo chardetng 0.1.17 Candidate#score.: Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(0),
2631 }
2632 }
2633
2634 fn new_gbkrust-analyzer cargo chardetng 0.1.17 impl#[Candidate]new_gbk().() -> Selfrust-analyzer cargo chardetng 0.1.17 impl#[Candidate] {
2635 Candidaterust-analyzer cargo chardetng 0.1.17 Candidate# {
2636 innerrust-analyzer cargo chardetng 0.1.17 Candidate#inner.: InnerCandidaterust-analyzer cargo chardetng 0.1.17 InnerCandidate#::Gbkrust-analyzer cargo chardetng 0.1.17 InnerCandidate#Gbk#(GbkCandidaterust-analyzer cargo chardetng 0.1.17 GbkCandidate# {
2637 decoderrust-analyzer cargo chardetng 0.1.17 GbkCandidate#decoder.: GBKrust-analyzer cargo encoding_rs 0.8.35 GBK..new_decoder_without_bom_handlingrust-analyzer cargo encoding_rs 0.8.35 impl#[Encoding]new_decoder_without_bom_handling().(),
2638 prevrust-analyzer cargo chardetng 0.1.17 GbkCandidate#prev.: LatinCjrust-analyzer cargo chardetng 0.1.17 LatinCj#::Otherrust-analyzer cargo chardetng 0.1.17 LatinCj#Other#,
2639 prev_byterust-analyzer cargo chardetng 0.1.17 GbkCandidate#prev_byte.: 0,
2640 pending_scorerust-analyzer cargo chardetng 0.1.17 GbkCandidate#pending_score.: Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#,
2641 }),
2642 scorerust-analyzer cargo chardetng 0.1.17 Candidate#score.: Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(0),
2643 }
2644 }
2645
2646 fn scorerust-analyzer cargo chardetng 0.1.17 impl#[Candidate]score().(&self, encoding: usize, tld: Tldrust-analyzer cargo chardetng 0.1.17 tld/Tld#, expectation_is_valid: bool) -> Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<i64> {
2647 match &self.innerrust-analyzer cargo chardetng 0.1.17 Candidate#inner. {
2648 InnerCandidaterust-analyzer cargo chardetng 0.1.17 InnerCandidate#::NonLatinCasedrust-analyzer cargo chardetng 0.1.17 InnerCandidate#NonLatinCased#(c) => {
2649 if c.longest_wordrust-analyzer cargo chardetng 0.1.17 NonLatinCasedCandidate#longest_word. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u64][`PartialOrd<Self>`]lt().<rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u64][`PartialOrd<Self>`]lt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u64][`PartialOrd<Self>`]lt().2 {
2650 return Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#;
2651 }
2652 }
2653 InnerCandidaterust-analyzer cargo chardetng 0.1.17 InnerCandidate#::Caselessrust-analyzer cargo chardetng 0.1.17 InnerCandidate#Caseless#(c) => {
2654 if c.longest_wordrust-analyzer cargo chardetng 0.1.17 CaselessCandidate#longest_word. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u64][`PartialOrd<Self>`]lt().<rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u64][`PartialOrd<Self>`]lt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u64][`PartialOrd<Self>`]lt().2 && !rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[bool][Not]not().encoding_is_native_to_tldrust-analyzer cargo chardetng 0.1.17 encoding_is_native_to_tld().(tld, encoding) {
2655 return Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#;
2656 }
2657 }
2658 InnerCandidaterust-analyzer cargo chardetng 0.1.17 InnerCandidate#::ArabicFrenchrust-analyzer cargo chardetng 0.1.17 InnerCandidate#ArabicFrench#(c) => {
2659 if c.longest_wordrust-analyzer cargo chardetng 0.1.17 ArabicFrenchCandidate#longest_word. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u64][`PartialOrd<Self>`]lt().<rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u64][`PartialOrd<Self>`]lt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u64][`PartialOrd<Self>`]lt().2 && !rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[bool][Not]not().encoding_is_native_to_tldrust-analyzer cargo chardetng 0.1.17 encoding_is_native_to_tld().(tld, encoding) {
2660 return Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#;
2661 }
2662 }
2663 InnerCandidaterust-analyzer cargo chardetng 0.1.17 InnerCandidate#::Logicalrust-analyzer cargo chardetng 0.1.17 InnerCandidate#Logical#(c) => {
2664 if c.longest_wordrust-analyzer cargo chardetng 0.1.17 LogicalCandidate#longest_word. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u64][`PartialOrd<Self>`]lt().<rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u64][`PartialOrd<Self>`]lt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u64][`PartialOrd<Self>`]lt().2 && !rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[bool][Not]not().encoding_is_native_to_tldrust-analyzer cargo chardetng 0.1.17 encoding_is_native_to_tld().(tld, encoding) {
2665 return Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#;
2666 }
2667 }
2668 InnerCandidaterust-analyzer cargo chardetng 0.1.17 InnerCandidate#::Visualrust-analyzer cargo chardetng 0.1.17 InnerCandidate#Visual#(c) => {
2669 if c.longest_wordrust-analyzer cargo chardetng 0.1.17 VisualCandidate#longest_word. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u64][`PartialOrd<Self>`]lt().<rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u64][`PartialOrd<Self>`]lt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u64][`PartialOrd<Self>`]lt().2 && !rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[bool][Not]not().encoding_is_native_to_tldrust-analyzer cargo chardetng 0.1.17 encoding_is_native_to_tld().(tld, encoding) {
2670 return Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#;
2671 }
2672 }
2673 _ => {}
2674 }
2675 if tld rust-analyzer cargo chardetng 0.1.17 tld/impl#[Tld][`PartialEq<Self>`]eq().==rust-analyzer cargo chardetng 0.1.17 tld/impl#[Tld][`PartialEq<Self>`]eq(). rust-analyzer cargo chardetng 0.1.17 tld/impl#[Tld][`PartialEq<Self>`]eq().Tldrust-analyzer cargo chardetng 0.1.17 tld/Tld#::Genericrust-analyzer cargo chardetng 0.1.17 tld/Tld#Generic# {
2676 return self.scorerust-analyzer cargo chardetng 0.1.17 Candidate#score.;
2677 }
2678 if let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(score) = self.scorerust-analyzer cargo chardetng 0.1.17 Candidate#score. {
2679 if encoding rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq().encoding_for_tldrust-analyzer cargo chardetng 0.1.17 encoding_for_tld().(tld) {
2680 return Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(score rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`Add<Self>`]add().1);
2681 }
2682 if encoding_is_native_to_tldrust-analyzer cargo chardetng 0.1.17 encoding_is_native_to_tld().(tld, encoding) {
2683 return Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(score);
2684 }
2685 if expectation_is_valid {
2686 return Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(score rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`Sub<Self>`]sub().score_adjustmentrust-analyzer cargo chardetng 0.1.17 score_adjustment().(score, encoding, tld));
2687 }
2688 // If expectation is no longer valid, fall back to
2689 // generic behavior.
2690 // XXX Flipped Chinese and Central
2691 return Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(score);
2692 }
2693 Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#
2694 }
2695
2696 fn plausible_punctuationrust-analyzer cargo chardetng 0.1.17 impl#[Candidate]plausible_punctuation().(&self) -> u64 {
2697 match &self.innerrust-analyzer cargo chardetng 0.1.17 Candidate#inner. {
2698 InnerCandidaterust-analyzer cargo chardetng 0.1.17 InnerCandidate#::Logicalrust-analyzer cargo chardetng 0.1.17 InnerCandidate#Logical#(c) => {
2699 return c.plausible_punctuationrust-analyzer cargo chardetng 0.1.17 LogicalCandidate#plausible_punctuation.;
2700 }
2701 InnerCandidaterust-analyzer cargo chardetng 0.1.17 InnerCandidate#::Visualrust-analyzer cargo chardetng 0.1.17 InnerCandidate#Visual#(c) => {
2702 return c.plausible_punctuationrust-analyzer cargo chardetng 0.1.17 VisualCandidate#plausible_punctuation.;
2703 }
2704 _ => {
2705 unreachablerust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/unreachable!!();
2706 }
2707 }
2708 }
2709
2710 fn encodingrust-analyzer cargo chardetng 0.1.17 impl#[Candidate]encoding().(&self) -> &'static Encodingrust-analyzer cargo encoding_rs 0.8.35 Encoding# {
2711 match &self.innerrust-analyzer cargo chardetng 0.1.17 Candidate#inner. {
2712 InnerCandidaterust-analyzer cargo chardetng 0.1.17 InnerCandidate#::Latinrust-analyzer cargo chardetng 0.1.17 InnerCandidate#Latin#(c) => {
2713 return c.datarust-analyzer cargo chardetng 0.1.17 LatinCandidate#data..encodingrust-analyzer cargo chardetng 0.1.17 data/SingleByteData#encoding.;
2714 }
2715 InnerCandidaterust-analyzer cargo chardetng 0.1.17 InnerCandidate#::NonLatinCasedrust-analyzer cargo chardetng 0.1.17 InnerCandidate#NonLatinCased#(c) => {
2716 return c.datarust-analyzer cargo chardetng 0.1.17 NonLatinCasedCandidate#data..encodingrust-analyzer cargo chardetng 0.1.17 data/SingleByteData#encoding.;
2717 }
2718 InnerCandidaterust-analyzer cargo chardetng 0.1.17 InnerCandidate#::Caselessrust-analyzer cargo chardetng 0.1.17 InnerCandidate#Caseless#(c) => {
2719 return c.datarust-analyzer cargo chardetng 0.1.17 CaselessCandidate#data..encodingrust-analyzer cargo chardetng 0.1.17 data/SingleByteData#encoding.;
2720 }
2721 InnerCandidaterust-analyzer cargo chardetng 0.1.17 InnerCandidate#::ArabicFrenchrust-analyzer cargo chardetng 0.1.17 InnerCandidate#ArabicFrench#(c) => {
2722 return c.datarust-analyzer cargo chardetng 0.1.17 ArabicFrenchCandidate#data..encodingrust-analyzer cargo chardetng 0.1.17 data/SingleByteData#encoding.;
2723 }
2724 InnerCandidaterust-analyzer cargo chardetng 0.1.17 InnerCandidate#::Logicalrust-analyzer cargo chardetng 0.1.17 InnerCandidate#Logical#(c) => {
2725 return c.datarust-analyzer cargo chardetng 0.1.17 LogicalCandidate#data..encodingrust-analyzer cargo chardetng 0.1.17 data/SingleByteData#encoding.;
2726 }
2727 InnerCandidaterust-analyzer cargo chardetng 0.1.17 InnerCandidate#::Visualrust-analyzer cargo chardetng 0.1.17 InnerCandidate#Visual#(c) => {
2728 return c.datarust-analyzer cargo chardetng 0.1.17 VisualCandidate#data..encodingrust-analyzer cargo chardetng 0.1.17 data/SingleByteData#encoding.;
2729 }
2730 InnerCandidaterust-analyzer cargo chardetng 0.1.17 InnerCandidate#::Shiftrust-analyzer cargo chardetng 0.1.17 InnerCandidate#Shift#(_) => {
2731 return SHIFT_JISrust-analyzer cargo encoding_rs 0.8.35 SHIFT_JIS.;
2732 }
2733 InnerCandidaterust-analyzer cargo chardetng 0.1.17 InnerCandidate#::EucJprust-analyzer cargo chardetng 0.1.17 InnerCandidate#EucJp#(_) => {
2734 return EUC_JPrust-analyzer cargo encoding_rs 0.8.35 EUC_JP.;
2735 }
2736 InnerCandidaterust-analyzer cargo chardetng 0.1.17 InnerCandidate#::Big5rust-analyzer cargo chardetng 0.1.17 InnerCandidate#Big5#(_) => {
2737 return BIG5rust-analyzer cargo encoding_rs 0.8.35 BIG5.;
2738 }
2739 InnerCandidaterust-analyzer cargo chardetng 0.1.17 InnerCandidate#::EucKrrust-analyzer cargo chardetng 0.1.17 InnerCandidate#EucKr#(_) => {
2740 return EUC_KRrust-analyzer cargo encoding_rs 0.8.35 EUC_KR.;
2741 }
2742 InnerCandidaterust-analyzer cargo chardetng 0.1.17 InnerCandidate#::Gbkrust-analyzer cargo chardetng 0.1.17 InnerCandidate#Gbk#(_) => {
2743 return GBKrust-analyzer cargo encoding_rs 0.8.35 GBK.;
2744 }
2745 InnerCandidaterust-analyzer cargo chardetng 0.1.17 InnerCandidate#::Utf8rust-analyzer cargo chardetng 0.1.17 InnerCandidate#Utf8#(_) => {
2746 return UTF_8rust-analyzer cargo encoding_rs 0.8.35 UTF_8.;
2747 }
2748 InnerCandidaterust-analyzer cargo chardetng 0.1.17 InnerCandidate#::Iso2022rust-analyzer cargo chardetng 0.1.17 InnerCandidate#Iso2022#(_) => {
2749 return ISO_2022_JPrust-analyzer cargo encoding_rs 0.8.35 ISO_2022_JP.;
2750 }
2751 }
2752 }
2753 }
2754
2755 // LLVM doesn't autovectorize this properly for SSE2, so let's help manually.
2756 cfg_ifrust-analyzer cargo cfg-if 1.0.4 crate/::cfg_ifrust-analyzer cargo cfg-if 1.0.4 cfg_if!! {
2757 if #[cfg(target_feature = "sse2")] {
2758 fn count_non_asciirust-analyzer cargo chardetng 0.1.17 count_non_ascii().(buffer: &[u8]) -> u64 {
2759 let mut count = 0;
2760 let (prefix, simd, suffix) = unsafe { buffer.align_torust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]align_to().::<__m128irust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/__m128i#>() };
2761 for &b in prefix {
2762 if b >= 0x80 {
2763 count += 1;
2764 }
2765 }
2766 for &s in simd {
2767 count += unsafe {_mm_movemask_epi8rust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/sse2/_mm_movemask_epi8().(s)}.count_onesrust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/impl#[i32]count_ones().() as u64;
2768 }
2769 for &b in suffix {
2770 if b >= 0x80 {
2771 count += 1;
2772 }
2773 }
2774 count
2775 }
2776 } else {
2777 fn count_non_ascii(buffer: &[u8]) -> u64 {
2778 let mut count = 0;
2779 for &b in buffer {
2780 if b >= 0x80 {
2781 count += 1;
2782 }
2783 }
2784 count
2785 }
2786 }
2787 }
2788
2789 #[deriverust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/derive:(Clonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core clone/Clone:, Copyrust-analyzer cargo core https://github.com/rust-lang/rust/library/core marker/Copy:)]
2790 enum BeforeNonAsciirust-analyzer cargo chardetng 0.1.17 BeforeNonAscii# {
2791 Nonerust-analyzer cargo chardetng 0.1.17 BeforeNonAscii#None#,
2792 Onerust-analyzer cargo chardetng 0.1.17 BeforeNonAscii#One#([u8; 1]),
2793 Tworust-analyzer cargo chardetng 0.1.17 BeforeNonAscii#Two#([u8; 2]),
2794 }
2795
2796 impl BeforeNonAsciirust-analyzer cargo chardetng 0.1.17 BeforeNonAscii# {
2797 fn as_slicerust-analyzer cargo chardetng 0.1.17 impl#[BeforeNonAscii]as_slice().(&self) -> &[u8] {
2798 match self {
2799 BeforeNonAsciirust-analyzer cargo chardetng 0.1.17 BeforeNonAscii#::Nonerust-analyzer cargo chardetng 0.1.17 BeforeNonAscii#None# => b"",
2800 BeforeNonAsciirust-analyzer cargo chardetng 0.1.17 BeforeNonAscii#::Onerust-analyzer cargo chardetng 0.1.17 BeforeNonAscii#One#(arr) => &arr[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index()...rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/RangeFull#]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().,
2801 BeforeNonAsciirust-analyzer cargo chardetng 0.1.17 BeforeNonAscii#::Tworust-analyzer cargo chardetng 0.1.17 BeforeNonAscii#Two#(arr) => &arr[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index()...rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/RangeFull#]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().,
2802 }
2803 }
2804
2805 fn pushrust-analyzer cargo chardetng 0.1.17 impl#[BeforeNonAscii]push().(&mut self, buffer: &[u8]) {
2806 let len = buffer.lenrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]len().();
2807 if len rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialOrd<Self>`]ge().>=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialOrd<Self>`]ge(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialOrd<Self>`]ge().2 {
2808 let arr = [buffer[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().len rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Sub<Self>`]sub().2]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index()., buffer[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().len rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Sub<Self>`]sub().1]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().];
2809 *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/impl#[`&mut T`][Deref]deref().self = BeforeNonAsciirust-analyzer cargo chardetng 0.1.17 BeforeNonAscii#::Tworust-analyzer cargo chardetng 0.1.17 BeforeNonAscii#Two#(arr);
2810 } else if len rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq().1 {
2811 match self {
2812 BeforeNonAsciirust-analyzer cargo chardetng 0.1.17 BeforeNonAscii#::Nonerust-analyzer cargo chardetng 0.1.17 BeforeNonAscii#None# => {
2813 let arr = [buffer[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().0]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().];
2814 *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/impl#[`&mut T`][Deref]deref().self = BeforeNonAsciirust-analyzer cargo chardetng 0.1.17 BeforeNonAscii#::Onerust-analyzer cargo chardetng 0.1.17 BeforeNonAscii#One#(arr);
2815 }
2816 BeforeNonAsciirust-analyzer cargo chardetng 0.1.17 BeforeNonAscii#::Onerust-analyzer cargo chardetng 0.1.17 BeforeNonAscii#One#(first) => {
2817 let arr = [first[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().0]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index()., buffer[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().0]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().];
2818 *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/impl#[`&mut T`][Deref]deref().self = BeforeNonAsciirust-analyzer cargo chardetng 0.1.17 BeforeNonAscii#::Tworust-analyzer cargo chardetng 0.1.17 BeforeNonAscii#Two#(arr);
2819 }
2820 BeforeNonAsciirust-analyzer cargo chardetng 0.1.17 BeforeNonAscii#::Tworust-analyzer cargo chardetng 0.1.17 BeforeNonAscii#Two#(first) => {
2821 let arr = [first[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().1]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index()., buffer[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().0]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().];
2822 *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/impl#[`&mut T`][Deref]deref().self = BeforeNonAsciirust-analyzer cargo chardetng 0.1.17 BeforeNonAscii#::Tworust-analyzer cargo chardetng 0.1.17 BeforeNonAscii#Two#(arr);
2823 }
2824 }
2825 }
2826 }
2827 }
2828
2829 /// A Web browser-oriented detector for guessing what character
2830 /// encoding a stream of bytes is encoded in.
2831 ///
2832 /// The bytes are fed to the detector incrementally using the `feed`
2833 /// method. The current guess of the detector can be queried using
2834 /// the `guess` method. The guessing parameters are arguments to the
2835 /// `guess` method rather than arguments to the constructor in order
2836 /// to enable the application to check if the arguments affect the
2837 /// guessing outcome. (The specific use case is to disable UI for
2838 /// re-running the detector with UTF-8 allowed and the top-level
2839 /// domain name ignored if those arguments don't change the guess.)
2840 pub struct EncodingDetectorrust-analyzer cargo chardetng 0.1.17 EncodingDetector# {
2841 candidatesrust-analyzer cargo chardetng 0.1.17 EncodingDetector#candidates.: [Candidaterust-analyzer cargo chardetng 0.1.17 Candidate#; 27],
2842 non_ascii_seenrust-analyzer cargo chardetng 0.1.17 EncodingDetector#non_ascii_seen.: u64,
2843 // We need to feed up to two bytes of context before non-ASCII
2844 // thanks to Spanish n.º.
2845 last_before_non_asciirust-analyzer cargo chardetng 0.1.17 EncodingDetector#last_before_non_ascii.: BeforeNonAsciirust-analyzer cargo chardetng 0.1.17 BeforeNonAscii#,
2846 esc_seenrust-analyzer cargo chardetng 0.1.17 EncodingDetector#esc_seen.: bool,
2847 closedrust-analyzer cargo chardetng 0.1.17 EncodingDetector#closed.: bool,
2848 }
2849
2850 impl EncodingDetectorrust-analyzer cargo chardetng 0.1.17 EncodingDetector# {
2851 cfg_ifrust-analyzer cargo cfg-if 1.0.4 crate/::cfg_ifrust-analyzer cargo cfg-if 1.0.4 cfg_if!! {
2852 if #[cfg(feature = "multithreading")] {
2853 fn feed_implrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]feed_impl().(&mut self, buffer: &[u8], last: bool) {
2854 if buffer.lenrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]len().() <rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialOrd<Self>`]lt(). 10 {
2855 self.candidatesrust-analyzer cargo chardetng 0.1.17 EncodingDetector#candidates..iter_mutrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]iter_mut().().for_eachrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/iter/impl#[`IterMut<'a, T>`][Iterator]for_each().(|candidate| candidate.feedrust-analyzer cargo chardetng 0.1.17 impl#[Candidate]feed().(buffer, last));
2856 self.non_ascii_seenrust-analyzer cargo chardetng 0.1.17 EncodingDetector#non_ascii_seen. += count_non_asciirust-analyzer cargo chardetng 0.1.17 count_non_ascii().(buffer);
2857 return;
2858 }
2859 // Collect only qualified candidates to avoid Rayon
2860 // performing thread synchronization only to bail
2861 // out immediately when trying a disqualified
2862 // candidate.
•2863 let mut qualified = ArrayVecrust-analyzer cargo arrayvec 0.7.8 arrayvec/ArrayVec#::<_,27>::newrust-analyzer cargo arrayvec 0.7.8 arrayvec/impl#[`ArrayVec<T, CAP>`]new().();
2864 for candidate in self.candidatesrust-analyzer cargo chardetng 0.1.17 EncodingDetector#candidates..iter_mutrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]iter_mut().() {
2865 if candidate.qualifiedrust-analyzer cargo chardetng 0.1.17 impl#[Candidate]qualified().() {
2866 qualified.pushrust-analyzer cargo arrayvec 0.7.8 arrayvec/impl#[`ArrayVec<T, CAP>`]push().(candidate);
2867 }
2868 }
2869 let (_, non_ascii) = rayonrust-analyzer cargo rayon 1.12.0 crate/::joinrust-analyzer cargo rayon-core 1.13.0 join/join().(|| qualified.par_iter_mutrust-analyzer cargo rayon 1.12.0 iter/impl#[I][`IntoParallelRefMutIterator<'data>`]par_iter_mut().().for_eachrust-analyzer cargo rayon 1.12.0 iter/ParallelIterator#for_each().(|candidate| candidate.feedrust-analyzer cargo chardetng 0.1.17 impl#[Candidate]feed().(buffer, last)),
2870 || count_non_asciirust-analyzer cargo chardetng 0.1.17 count_non_ascii().(buffer));
2871 self.non_ascii_seenrust-analyzer cargo chardetng 0.1.17 EncodingDetector#non_ascii_seen. += non_ascii;
2872 }
2873 } else {
2874 fn feed_impl(&mut self, buffer: &[u8], last: bool) {
2875 self.candidates.iter_mut().for_each(|candidate| candidate.feed(buffer, last));
2876 self.non_ascii_seen += count_non_ascii(buffer);
2877 }
2878 }
2879 }
2880
2881 /// Inform the detector of a chunk of input.
2882 ///
2883 /// The byte stream is represented as a sequence of calls to this
2884 /// method such that the concatenation of the arguments to this
2885 /// method form the byte stream. It does not matter how the application
2886 /// chooses to chunk the stream. It is OK to call this method with
2887 /// a zero-length byte slice.
2888 ///
2889 /// The end of the stream is indicated by calling this method with
2890 /// `last` set to `true`. In that case, the end of the stream is
2891 /// considered to occur after the last byte of the `buffer` (which
2892 /// may be zero-length) passed in the same call. Once this method
2893 /// has been called with `last` set to `true` this method must not
2894 /// be called again.
2895 ///
2896 /// If you want to perform detection on just the prefix of a longer
2897 /// stream, do not pass `last=true` after the prefix if the stream
2898 /// actually still continues.
2899 ///
2900 /// Returns `true` if after processing `buffer` the stream has
2901 /// contained at least one non-ASCII byte and `false` if only
2902 /// ASCII has been seen so far.
2903 ///
2904 /// # Panics
2905 ///
2906 /// If this method has previously been called with `last` set to `true`.
2907 pub fn feedrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]feed().(&mut self, buffer: &[u8], last: bool) -> bool {
2908 assertrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/assert!!(
2909 !rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[bool][Not]not().self.closedrust-analyzer cargo chardetng 0.1.17 EncodingDetector#closed.,
2910 "Must not feed again after feeding with last equaling true."
2911 );
2912 if last {
2913 self.closedrust-analyzer cargo chardetng 0.1.17 EncodingDetector#closed. = true;
2914 }
2915 let start = if self.non_ascii_seenrust-analyzer cargo chardetng 0.1.17 EncodingDetector#non_ascii_seen. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u64][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u64][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u64][`PartialEq<Self>`]eq().0 && !rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[bool][Not]not().self.esc_seenrust-analyzer cargo chardetng 0.1.17 EncodingDetector#esc_seen. {
2916 let up_to = Encodingrust-analyzer cargo encoding_rs 0.8.35 Encoding#::ascii_valid_up_torust-analyzer cargo encoding_rs 0.8.35 impl#[Encoding]ascii_valid_up_to().(buffer);
2917 let start = if let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(escape) = memchrrust-analyzer cargo memchr 2.8.3 crate/::memchrrust-analyzer cargo memchr 2.8.3 memchr/memchr().(0x1B, &buffer[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index()...rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/RangeTo#up_to]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().) {
2918 self.esc_seenrust-analyzer cargo chardetng 0.1.17 EncodingDetector#esc_seen. = true;
2919 escape
2920 } else {
2921 up_to
2922 };
2923 if start rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq().buffer.lenrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]len().() {
2924 self.last_before_non_asciirust-analyzer cargo chardetng 0.1.17 EncodingDetector#last_before_non_ascii..pushrust-analyzer cargo chardetng 0.1.17 impl#[BeforeNonAscii]push().(buffer);
2925 return self.non_ascii_seenrust-analyzer cargo chardetng 0.1.17 EncodingDetector#non_ascii_seen. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u64][`PartialEq<Self>`]ne().!=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u64][`PartialEq<Self>`]ne(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u64][`PartialEq<Self>`]ne().0;
2926 }
2927 if start rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq().0 || start rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq().1 {
2928 let last_before = self.last_before_non_asciirust-analyzer cargo chardetng 0.1.17 EncodingDetector#last_before_non_ascii.;
2929 self.last_before_non_asciirust-analyzer cargo chardetng 0.1.17 EncodingDetector#last_before_non_ascii. = BeforeNonAsciirust-analyzer cargo chardetng 0.1.17 BeforeNonAscii#::Nonerust-analyzer cargo chardetng 0.1.17 BeforeNonAscii#None#;
2930 self.feed_implrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]feed_impl().(last_before.as_slicerust-analyzer cargo chardetng 0.1.17 impl#[BeforeNonAscii]as_slice().(), false);
2931 0
2932 } else {
2933 start rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Sub<Self>`]sub().2
2934 }
2935 } else {
2936 0
2937 };
2938 self.feed_implrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]feed_impl().(&buffer[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().start..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/RangeFrom#]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index()., last);
2939 self.non_ascii_seenrust-analyzer cargo chardetng 0.1.17 EncodingDetector#non_ascii_seen. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u64][`PartialEq<Self>`]ne().!=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u64][`PartialEq<Self>`]ne(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u64][`PartialEq<Self>`]ne().0
2940 }
2941
2942 /// Guess the encoding given the bytes pushed to the detector so far
2943 /// (via `feed()`), the top-level domain name from which the bytes were
2944 /// loaded, and an indication of whether to consider UTF-8 as a permissible
2945 /// guess.
2946 ///
2947 /// The `tld` argument takes the rightmost DNS label of the hostname of the
2948 /// host the stream was loaded from in lower-case ASCII form. That is, if
2949 /// the label is an internationalized top-level domain name, it must be
2950 /// provided in its Punycode form. If the TLD that the stream was loaded
2951 /// from is unavalable, `None` may be passed instead, which is equivalent
2952 /// to passing `Some(b"com")`.
2953 ///
2954 /// If the `allow_utf8` argument is set to `false`, the return value of
2955 /// this method won't be `encoding_rs::UTF_8`. When performing detection
2956 /// on `text/html` on non-`file:` URLs, Web browsers must pass `false`,
2957 /// unless the user has taken a specific contextual action to request an
2958 /// override. This way, Web developers cannot start depending on UTF-8
2959 /// detection. Such reliance would make the Web Platform more brittle.
2960 ///
2961 /// Returns the guessed encoding.
2962 ///
2963 /// # Panics
2964 ///
2965 /// If `tld` contains non-ASCII, period, or upper-case letters. (The panic
2966 /// condition is intentionally limited to signs of failing to extract the
2967 /// label correctly, failing to provide it in its Punycode form, and failure
2968 /// to lower-case it. Full DNS label validation is intentionally not performed
2969 /// to avoid panics when the reality doesn't match the specs.)
2970 pub fn guessrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]guess().(&self, tld: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<&[u8]>, allow_utf8: bool) -> &'static Encodingrust-analyzer cargo encoding_rs 0.8.35 Encoding# {
2971 self.guess_assessrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]guess_assess().(tld, allow_utf8).0
2972 }
2973
2974 /// Same as `guess()`, but also returns a Boolean indicating
2975 /// whether the guessed encoding had a higher score than at least
2976 /// one other candidate. If this method returns `false`, the
2977 /// guessed encoding is likely to be wrong.
2978 pub fn guess_assessrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]guess_assess().(&self, tld: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<&[u8]>, allow_utf8: bool) -> (&'static Encodingrust-analyzer cargo encoding_rs 0.8.35 Encoding#, bool) {
2979 let mut tld_type = tld.map_orrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]map_or().(Tldrust-analyzer cargo chardetng 0.1.17 tld/Tld#::Genericrust-analyzer cargo chardetng 0.1.17 tld/Tld#Generic#, |tld| {
2980 assertrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/assert!!(!rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[bool][Not]not().contains_upper_case_period_or_non_asciirust-analyzer cargo chardetng 0.1.17 contains_upper_case_period_or_non_ascii().(tld));
2981 classify_tldrust-analyzer cargo chardetng 0.1.17 tld/classify_tld().(tld)
2982 });
2983
2984 if self.non_ascii_seenrust-analyzer cargo chardetng 0.1.17 EncodingDetector#non_ascii_seen. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u64][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u64][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u64][`PartialEq<Self>`]eq().0
2985 && self.esc_seenrust-analyzer cargo chardetng 0.1.17 EncodingDetector#esc_seen.
2986 && self.candidatesrust-analyzer cargo chardetng 0.1.17 EncodingDetector#candidates.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().Selfrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]::ISO_2022_JP_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]ISO_2022_JP_INDEX.]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index()..scorerust-analyzer cargo chardetng 0.1.17 Candidate#score..is_somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]is_some().()
2987 {
2988 return (ISO_2022_JPrust-analyzer cargo encoding_rs 0.8.35 ISO_2022_JP., true);
2989 }
2990
2991 if self.candidatesrust-analyzer cargo chardetng 0.1.17 EncodingDetector#candidates.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().Selfrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]::UTF_8_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]UTF_8_INDEX.]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index()..scorerust-analyzer cargo chardetng 0.1.17 Candidate#score..is_somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]is_some().() {
2992 if allow_utf8 {
2993 return (UTF_8rust-analyzer cargo encoding_rs 0.8.35 UTF_8., true);
2994 }
2995 // Various test cases that prohibit UTF-8 detection want to
2996 // see windows-1252 specifically. These tests run on generic
2997 // domains. However, if we returned windows-1252 on
2998 // some non-generic domains, we'd cause reloads.
2999 return (self.candidatesrust-analyzer cargo chardetng 0.1.17 EncodingDetector#candidates.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().encoding_for_tldrust-analyzer cargo chardetng 0.1.17 encoding_for_tld().(tld_type)]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index()..encodingrust-analyzer cargo chardetng 0.1.17 impl#[Candidate]encoding().(), true);
3000 }
3001
3002 let mut encoding = self.candidatesrust-analyzer cargo chardetng 0.1.17 EncodingDetector#candidates.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().encoding_for_tldrust-analyzer cargo chardetng 0.1.17 encoding_for_tld().(tld_type)]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index()..encodingrust-analyzer cargo chardetng 0.1.17 impl#[Candidate]encoding().();
3003 let mut max = 0i64;
3004 let mut expectation_is_valid = false;
3005 if tld_type rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialEq#ne().!=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialEq#ne(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialEq#ne().Tldrust-analyzer cargo chardetng 0.1.17 tld/Tld#::Genericrust-analyzer cargo chardetng 0.1.17 tld/Tld#Generic# {
3006 for (i, candidate) in self.candidatesrust-analyzer cargo chardetng 0.1.17 EncodingDetector#candidates..iterrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]iter().().enumeraterust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#enumerate().().skiprust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#skip().(Selfrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]::FIRST_NORMALrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]FIRST_NORMAL.) {
3007 if encoding_is_native_to_tldrust-analyzer cargo chardetng 0.1.17 encoding_is_native_to_tld().(tld_type, i) && candidate.scorerust-analyzer cargo chardetng 0.1.17 Candidate#score..is_somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]is_some().() {
3008 expectation_is_valid = true;
3009 break;
3010 }
3011 }
3012 }
3013 if !rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[bool][Not]not().expectation_is_valid {
3014 // Flip Chinese and Central around
3015 match tld_type {
3016 Tldrust-analyzer cargo chardetng 0.1.17 tld/Tld#::Simplifiedrust-analyzer cargo chardetng 0.1.17 tld/Tld#Simplified# => {
3017 if self.candidatesrust-analyzer cargo chardetng 0.1.17 EncodingDetector#candidates.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().Selfrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]::BIG5_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]BIG5_INDEX.]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index()..scorerust-analyzer cargo chardetng 0.1.17 Candidate#score..is_somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]is_some().() {
3018 tld_type = Tldrust-analyzer cargo chardetng 0.1.17 tld/Tld#::Traditionalrust-analyzer cargo chardetng 0.1.17 tld/Tld#Traditional#;
3019 expectation_is_valid = true;
3020 }
3021 }
3022 Tldrust-analyzer cargo chardetng 0.1.17 tld/Tld#::Traditionalrust-analyzer cargo chardetng 0.1.17 tld/Tld#Traditional# => {
3023 if self.candidatesrust-analyzer cargo chardetng 0.1.17 EncodingDetector#candidates.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().Selfrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]::GBK_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]GBK_INDEX.]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index()..scorerust-analyzer cargo chardetng 0.1.17 Candidate#score..is_somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]is_some().() {
3024 tld_type = Tldrust-analyzer cargo chardetng 0.1.17 tld/Tld#::Simplifiedrust-analyzer cargo chardetng 0.1.17 tld/Tld#Simplified#;
3025 expectation_is_valid = true;
3026 }
3027 }
3028 Tldrust-analyzer cargo chardetng 0.1.17 tld/Tld#::CentralWindowsrust-analyzer cargo chardetng 0.1.17 tld/Tld#CentralWindows# => {
3029 if self.candidatesrust-analyzer cargo chardetng 0.1.17 EncodingDetector#candidates.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().Selfrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]::CENTRAL_ISO_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]CENTRAL_ISO_INDEX.]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index()..scorerust-analyzer cargo chardetng 0.1.17 Candidate#score..is_somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]is_some().() {
3030 tld_type = Tldrust-analyzer cargo chardetng 0.1.17 tld/Tld#::CentralIsorust-analyzer cargo chardetng 0.1.17 tld/Tld#CentralIso#;
3031 expectation_is_valid = true;
3032 }
3033 }
3034 Tldrust-analyzer cargo chardetng 0.1.17 tld/Tld#::CentralIsorust-analyzer cargo chardetng 0.1.17 tld/Tld#CentralIso# => {
3035 if self.candidatesrust-analyzer cargo chardetng 0.1.17 EncodingDetector#candidates.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().Selfrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]::CENTRAL_WINDOWS_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]CENTRAL_WINDOWS_INDEX.]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index()..scorerust-analyzer cargo chardetng 0.1.17 Candidate#score..is_somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]is_some().() {
3036 tld_type = Tldrust-analyzer cargo chardetng 0.1.17 tld/Tld#::CentralWindowsrust-analyzer cargo chardetng 0.1.17 tld/Tld#CentralWindows#;
3037 expectation_is_valid = true;
3038 }
3039 }
3040 _ => {}
3041 }
3042 }
3043 for (i, candidate) in self.candidatesrust-analyzer cargo chardetng 0.1.17 EncodingDetector#candidates..iterrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]iter().().enumeraterust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#enumerate().().skiprust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#skip().(Selfrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]::FIRST_NORMALrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]FIRST_NORMAL.) {
3044 if let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(score) = candidate.scorerust-analyzer cargo chardetng 0.1.17 impl#[Candidate]score().(i, tld_type, expectation_is_valid) {
3045 if score rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i64][`PartialOrd<Self>`]gt().>rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i64][`PartialOrd<Self>`]gt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i64][`PartialOrd<Self>`]gt().max {
3046 max = score;
3047 encoding = candidate.encodingrust-analyzer cargo chardetng 0.1.17 impl#[Candidate]encoding().();
3048 }
3049 }
3050 }
3051 let visual = &self.candidatesrust-analyzer cargo chardetng 0.1.17 EncodingDetector#candidates.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().Selfrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]::VISUAL_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]VISUAL_INDEX.]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().;
3052 if let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(visual_score) = visual.scorerust-analyzer cargo chardetng 0.1.17 impl#[Candidate]score().(Selfrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]::VISUAL_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]VISUAL_INDEX., tld_type, expectation_is_valid)
3053 {
3054 if (visual_score rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i64][`PartialOrd<Self>`]gt().>rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i64][`PartialOrd<Self>`]gt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i64][`PartialOrd<Self>`]gt().max || encoding rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[`&A`][`PartialEq<&B>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[`&A`][`PartialEq<&B>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[`&A`][`PartialEq<&B>`]eq().WINDOWS_1255rust-analyzer cargo encoding_rs 0.8.35 WINDOWS_1255.)
3055 && visual.plausible_punctuationrust-analyzer cargo chardetng 0.1.17 impl#[Candidate]plausible_punctuation().()
3056 >rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u64][`PartialOrd<Self>`]gt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u64][`PartialOrd<Self>`]gt().self.candidatesrust-analyzer cargo chardetng 0.1.17 EncodingDetector#candidates.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().Selfrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]::LOGICAL_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]LOGICAL_INDEX.]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index()..plausible_punctuationrust-analyzer cargo chardetng 0.1.17 impl#[Candidate]plausible_punctuation().()
3057 {
3058 // max = visual_score;
3059 encoding = ISO_8859_8rust-analyzer cargo encoding_rs 0.8.35 ISO_8859_8.;
3060 }
3061 }
3062 (encoding, max rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i64][`PartialOrd<Self>`]ge().>=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i64][`PartialOrd<Self>`]ge(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i64][`PartialOrd<Self>`]ge().0)
3063 }
3064
3065 // XXX Test-only API
3066 #[cfg(feature = "testing-only-no-semver-guarantees-do-not-use")]
3067 pub fn find_scorerust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]find_score().(&self, encoding: &'static Encodingrust-analyzer cargo encoding_rs 0.8.35 Encoding#) -> Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<i64> {
3068 let mut tld_type = Tldrust-analyzer cargo chardetng 0.1.17 tld/Tld#::Genericrust-analyzer cargo chardetng 0.1.17 tld/Tld#Generic#;
3069 let mut expectation_is_valid = false;
3070 if tld_type rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialEq#ne().!=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialEq#ne(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialEq#ne().Tldrust-analyzer cargo chardetng 0.1.17 tld/Tld#::Genericrust-analyzer cargo chardetng 0.1.17 tld/Tld#Generic# {
3071 for (i, candidate) in self.candidatesrust-analyzer cargo chardetng 0.1.17 EncodingDetector#candidates..iterrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]iter().().enumeraterust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#enumerate().().skiprust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#skip().(Selfrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]::FIRST_NORMALrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]FIRST_NORMAL.) {
3072 if encoding_is_native_to_tldrust-analyzer cargo chardetng 0.1.17 encoding_is_native_to_tld().(tld_type, i) && candidate.scorerust-analyzer cargo chardetng 0.1.17 Candidate#score..is_somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]is_some().() {
3073 expectation_is_valid = true;
3074 break;
3075 }
3076 }
3077 }
3078 if !rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[bool][Not]not().expectation_is_valid {
3079 // Flip Chinese and Central around
3080 match tld_type {
3081 Tldrust-analyzer cargo chardetng 0.1.17 tld/Tld#::Simplifiedrust-analyzer cargo chardetng 0.1.17 tld/Tld#Simplified# => {
3082 if self.candidatesrust-analyzer cargo chardetng 0.1.17 EncodingDetector#candidates.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().Selfrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]::BIG5_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]BIG5_INDEX.]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index()..scorerust-analyzer cargo chardetng 0.1.17 Candidate#score..is_somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]is_some().() {
3083 tld_type = Tldrust-analyzer cargo chardetng 0.1.17 tld/Tld#::Traditionalrust-analyzer cargo chardetng 0.1.17 tld/Tld#Traditional#;
3084 expectation_is_valid = true;
3085 }
3086 }
3087 Tldrust-analyzer cargo chardetng 0.1.17 tld/Tld#::Traditionalrust-analyzer cargo chardetng 0.1.17 tld/Tld#Traditional# => {
3088 if self.candidatesrust-analyzer cargo chardetng 0.1.17 EncodingDetector#candidates.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().Selfrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]::GBK_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]GBK_INDEX.]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index()..scorerust-analyzer cargo chardetng 0.1.17 Candidate#score..is_somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]is_some().() {
3089 tld_type = Tldrust-analyzer cargo chardetng 0.1.17 tld/Tld#::Simplifiedrust-analyzer cargo chardetng 0.1.17 tld/Tld#Simplified#;
3090 expectation_is_valid = true;
3091 }
3092 }
3093 Tldrust-analyzer cargo chardetng 0.1.17 tld/Tld#::CentralWindowsrust-analyzer cargo chardetng 0.1.17 tld/Tld#CentralWindows# => {
3094 if self.candidatesrust-analyzer cargo chardetng 0.1.17 EncodingDetector#candidates.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().Selfrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]::CENTRAL_ISO_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]CENTRAL_ISO_INDEX.]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index()..scorerust-analyzer cargo chardetng 0.1.17 Candidate#score..is_somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]is_some().() {
3095 tld_type = Tldrust-analyzer cargo chardetng 0.1.17 tld/Tld#::CentralIsorust-analyzer cargo chardetng 0.1.17 tld/Tld#CentralIso#;
3096 expectation_is_valid = true;
3097 }
3098 }
3099 Tldrust-analyzer cargo chardetng 0.1.17 tld/Tld#::CentralIsorust-analyzer cargo chardetng 0.1.17 tld/Tld#CentralIso# => {
3100 if self.candidatesrust-analyzer cargo chardetng 0.1.17 EncodingDetector#candidates.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().Selfrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]::CENTRAL_WINDOWS_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]CENTRAL_WINDOWS_INDEX.]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index()..scorerust-analyzer cargo chardetng 0.1.17 Candidate#score..is_somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]is_some().() {
3101 tld_type = Tldrust-analyzer cargo chardetng 0.1.17 tld/Tld#::CentralWindowsrust-analyzer cargo chardetng 0.1.17 tld/Tld#CentralWindows#;
3102 expectation_is_valid = true;
3103 }
3104 }
3105 _ => {}
3106 }
3107 }
3108 for (i, candidate) in self.candidatesrust-analyzer cargo chardetng 0.1.17 EncodingDetector#candidates..iterrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]iter().().enumeraterust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#enumerate().() {
3109 if encoding rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[`&A`][`PartialEq<&B>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[`&A`][`PartialEq<&B>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[`&A`][`PartialEq<&B>`]eq().candidate.encodingrust-analyzer cargo chardetng 0.1.17 impl#[Candidate]encoding().() {
3110 return candidate.scorerust-analyzer cargo chardetng 0.1.17 impl#[Candidate]score().(i, tld_type, expectation_is_valid);
3111 }
3112 }
3113 Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(0)
3114 }
3115
3116 const FIRST_NORMALrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]FIRST_NORMAL.: usize = 3;
3117
3118 const UTF_8_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]UTF_8_INDEX.: usize = 0;
3119
3120 const ISO_2022_JP_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]ISO_2022_JP_INDEX.: usize = 1;
3121
3122 const VISUAL_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]VISUAL_INDEX.: usize = 2;
3123
3124 const GBK_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]GBK_INDEX.: usize = 3;
3125
3126 const EUC_JP_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]EUC_JP_INDEX.: usize = 4;
3127
3128 const EUC_KR_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]EUC_KR_INDEX.: usize = 5;
3129
3130 const SHIFT_JIS_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]SHIFT_JIS_INDEX.: usize = 6;
3131
3132 const BIG5_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]BIG5_INDEX.: usize = 7;
3133
3134 const WESTERN_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]WESTERN_INDEX.: usize = 8;
3135
3136 const CYRILLIC_WINDOWS_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]CYRILLIC_WINDOWS_INDEX.: usize = 9;
3137
3138 const CENTRAL_WINDOWS_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]CENTRAL_WINDOWS_INDEX.: usize = 10;
3139
3140 const CENTRAL_ISO_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]CENTRAL_ISO_INDEX.: usize = 11;
3141
3142 const ARABIC_WINDOWS_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]ARABIC_WINDOWS_INDEX.: usize = 12;
3143
3144 const ICELANDIC_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]ICELANDIC_INDEX.: usize = 13;
3145
3146 const TURKISH_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]TURKISH_INDEX.: usize = 14;
3147
3148 const THAI_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]THAI_INDEX.: usize = 15;
3149
3150 const LOGICAL_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]LOGICAL_INDEX.: usize = 16;
3151
3152 const GREEK_WINDOWS_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]GREEK_WINDOWS_INDEX.: usize = 17;
3153
3154 const GREEK_ISO_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]GREEK_ISO_INDEX.: usize = 18;
3155
3156 const BALTIC_WINDOWS_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]BALTIC_WINDOWS_INDEX.: usize = 19;
3157
3158 const BALTIC_ISO13_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]BALTIC_ISO13_INDEX.: usize = 20;
3159
3160 const CYRILLIC_KOI_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]CYRILLIC_KOI_INDEX.: usize = 21;
3161
3162 const CYRILLIC_IBM_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]CYRILLIC_IBM_INDEX.: usize = 22;
3163
3164 const ARABIC_ISO_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]ARABIC_ISO_INDEX.: usize = 23;
3165
3166 const VIETNAMESE_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]VIETNAMESE_INDEX.: usize = 24;
3167
3168 const BALTIC_ISO4_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]BALTIC_ISO4_INDEX.: usize = 25;
3169
3170 const CYRILLIC_ISO_INDEXrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]CYRILLIC_ISO_INDEX.: usize = 26;
3171
3172 /// Creates a new instance of the detector.
3173 pub fn newrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]new().() -> Selfrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector] {
3174 EncodingDetectorrust-analyzer cargo chardetng 0.1.17 EncodingDetector# {
3175 candidatesrust-analyzer cargo chardetng 0.1.17 EncodingDetector#candidates.: [
3176 Candidaterust-analyzer cargo chardetng 0.1.17 Candidate#::new_utf_8rust-analyzer cargo chardetng 0.1.17 impl#[Candidate]new_utf_8().(), // 0
3177 Candidaterust-analyzer cargo chardetng 0.1.17 Candidate#::new_iso_2022_jprust-analyzer cargo chardetng 0.1.17 impl#[Candidate]new_iso_2022_jp().(), // 1
3178 Candidaterust-analyzer cargo chardetng 0.1.17 Candidate#::new_visualrust-analyzer cargo chardetng 0.1.17 impl#[Candidate]new_visual().(&SINGLE_BYTE_DATArust-analyzer cargo chardetng 0.1.17 data/SINGLE_BYTE_DATA.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().ISO_8859_8_INDEXrust-analyzer cargo chardetng 0.1.17 data/ISO_8859_8_INDEX.]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().), // 2
3179 Candidaterust-analyzer cargo chardetng 0.1.17 Candidate#::new_gbkrust-analyzer cargo chardetng 0.1.17 impl#[Candidate]new_gbk().(), // 3
3180 Candidaterust-analyzer cargo chardetng 0.1.17 Candidate#::new_euc_jprust-analyzer cargo chardetng 0.1.17 impl#[Candidate]new_euc_jp().(), // 4
3181 Candidaterust-analyzer cargo chardetng 0.1.17 Candidate#::new_euc_krrust-analyzer cargo chardetng 0.1.17 impl#[Candidate]new_euc_kr().(), // 5
3182 Candidaterust-analyzer cargo chardetng 0.1.17 Candidate#::new_shift_jisrust-analyzer cargo chardetng 0.1.17 impl#[Candidate]new_shift_jis().(), // 6
3183 Candidaterust-analyzer cargo chardetng 0.1.17 Candidate#::new_big5rust-analyzer cargo chardetng 0.1.17 impl#[Candidate]new_big5().(), // 7
3184 Candidaterust-analyzer cargo chardetng 0.1.17 Candidate#::new_latinrust-analyzer cargo chardetng 0.1.17 impl#[Candidate]new_latin().(&SINGLE_BYTE_DATArust-analyzer cargo chardetng 0.1.17 data/SINGLE_BYTE_DATA.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().WINDOWS_1252_INDEXrust-analyzer cargo chardetng 0.1.17 data/WINDOWS_1252_INDEX.]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().), // 8
3185 Candidaterust-analyzer cargo chardetng 0.1.17 Candidate#::new_non_latin_casedrust-analyzer cargo chardetng 0.1.17 impl#[Candidate]new_non_latin_cased().(&SINGLE_BYTE_DATArust-analyzer cargo chardetng 0.1.17 data/SINGLE_BYTE_DATA.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().WINDOWS_1251_INDEXrust-analyzer cargo chardetng 0.1.17 data/WINDOWS_1251_INDEX.]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().), // 9
3186 Candidaterust-analyzer cargo chardetng 0.1.17 Candidate#::new_latinrust-analyzer cargo chardetng 0.1.17 impl#[Candidate]new_latin().(&SINGLE_BYTE_DATArust-analyzer cargo chardetng 0.1.17 data/SINGLE_BYTE_DATA.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().WINDOWS_1250_INDEXrust-analyzer cargo chardetng 0.1.17 data/WINDOWS_1250_INDEX.]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().), // 10
3187 Candidaterust-analyzer cargo chardetng 0.1.17 Candidate#::new_latinrust-analyzer cargo chardetng 0.1.17 impl#[Candidate]new_latin().(&SINGLE_BYTE_DATArust-analyzer cargo chardetng 0.1.17 data/SINGLE_BYTE_DATA.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().ISO_8859_2_INDEXrust-analyzer cargo chardetng 0.1.17 data/ISO_8859_2_INDEX.]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().), // 11
3188 Candidaterust-analyzer cargo chardetng 0.1.17 Candidate#::new_arabic_frenchrust-analyzer cargo chardetng 0.1.17 impl#[Candidate]new_arabic_french().(&SINGLE_BYTE_DATArust-analyzer cargo chardetng 0.1.17 data/SINGLE_BYTE_DATA.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().WINDOWS_1256_INDEXrust-analyzer cargo chardetng 0.1.17 data/WINDOWS_1256_INDEX.]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().), // 12
3189 Candidaterust-analyzer cargo chardetng 0.1.17 Candidate#::new_latinrust-analyzer cargo chardetng 0.1.17 impl#[Candidate]new_latin().(&SINGLE_BYTE_DATArust-analyzer cargo chardetng 0.1.17 data/SINGLE_BYTE_DATA.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().WINDOWS_1252_ICELANDIC_INDEXrust-analyzer cargo chardetng 0.1.17 data/WINDOWS_1252_ICELANDIC_INDEX.]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().), // 13
3190 Candidaterust-analyzer cargo chardetng 0.1.17 Candidate#::new_latinrust-analyzer cargo chardetng 0.1.17 impl#[Candidate]new_latin().(&SINGLE_BYTE_DATArust-analyzer cargo chardetng 0.1.17 data/SINGLE_BYTE_DATA.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().WINDOWS_1254_INDEXrust-analyzer cargo chardetng 0.1.17 data/WINDOWS_1254_INDEX.]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().), // 14
3191 Candidaterust-analyzer cargo chardetng 0.1.17 Candidate#::new_caselessrust-analyzer cargo chardetng 0.1.17 impl#[Candidate]new_caseless().(&SINGLE_BYTE_DATArust-analyzer cargo chardetng 0.1.17 data/SINGLE_BYTE_DATA.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().WINDOWS_874_INDEXrust-analyzer cargo chardetng 0.1.17 data/WINDOWS_874_INDEX.]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().), // 15
3192 Candidaterust-analyzer cargo chardetng 0.1.17 Candidate#::new_logicalrust-analyzer cargo chardetng 0.1.17 impl#[Candidate]new_logical().(&SINGLE_BYTE_DATArust-analyzer cargo chardetng 0.1.17 data/SINGLE_BYTE_DATA.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().WINDOWS_1255_INDEXrust-analyzer cargo chardetng 0.1.17 data/WINDOWS_1255_INDEX.]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().), // 16
3193 Candidaterust-analyzer cargo chardetng 0.1.17 Candidate#::new_non_latin_casedrust-analyzer cargo chardetng 0.1.17 impl#[Candidate]new_non_latin_cased().(&SINGLE_BYTE_DATArust-analyzer cargo chardetng 0.1.17 data/SINGLE_BYTE_DATA.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().WINDOWS_1253_INDEXrust-analyzer cargo chardetng 0.1.17 data/WINDOWS_1253_INDEX.]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().), // 17
3194 Candidaterust-analyzer cargo chardetng 0.1.17 Candidate#::new_non_latin_casedrust-analyzer cargo chardetng 0.1.17 impl#[Candidate]new_non_latin_cased().(&SINGLE_BYTE_DATArust-analyzer cargo chardetng 0.1.17 data/SINGLE_BYTE_DATA.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().ISO_8859_7_INDEXrust-analyzer cargo chardetng 0.1.17 data/ISO_8859_7_INDEX.]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().), // 18
3195 Candidaterust-analyzer cargo chardetng 0.1.17 Candidate#::new_latinrust-analyzer cargo chardetng 0.1.17 impl#[Candidate]new_latin().(&SINGLE_BYTE_DATArust-analyzer cargo chardetng 0.1.17 data/SINGLE_BYTE_DATA.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().WINDOWS_1257_INDEXrust-analyzer cargo chardetng 0.1.17 data/WINDOWS_1257_INDEX.]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().), // 19
3196 Candidaterust-analyzer cargo chardetng 0.1.17 Candidate#::new_latinrust-analyzer cargo chardetng 0.1.17 impl#[Candidate]new_latin().(&SINGLE_BYTE_DATArust-analyzer cargo chardetng 0.1.17 data/SINGLE_BYTE_DATA.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().ISO_8859_13_INDEXrust-analyzer cargo chardetng 0.1.17 data/ISO_8859_13_INDEX.]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().), // 20
3197 Candidaterust-analyzer cargo chardetng 0.1.17 Candidate#::new_non_latin_casedrust-analyzer cargo chardetng 0.1.17 impl#[Candidate]new_non_latin_cased().(&SINGLE_BYTE_DATArust-analyzer cargo chardetng 0.1.17 data/SINGLE_BYTE_DATA.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().KOI8_U_INDEXrust-analyzer cargo chardetng 0.1.17 data/KOI8_U_INDEX.]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().), // 21
3198 Candidaterust-analyzer cargo chardetng 0.1.17 Candidate#::new_non_latin_casedrust-analyzer cargo chardetng 0.1.17 impl#[Candidate]new_non_latin_cased().(&SINGLE_BYTE_DATArust-analyzer cargo chardetng 0.1.17 data/SINGLE_BYTE_DATA.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().IBM866_INDEXrust-analyzer cargo chardetng 0.1.17 data/IBM866_INDEX.]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().), // 22
3199 Candidaterust-analyzer cargo chardetng 0.1.17 Candidate#::new_caselessrust-analyzer cargo chardetng 0.1.17 impl#[Candidate]new_caseless().(&SINGLE_BYTE_DATArust-analyzer cargo chardetng 0.1.17 data/SINGLE_BYTE_DATA.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().ISO_8859_6_INDEXrust-analyzer cargo chardetng 0.1.17 data/ISO_8859_6_INDEX.]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().), // 23
3200 Candidaterust-analyzer cargo chardetng 0.1.17 Candidate#::new_latinrust-analyzer cargo chardetng 0.1.17 impl#[Candidate]new_latin().(&SINGLE_BYTE_DATArust-analyzer cargo chardetng 0.1.17 data/SINGLE_BYTE_DATA.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().WINDOWS_1258_INDEXrust-analyzer cargo chardetng 0.1.17 data/WINDOWS_1258_INDEX.]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().), // 24
3201 Candidaterust-analyzer cargo chardetng 0.1.17 Candidate#::new_latinrust-analyzer cargo chardetng 0.1.17 impl#[Candidate]new_latin().(&SINGLE_BYTE_DATArust-analyzer cargo chardetng 0.1.17 data/SINGLE_BYTE_DATA.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().ISO_8859_4_INDEXrust-analyzer cargo chardetng 0.1.17 data/ISO_8859_4_INDEX.]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().), // 25
3202 Candidaterust-analyzer cargo chardetng 0.1.17 Candidate#::new_non_latin_casedrust-analyzer cargo chardetng 0.1.17 impl#[Candidate]new_non_latin_cased().(&SINGLE_BYTE_DATArust-analyzer cargo chardetng 0.1.17 data/SINGLE_BYTE_DATA.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().ISO_8859_5_INDEXrust-analyzer cargo chardetng 0.1.17 data/ISO_8859_5_INDEX.]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().), // 26
3203 ],
3204 non_ascii_seenrust-analyzer cargo chardetng 0.1.17 EncodingDetector#non_ascii_seen.: 0,
3205 last_before_non_asciirust-analyzer cargo chardetng 0.1.17 EncodingDetector#last_before_non_ascii.: BeforeNonAsciirust-analyzer cargo chardetng 0.1.17 BeforeNonAscii#::Nonerust-analyzer cargo chardetng 0.1.17 BeforeNonAscii#None#,
3206 esc_seenrust-analyzer cargo chardetng 0.1.17 EncodingDetector#esc_seen.: false,
3207 closedrust-analyzer cargo chardetng 0.1.17 EncodingDetector#closed.: false,
3208 }
3209 }
3210 }
3211
3212 #[cfg(test)]
•3213 #[macro_use]
3214 extern crate stdrust-analyzer cargo chardetng 0.1.17 std/;
3215 #[cfg(test)]
3216 mod testsrust-analyzer cargo chardetng 0.1.17 tests/ {
•3217 use stdrust-analyzer cargo std https://github.com/rust-lang/rust/library/std crate/::preluderust-analyzer cargo std https://github.com/rust-lang/rust/library/std prelude/::rust_2018rust-analyzer cargo std https://github.com/rust-lang/rust/library/std prelude/rust_2018/::*; // inline with package.edition = "2018"
3218 use superrust-analyzer cargo chardetng 0.1.17 crate/::*;
•3219 //use detone::IterDecomposeVietnamese;
3220 use encoding_rsrust-analyzer cargo encoding_rs 0.8.35 crate/::IBM866rust-analyzer cargo encoding_rs 0.8.35 IBM866.;
3221 use encoding_rsrust-analyzer cargo encoding_rs 0.8.35 crate/::ISO_8859_2rust-analyzer cargo encoding_rs 0.8.35 ISO_8859_2.;
3222 use encoding_rsrust-analyzer cargo encoding_rs 0.8.35 crate/::ISO_8859_4rust-analyzer cargo encoding_rs 0.8.35 ISO_8859_4.;
3223 use encoding_rsrust-analyzer cargo encoding_rs 0.8.35 crate/::ISO_8859_5rust-analyzer cargo encoding_rs 0.8.35 ISO_8859_5.;
3224 use encoding_rsrust-analyzer cargo encoding_rs 0.8.35 crate/::ISO_8859_6rust-analyzer cargo encoding_rs 0.8.35 ISO_8859_6.;
3225 use encoding_rsrust-analyzer cargo encoding_rs 0.8.35 crate/::ISO_8859_7rust-analyzer cargo encoding_rs 0.8.35 ISO_8859_7.;
3226 use encoding_rsrust-analyzer cargo encoding_rs 0.8.35 crate/::KOI8_Urust-analyzer cargo encoding_rs 0.8.35 KOI8_U.;
3227 use encoding_rsrust-analyzer cargo encoding_rs 0.8.35 crate/::WINDOWS_1250rust-analyzer cargo encoding_rs 0.8.35 WINDOWS_1250.;
3228 use encoding_rsrust-analyzer cargo encoding_rs 0.8.35 crate/::WINDOWS_1251rust-analyzer cargo encoding_rs 0.8.35 WINDOWS_1251.;
3229 use encoding_rsrust-analyzer cargo encoding_rs 0.8.35 crate/::WINDOWS_1252rust-analyzer cargo encoding_rs 0.8.35 WINDOWS_1252.;
3230 use encoding_rsrust-analyzer cargo encoding_rs 0.8.35 crate/::WINDOWS_1253rust-analyzer cargo encoding_rs 0.8.35 WINDOWS_1253.;
3231 use encoding_rsrust-analyzer cargo encoding_rs 0.8.35 crate/::WINDOWS_1254rust-analyzer cargo encoding_rs 0.8.35 WINDOWS_1254.;
3232 use encoding_rsrust-analyzer cargo encoding_rs 0.8.35 crate/::WINDOWS_1256rust-analyzer cargo encoding_rs 0.8.35 WINDOWS_1256.;
3233 use encoding_rsrust-analyzer cargo encoding_rs 0.8.35 crate/::WINDOWS_1257rust-analyzer cargo encoding_rs 0.8.35 WINDOWS_1257.;
•3234 //use encoding_rs::WINDOWS_1258;
3235 use encoding_rsrust-analyzer cargo encoding_rs 0.8.35 crate/::WINDOWS_874rust-analyzer cargo encoding_rs 0.8.35 WINDOWS_874.;
3236
3237 fn check_bytesrust-analyzer cargo chardetng 0.1.17 tests/check_bytes().(bytes: &[u8], encoding: &'static Encodingrust-analyzer cargo encoding_rs 0.8.35 Encoding#) {
3238 let mut det = EncodingDetectorrust-analyzer cargo chardetng 0.1.17 EncodingDetector#::newrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]new().();
3239 det.feedrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]feed().(bytes, true);
3240 let enc = det.guessrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]guess().(Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#, false);
3241 let (decoded, _) = enc.decode_without_bom_handlingrust-analyzer cargo encoding_rs 0.8.35 impl#[Encoding]decode_without_bom_handling().(bytes);
3242 printlnrust-analyzer cargo std https://github.com/rust-lang/rust/library/std macros/println!!("{:?}", decoded);
3243 assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(enc, encoding);
3244 }
3245
3246 fn checkrust-analyzer cargo chardetng 0.1.17 tests/check().(input: &str, encoding: &'static Encodingrust-analyzer cargo encoding_rs 0.8.35 Encoding#) {
•3247 /*let orthographic;
3248 let (bytes, _, _) = if encoding == WINDOWS_1258 {
3249 orthographic = input
3250 .chars()
3251 .decompose_vietnamese_tones(true)
3252 .collect::<String>();
3253 encoding.encode(&orthographic)
3254 } else {
•3255 encoding.encode(input);
3256 };*/
3257 check_bytesrust-analyzer cargo chardetng 0.1.17 tests/check_bytes().(&encoding.encoderust-analyzer cargo encoding_rs 0.8.35 impl#[Encoding]encode().(input).0, encoding);
3258 }
3259
3260 #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:]
3261 fn test_i_apostropherust-analyzer cargo chardetng 0.1.17 tests/test_i_apostrophe().() {
3262 let mut det = EncodingDetectorrust-analyzer cargo chardetng 0.1.17 EncodingDetector#::newrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]new().();
3263 det.feedrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]feed().(b"I\x92", true);
3264 let enc = det.guessrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]guess().(Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#, false);
3265 assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(enc, WINDOWS_1252rust-analyzer cargo encoding_rs 0.8.35 WINDOWS_1252.);
3266 }
3267
3268 #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:]
3269 fn test_streaming_numero_one_by_onerust-analyzer cargo chardetng 0.1.17 tests/test_streaming_numero_one_by_one().() {
3270 let mut det = EncodingDetectorrust-analyzer cargo chardetng 0.1.17 EncodingDetector#::newrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]new().();
3271 det.feedrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]feed().(b"n", false);
3272 det.feedrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]feed().(b".", false);
3273 det.feedrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]feed().(b"\xBA", false);
3274 det.feedrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]feed().(b"1", true);
3275 let enc = det.guessrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]guess().(Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#, false);
3276 assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(enc, WINDOWS_1252rust-analyzer cargo encoding_rs 0.8.35 WINDOWS_1252.);
3277 }
3278
3279 #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:]
3280 fn test_streaming_numero_two_togetherrust-analyzer cargo chardetng 0.1.17 tests/test_streaming_numero_two_together().() {
3281 let mut det = EncodingDetectorrust-analyzer cargo chardetng 0.1.17 EncodingDetector#::newrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]new().();
3282 det.feedrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]feed().(b"n.", false);
3283 det.feedrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]feed().(b"\xBA", false);
3284 det.feedrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]feed().(b"1", true);
3285 let enc = det.guessrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]guess().(Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#, false);
3286 assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(enc, WINDOWS_1252rust-analyzer cargo encoding_rs 0.8.35 WINDOWS_1252.);
3287 }
3288
3289 #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:]
3290 fn test_streaming_numero_one_by_one_extra_beforerust-analyzer cargo chardetng 0.1.17 tests/test_streaming_numero_one_by_one_extra_before().() {
3291 let mut det = EncodingDetectorrust-analyzer cargo chardetng 0.1.17 EncodingDetector#::newrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]new().();
3292 det.feedrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]feed().(b" n", false);
3293 det.feedrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]feed().(b".", false);
3294 det.feedrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]feed().(b"\xBA", false);
3295 det.feedrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]feed().(b"1", true);
3296 let enc = det.guessrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]guess().(Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#, false);
3297 assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(enc, WINDOWS_1252rust-analyzer cargo encoding_rs 0.8.35 WINDOWS_1252.);
3298 }
3299
3300 #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:]
3301 fn test_streaming_numero_one_beforerust-analyzer cargo chardetng 0.1.17 tests/test_streaming_numero_one_before().() {
3302 let mut det = EncodingDetectorrust-analyzer cargo chardetng 0.1.17 EncodingDetector#::newrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]new().();
3303 det.feedrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]feed().(b"n", false);
3304 det.feedrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]feed().(b".\xBA", false);
3305 det.feedrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]feed().(b"1", true);
3306 let enc = det.guessrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]guess().(Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#, false);
3307 assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(enc, WINDOWS_1252rust-analyzer cargo encoding_rs 0.8.35 WINDOWS_1252.);
3308 }
3309
3310 #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:]
3311 fn test_streaming_numero_longer_first_bufferrust-analyzer cargo chardetng 0.1.17 tests/test_streaming_numero_longer_first_buffer().() {
3312 let mut det = EncodingDetectorrust-analyzer cargo chardetng 0.1.17 EncodingDetector#::newrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]new().();
3313 det.feedrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]feed().(b"rrn.", false);
3314 det.feedrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]feed().(b"\xBA", false);
3315 det.feedrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]feed().(b"1", true);
3316 let enc = det.guessrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]guess().(Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#, false);
3317 assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(enc, WINDOWS_1252rust-analyzer cargo encoding_rs 0.8.35 WINDOWS_1252.);
3318 }
3319
3320 #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:]
3321 fn test_emptyrust-analyzer cargo chardetng 0.1.17 tests/test_empty().() {
3322 let mut det = EncodingDetectorrust-analyzer cargo chardetng 0.1.17 EncodingDetector#::newrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]new().();
3323 let seen_non_ascii = det.feedrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]feed().(b"", true);
3324 let enc = det.guessrust-analyzer cargo chardetng 0.1.17 impl#[EncodingDetector]guess().(Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#, false);
3325 assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(enc, WINDOWS_1252rust-analyzer cargo encoding_rs 0.8.35 WINDOWS_1252.);
3326 assertrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/assert!!(!rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[bool][Not]not().seen_non_ascii);
3327 }
3328
3329 #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:]
3330 fn test_firust-analyzer cargo chardetng 0.1.17 tests/test_fi().() {
3331 checkrust-analyzer cargo chardetng 0.1.17 tests/check().("Ääni", WINDOWS_1252rust-analyzer cargo encoding_rs 0.8.35 WINDOWS_1252.);
3332 }
3333
3334 #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:]
3335 fn test_fi_bisrust-analyzer cargo chardetng 0.1.17 tests/test_fi_bis().() {
3336 checkrust-analyzer cargo chardetng 0.1.17 tests/check().("Tämä", WINDOWS_1252rust-analyzer cargo encoding_rs 0.8.35 WINDOWS_1252.);
3337 }
3338
3339 #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:]
3340 fn test_ptrust-analyzer cargo chardetng 0.1.17 tests/test_pt().() {
3341 checkrust-analyzer cargo chardetng 0.1.17 tests/check().(
3342 "Este é um teste de codificação de caracteres.",
3343 WINDOWS_1252rust-analyzer cargo encoding_rs 0.8.35 WINDOWS_1252.,
3344 );
3345 }
3346
3347 #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:]
3348 fn test_isrust-analyzer cargo chardetng 0.1.17 tests/test_is().() {
3349 checkrust-analyzer cargo chardetng 0.1.17 tests/check().("Þetta er kóðunarpróf á staf. Fyrir sum tungumál sem nota latneska stafi þurfum við meira inntak til að taka ákvörðunina.", WINDOWS_1252rust-analyzer cargo encoding_rs 0.8.35 WINDOWS_1252.);
3350 }
3351
3352 #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:]
3353 fn test_ru_shortrust-analyzer cargo chardetng 0.1.17 tests/test_ru_short().() {
3354 checkrust-analyzer cargo chardetng 0.1.17 tests/check().("Русский", WINDOWS_1251rust-analyzer cargo encoding_rs 0.8.35 WINDOWS_1251.);
3355 }
3356
3357 #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:]
3358 fn test_rurust-analyzer cargo chardetng 0.1.17 tests/test_ru().() {
3359 checkrust-analyzer cargo chardetng 0.1.17 tests/check().("Это тест кодировки символов.", WINDOWS_1251rust-analyzer cargo encoding_rs 0.8.35 WINDOWS_1251.);
3360 }
3361
3362 #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:]
3363 fn test_ru_isorust-analyzer cargo chardetng 0.1.17 tests/test_ru_iso().() {
3364 checkrust-analyzer cargo chardetng 0.1.17 tests/check().("Это тест кодировки символов.", ISO_8859_5rust-analyzer cargo encoding_rs 0.8.35 ISO_8859_5.);
3365 }
3366
3367 #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:]
3368 fn test_ru_ibmrust-analyzer cargo chardetng 0.1.17 tests/test_ru_ibm().() {
3369 checkrust-analyzer cargo chardetng 0.1.17 tests/check().("Это тест кодировки символов.", IBM866rust-analyzer cargo encoding_rs 0.8.35 IBM866.);
3370 }
3371
3372 #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:]
3373 fn test_ru_koirust-analyzer cargo chardetng 0.1.17 tests/test_ru_koi().() {
3374 checkrust-analyzer cargo chardetng 0.1.17 tests/check().("Это тест кодировки символов.", KOI8_Urust-analyzer cargo encoding_rs 0.8.35 KOI8_U.);
3375 }
3376
3377 #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:]
3378 fn test_ukrust-analyzer cargo chardetng 0.1.17 tests/test_uk().() {
3379 checkrust-analyzer cargo chardetng 0.1.17 tests/check().("Це тест на кодування символів.", WINDOWS_1251rust-analyzer cargo encoding_rs 0.8.35 WINDOWS_1251.);
3380 }
3381
3382 #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:]
3383 fn test_uk_koirust-analyzer cargo chardetng 0.1.17 tests/test_uk_koi().() {
3384 checkrust-analyzer cargo chardetng 0.1.17 tests/check().("Це тест на кодування символів.", KOI8_Urust-analyzer cargo encoding_rs 0.8.35 KOI8_U.);
3385 }
3386
3387 #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:]
3388 fn test_el_shortrust-analyzer cargo chardetng 0.1.17 tests/test_el_short().() {
3389 checkrust-analyzer cargo chardetng 0.1.17 tests/check().("Ελληνικά", WINDOWS_1253rust-analyzer cargo encoding_rs 0.8.35 WINDOWS_1253.);
3390 }
3391
3392 #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:]
3393 fn test_elrust-analyzer cargo chardetng 0.1.17 tests/test_el().() {
3394 checkrust-analyzer cargo chardetng 0.1.17 tests/check().(
3395 "Πρόκειται για δοκιμή κωδικοποίησης χαρακτήρων: Άρης",
3396 WINDOWS_1253rust-analyzer cargo encoding_rs 0.8.35 WINDOWS_1253.,
3397 );
3398 }
3399
3400 #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:]
3401 fn test_el_isorust-analyzer cargo chardetng 0.1.17 tests/test_el_iso().() {
3402 checkrust-analyzer cargo chardetng 0.1.17 tests/check().(
3403 "Πρόκειται για δοκιμή κωδικοποίησης χαρακτήρων: Άρης",
3404 ISO_8859_7rust-analyzer cargo encoding_rs 0.8.35 ISO_8859_7.,
3405 );
3406 }
3407
3408 #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:]
3409 fn test_derust-analyzer cargo chardetng 0.1.17 tests/test_de().() {
3410 checkrust-analyzer cargo chardetng 0.1.17 tests/check().("Straße", WINDOWS_1252rust-analyzer cargo encoding_rs 0.8.35 WINDOWS_1252.);
3411 }
3412
3413 #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:]
3414 fn test_en_windows1252rust-analyzer cargo chardetng 0.1.17 tests/test_en_windows1252().() {
3415 // "Don't "
3416 check_bytesrust-analyzer cargo chardetng 0.1.17 tests/check_bytes().(&[68, 111, 110, 180, 116, 32], WINDOWS_1252rust-analyzer cargo encoding_rs 0.8.35 WINDOWS_1252.);
3417 }
3418
3419 #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:]
3420 fn test_herust-analyzer cargo chardetng 0.1.17 tests/test_he().() {
3421 checkrust-analyzer cargo chardetng 0.1.17 tests/check().("\u{5E2}\u{5D1}\u{5E8}\u{5D9}\u{5EA}", WINDOWS_1255rust-analyzer cargo encoding_rs 0.8.35 WINDOWS_1255.);
3422 }
3423
3424 #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:]
3425 fn test_2022rust-analyzer cargo chardetng 0.1.17 tests/test_2022().() {
3426 checkrust-analyzer cargo chardetng 0.1.17 tests/check().("日本語", ISO_2022_JPrust-analyzer cargo encoding_rs 0.8.35 ISO_2022_JP.);
3427 }
3428
3429 #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:]
3430 fn test_thrust-analyzer cargo chardetng 0.1.17 tests/test_th().() {
3431 checkrust-analyzer cargo chardetng 0.1.17 tests/check().("นี่คือการทดสอบการเข้ารหัสอักขระ", WINDOWS_874rust-analyzer cargo encoding_rs 0.8.35 WINDOWS_874.);
3432 }
3433
3434 #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:]
•3435 #[cfg(any())] // dependency detone unavailable
3436 fn test_vi() {
3437 checkrust-analyzer cargo chardetng 0.1.17 tests/check().("Đây là một thử nghiệm mã hóa ký tự.", WINDOWS_1258);
3438 }
3439
3440 #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:]
3441 fn test_trrust-analyzer cargo chardetng 0.1.17 tests/test_tr().() {
3442 checkrust-analyzer cargo chardetng 0.1.17 tests/check().("Bu bir karakter kodlama testidir. Latince karakterleri kullanan bazı dillerde karar vermek için daha fazla girdiye ihtiyacımız var.", WINDOWS_1254rust-analyzer cargo encoding_rs 0.8.35 WINDOWS_1254.);
3443 }
3444
3445 #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:]
3446 fn test_simplifiedrust-analyzer cargo chardetng 0.1.17 tests/test_simplified().() {
3447 checkrust-analyzer cargo chardetng 0.1.17 tests/check().("这是一个字符编码测试。", GBKrust-analyzer cargo encoding_rs 0.8.35 GBK.);
3448 }
3449
3450 #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:]
3451 fn test_traditionalrust-analyzer cargo chardetng 0.1.17 tests/test_traditional().() {
3452 checkrust-analyzer cargo chardetng 0.1.17 tests/check().("這是一個字符編碼測試。", BIG5rust-analyzer cargo encoding_rs 0.8.35 BIG5.);
3453 }
3454
3455 #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:]
3456 fn test_korust-analyzer cargo chardetng 0.1.17 tests/test_ko().() {
3457 checkrust-analyzer cargo chardetng 0.1.17 tests/check().("이것은 문자 인코딩 테스트입니다.", EUC_KRrust-analyzer cargo encoding_rs 0.8.35 EUC_KR.);
3458 }
3459
3460 #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:]
3461 fn test_shiftrust-analyzer cargo chardetng 0.1.17 tests/test_shift().() {
3462 checkrust-analyzer cargo chardetng 0.1.17 tests/check().("これは文字実験です。", SHIFT_JISrust-analyzer cargo encoding_rs 0.8.35 SHIFT_JIS.);
3463 }
3464
3465 #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:]
3466 fn test_eucrust-analyzer cargo chardetng 0.1.17 tests/test_euc().() {
3467 checkrust-analyzer cargo chardetng 0.1.17 tests/check().("これは文字実験です。", EUC_JPrust-analyzer cargo encoding_rs 0.8.35 EUC_JP.);
3468 }
3469
3470 #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:]
3471 fn test_arrust-analyzer cargo chardetng 0.1.17 tests/test_ar().() {
3472 checkrust-analyzer cargo chardetng 0.1.17 tests/check().("هذا هو اختبار ترميز الأحرف.", WINDOWS_1256rust-analyzer cargo encoding_rs 0.8.35 WINDOWS_1256.);
3473 }
3474
3475 #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:]
3476 fn test_ar_isorust-analyzer cargo chardetng 0.1.17 tests/test_ar_iso().() {
3477 checkrust-analyzer cargo chardetng 0.1.17 tests/check().("هذا هو اختبار ترميز الأحرف.", ISO_8859_6rust-analyzer cargo encoding_rs 0.8.35 ISO_8859_6.);
3478 }
3479
3480 #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:]
3481 fn test_farust-analyzer cargo chardetng 0.1.17 tests/test_fa().() {
3482 checkrust-analyzer cargo chardetng 0.1.17 tests/check().("این یک تست رمزگذاری کاراکتر است.", WINDOWS_1256rust-analyzer cargo encoding_rs 0.8.35 WINDOWS_1256.);
3483 }
3484
3485 #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:]
3486 fn test_visualrust-analyzer cargo chardetng 0.1.17 tests/test_visual().() {
3487 checkrust-analyzer cargo chardetng 0.1.17 tests/check().(".םיוות דודיק ןחבמ והז", ISO_8859_8rust-analyzer cargo encoding_rs 0.8.35 ISO_8859_8.);
3488 }
3489
3490 #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:]
3491 fn test_yirust-analyzer cargo chardetng 0.1.17 tests/test_yi().() {
3492 checkrust-analyzer cargo chardetng 0.1.17 tests/check().("דאָס איז אַ טעסט פֿאַר קאָדירונג פון כאַראַקטער.", WINDOWS_1255rust-analyzer cargo encoding_rs 0.8.35 WINDOWS_1255.);
3493 }
3494
3495 #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:]
3496 fn test_itrust-analyzer cargo chardetng 0.1.17 tests/test_it().() {
3497 checkrust-analyzer cargo chardetng 0.1.17 tests/check().("è", WINDOWS_1252rust-analyzer cargo encoding_rs 0.8.35 WINDOWS_1252.);
3498 }
3499
3500 #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:]
3501 fn test_enrust-analyzer cargo chardetng 0.1.17 tests/test_en().() {
3502 checkrust-analyzer cargo chardetng 0.1.17 tests/check().("isn’t", WINDOWS_1252rust-analyzer cargo encoding_rs 0.8.35 WINDOWS_1252.);
3503 }
3504
3505 #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:]
3506 fn test_en_bisrust-analyzer cargo chardetng 0.1.17 tests/test_en_bis().() {
3507 checkrust-analyzer cargo chardetng 0.1.17 tests/check().("Rock ’n Roll", WINDOWS_1252rust-analyzer cargo encoding_rs 0.8.35 WINDOWS_1252.);
3508 }
3509
3510 #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:]
3511 fn test_carust-analyzer cargo chardetng 0.1.17 tests/test_ca().() {
3512 checkrust-analyzer cargo chardetng 0.1.17 tests/check().("Codificació de caràcters", WINDOWS_1252rust-analyzer cargo encoding_rs 0.8.35 WINDOWS_1252.);
3513 }
3514
3515 #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:]
3516 fn test_etrust-analyzer cargo chardetng 0.1.17 tests/test_et().() {
3517 checkrust-analyzer cargo chardetng 0.1.17 tests/check().("või", WINDOWS_1252rust-analyzer cargo encoding_rs 0.8.35 WINDOWS_1252.);
3518 }
3519
3520 #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:]
3521 fn test_pl_isorust-analyzer cargo chardetng 0.1.17 tests/test_pl_iso().() {
3522 checkrust-analyzer cargo chardetng 0.1.17 tests/check().("To jest test kodowania znaków. W przypadku niektórych języków, które używają znaków łacińskich, potrzebujemy więcej danych, aby podjąć decyzję.", ISO_8859_2rust-analyzer cargo encoding_rs 0.8.35 ISO_8859_2.);
3523 }
3524
3525 #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:]
3526 fn test_plrust-analyzer cargo chardetng 0.1.17 tests/test_pl().() {
3527 checkrust-analyzer cargo chardetng 0.1.17 tests/check().("To jest test kodowania znaków. W przypadku niektórych języków, które używają znaków łacińskich, potrzebujemy więcej danych, aby podjąć decyzję.", WINDOWS_1250rust-analyzer cargo encoding_rs 0.8.35 WINDOWS_1250.);
3528 }
3529
3530 #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:]
3531 fn test_ltrust-analyzer cargo chardetng 0.1.17 tests/test_lt().() {
3532 checkrust-analyzer cargo chardetng 0.1.17 tests/check().("Tai simbolių kodavimo testas. Kai kurioms kalboms, naudojančioms lotyniškus rašmenis, mums reikia daugiau informacijos, kad galėtume priimti sprendimą.", WINDOWS_1257rust-analyzer cargo encoding_rs 0.8.35 WINDOWS_1257.);
3533 }
3534
3535 // TODO: Detected as ISO-8859-2.
3536 // #[test]
3537 // fn test_lt_windows_iso_8859_4() {
3538 // check("Tai simbolių kodavimo testas. Kai kurioms kalboms, naudojančioms lotyniškus rašmenis, mums reikia daugiau informacijos, kad galėtume priimti sprendimą.", ISO_8859_4);
3539 // }
3540
3541 #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:]
3542 fn test_lvrust-analyzer cargo chardetng 0.1.17 tests/test_lv().() {
3543 checkrust-analyzer cargo chardetng 0.1.17 tests/check().("Šis ir rakstzīmju kodēšanas tests. Dažās valodās, kurās tiek izmantotas latīņu valodas burti, lēmuma pieņemšanai mums ir nepieciešams vairāk ieguldījuma.", WINDOWS_1257rust-analyzer cargo encoding_rs 0.8.35 WINDOWS_1257.);
3544 }
3545
3546 #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:]
3547 fn test_lv_iso_8859_4rust-analyzer cargo chardetng 0.1.17 tests/test_lv_iso_8859_4().() {
3548 checkrust-analyzer cargo chardetng 0.1.17 tests/check().("Šis ir rakstzīmju kodēšanas tests. Dažās valodās, kurās tiek izmantotas latīņu valodas burti, lēmuma pieņemšanai mums ir nepieciešams vairāk ieguldījuma.", ISO_8859_4rust-analyzer cargo encoding_rs 0.8.35 ISO_8859_4.);
3549 }
3550
3551 #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:]
3552 fn test_a0rust-analyzer cargo chardetng 0.1.17 tests/test_a0().() {
3553 // Test that this isn't IBM866. TODO: What about GBK with fully paired 0xA0?
3554 checkrust-analyzer cargo chardetng 0.1.17 tests/check().("\u{A0}\u{A0} \u{A0}", WINDOWS_1252rust-analyzer cargo encoding_rs 0.8.35 WINDOWS_1252.);
3555 }
3556
3557 #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:]
3558 fn test_a0a0rust-analyzer cargo chardetng 0.1.17 tests/test_a0a0().() {
3559 // Test that this isn't GBK or EUC-KR.
3560 checkrust-analyzer cargo chardetng 0.1.17 tests/check().("\u{A0}\u{A0}", WINDOWS_1252rust-analyzer cargo encoding_rs 0.8.35 WINDOWS_1252.);
3561 }
3562
3563 #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:]
3564 fn test_space_copyright_spacerust-analyzer cargo chardetng 0.1.17 tests/test_space_copyright_space().() {
3565 checkrust-analyzer cargo chardetng 0.1.17 tests/check().(" © ", WINDOWS_1252rust-analyzer cargo encoding_rs 0.8.35 WINDOWS_1252.);
3566 }
3567
3568 #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:]
3569 fn test_space_masculine_spacerust-analyzer cargo chardetng 0.1.17 tests/test_space_masculine_space().() {
3570 checkrust-analyzer cargo chardetng 0.1.17 tests/check().(" º ", WINDOWS_1252rust-analyzer cargo encoding_rs 0.8.35 WINDOWS_1252.);
3571 }
3572
3573 #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:]
3574 fn test_space_feminine_spacerust-analyzer cargo chardetng 0.1.17 tests/test_space_feminine_space().() {
3575 checkrust-analyzer cargo chardetng 0.1.17 tests/check().(" ª ", WINDOWS_1252rust-analyzer cargo encoding_rs 0.8.35 WINDOWS_1252.);
3576 }
3577
3578 #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:]
3579 fn test_period_masculine_spacerust-analyzer cargo chardetng 0.1.17 tests/test_period_masculine_space().() {
3580 checkrust-analyzer cargo chardetng 0.1.17 tests/check().(".º ", WINDOWS_1252rust-analyzer cargo encoding_rs 0.8.35 WINDOWS_1252.);
3581 }
3582
3583 #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:]
3584 fn test_period_feminine_spacerust-analyzer cargo chardetng 0.1.17 tests/test_period_feminine_space().() {
3585 checkrust-analyzer cargo chardetng 0.1.17 tests/check().(".ª ", WINDOWS_1252rust-analyzer cargo encoding_rs 0.8.35 WINDOWS_1252.);
3586 }
3587
3588 #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:]
3589 fn test_mariarust-analyzer cargo chardetng 0.1.17 tests/test_maria().() {
3590 checkrust-analyzer cargo chardetng 0.1.17 tests/check().(" Mª ", WINDOWS_1252rust-analyzer cargo encoding_rs 0.8.35 WINDOWS_1252.);
3591 }
3592
3593 #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:]
3594 fn test_donarust-analyzer cargo chardetng 0.1.17 tests/test_dona().() {
3595 checkrust-analyzer cargo chardetng 0.1.17 tests/check().(" Dª ", WINDOWS_1252rust-analyzer cargo encoding_rs 0.8.35 WINDOWS_1252.);
3596 }
3597
3598 #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:]
3599 fn test_nuestrarust-analyzer cargo chardetng 0.1.17 tests/test_nuestra().() {
3600 checkrust-analyzer cargo chardetng 0.1.17 tests/check().(" Nª ", WINDOWS_1252rust-analyzer cargo encoding_rs 0.8.35 WINDOWS_1252.);
3601 }
3602
3603 #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:]
3604 fn test_senorarust-analyzer cargo chardetng 0.1.17 tests/test_senora().() {
3605 checkrust-analyzer cargo chardetng 0.1.17 tests/check().(" Sª ", WINDOWS_1252rust-analyzer cargo encoding_rs 0.8.35 WINDOWS_1252.);
3606 }
3607
3608 #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:]
3609 fn test_digit_femininerust-analyzer cargo chardetng 0.1.17 tests/test_digit_feminine().() {
3610 checkrust-analyzer cargo chardetng 0.1.17 tests/check().(" 42ª ", WINDOWS_1252rust-analyzer cargo encoding_rs 0.8.35 WINDOWS_1252.);
3611 }
3612
3613 #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:]
3614 fn test_digit_masculinerust-analyzer cargo chardetng 0.1.17 tests/test_digit_masculine().() {
3615 checkrust-analyzer cargo chardetng 0.1.17 tests/check().(" 42º ", WINDOWS_1252rust-analyzer cargo encoding_rs 0.8.35 WINDOWS_1252.);
3616 }
3617
3618 #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:]
3619 fn test_roman_femininerust-analyzer cargo chardetng 0.1.17 tests/test_roman_feminine().() {
3620 checkrust-analyzer cargo chardetng 0.1.17 tests/check().(" XIVª ", WINDOWS_1252rust-analyzer cargo encoding_rs 0.8.35 WINDOWS_1252.);
3621 }
3622
3623 #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:]
3624 fn test_roman_masculinerust-analyzer cargo chardetng 0.1.17 tests/test_roman_masculine().() {
3625 checkrust-analyzer cargo chardetng 0.1.17 tests/check().(" XIVº ", WINDOWS_1252rust-analyzer cargo encoding_rs 0.8.35 WINDOWS_1252.);
3626 }
3627
3628 #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:]
3629 fn test_numero_unorust-analyzer cargo chardetng 0.1.17 tests/test_numero_uno().() {
3630 checkrust-analyzer cargo chardetng 0.1.17 tests/check().("Nº1", WINDOWS_1252rust-analyzer cargo encoding_rs 0.8.35 WINDOWS_1252.);
3631 }
3632
3633 #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:]
3634 fn test_numerorust-analyzer cargo chardetng 0.1.17 tests/test_numero().() {
3635 checkrust-analyzer cargo chardetng 0.1.17 tests/check().("Nº", WINDOWS_1252rust-analyzer cargo encoding_rs 0.8.35 WINDOWS_1252.);
3636 }
3637
3638 #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:]
3639 fn test_eurorust-analyzer cargo chardetng 0.1.17 tests/test_euro().() {
3640 checkrust-analyzer cargo chardetng 0.1.17 tests/check().(" €9", WINDOWS_1252rust-analyzer cargo encoding_rs 0.8.35 WINDOWS_1252.);
3641 }
3642
3643 #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:]
3644 fn test_shift_jis_half_width_katakanarust-analyzer cargo chardetng 0.1.17 tests/test_shift_jis_half_width_katakana().() {
3645 checkrust-analyzer cargo chardetng 0.1.17 tests/check().("ハードウェアハードウェアハードウェアハードウェアハードウェア", SHIFT_JISrust-analyzer cargo encoding_rs 0.8.35 SHIFT_JIS.);
3646 }
3647
3648 #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:]
3649 fn test_big5_puarust-analyzer cargo chardetng 0.1.17 tests/test_big5_pua().() {
3650 let mut v = Vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/Vec#::newrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T>`]new().();
3651 for _ in 0..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/Range#40 {
3652 v.extend_from_slicerust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`]extend_from_slice().(b"\xA4\x40");
3653 }
3654 v.extend_from_slicerust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`]extend_from_slice().(b"\x81\x40\xA4\x40");
3655 check_bytesrust-analyzer cargo chardetng 0.1.17 tests/check_bytes().(&v, BIG5rust-analyzer cargo encoding_rs 0.8.35 BIG5.);
3656 }
3657
3658 #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:]
3659 fn test_big5_single_byte_a0rust-analyzer cargo chardetng 0.1.17 tests/test_big5_single_byte_a0().() {
3660 let mut v = Vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/Vec#::newrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T>`]new().();
3661 for _ in 0..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/Range#80 {
3662 v.extend_from_slicerust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`]extend_from_slice().(b"\xA4\x40");
3663 }
3664 v.extend_from_slicerust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`]extend_from_slice().(b"\x81\x40\xA0 ");
3665 check_bytesrust-analyzer cargo chardetng 0.1.17 tests/check_bytes().(&v, BIG5rust-analyzer cargo encoding_rs 0.8.35 BIG5.);
3666 }
3667
3668 #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:]
3669 fn test_big5_single_byte_ffrust-analyzer cargo chardetng 0.1.17 tests/test_big5_single_byte_ff().() {
3670 let mut v = Vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/Vec#::newrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T>`]new().();
3671 for _ in 0..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/Range#80 {
3672 v.extend_from_slicerust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`]extend_from_slice().(b"\xA4\x40");
3673 }
3674 v.extend_from_slicerust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`]extend_from_slice().(b"\x81\x40\xFF ");
3675 check_bytesrust-analyzer cargo chardetng 0.1.17 tests/check_bytes().(&v, BIG5rust-analyzer cargo encoding_rs 0.8.35 BIG5.);
3676 }
3677
3678 #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:]
3679 fn test_not_big5rust-analyzer cargo chardetng 0.1.17 tests/test_not_big5().() {
3680 let mut v = Vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/Vec#::newrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T>`]new().();
3681 for _ in 0..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/Range#40 {
3682 v.extend_from_slicerust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`]extend_from_slice().(b"\xA4\x40");
3683 }
3684 v.extend_from_slicerust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`]extend_from_slice().(b"\x81\x40\xA0\xA0");
3685 check_bytesrust-analyzer cargo chardetng 0.1.17 tests/check_bytes().(&v, IBM866rust-analyzer cargo encoding_rs 0.8.35 IBM866.);
3686 }
3687
3688 #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:]
3689 fn test_euc_kr_puarust-analyzer cargo chardetng 0.1.17 tests/test_euc_kr_pua().() {
3690 let mut v = Vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/Vec#::newrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T>`]new().();
3691 v.extend_from_slicerust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`]extend_from_slice().(b"\xC9\xA1\xB0\xA1 ");
3692 for _ in 0..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/Range#40 {
3693 v.extend_from_slicerust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`]extend_from_slice().(b"\xC5\xD7\xBD\xBA\xC6\xAE. ");
3694 }
3695 check_bytesrust-analyzer cargo chardetng 0.1.17 tests/check_bytes().(&v, EUC_KRrust-analyzer cargo encoding_rs 0.8.35 EUC_KR.);
3696 }
3697
3698 #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:]
3699 fn test_euc_kr_pua_bisrust-analyzer cargo chardetng 0.1.17 tests/test_euc_kr_pua_bis().() {
3700 let mut v = Vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/Vec#::newrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T>`]new().();
3701 v.extend_from_slicerust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`]extend_from_slice().(b"\xFE\xA1\xB0\xA1 ");
3702 for _ in 0..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/Range#40 {
3703 v.extend_from_slicerust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`]extend_from_slice().(b"\xC5\xD7\xBD\xBA\xC6\xAE. ");
3704 }
3705 check_bytesrust-analyzer cargo chardetng 0.1.17 tests/check_bytes().(&v, EUC_KRrust-analyzer cargo encoding_rs 0.8.35 EUC_KR.);
3706 }
3707
3708 #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:]
3709 fn test_euc_kr_single_byte_ffrust-analyzer cargo chardetng 0.1.17 tests/test_euc_kr_single_byte_ff().() {
3710 let mut v = Vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/Vec#::newrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T>`]new().();
3711 v.extend_from_slicerust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`]extend_from_slice().(b"\xFF ");
3712 for _ in 0..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/Range#40 {
3713 v.extend_from_slicerust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`]extend_from_slice().(b"\xC5\xD7\xBD\xBA\xC6\xAE. ");
3714 }
3715 check_bytesrust-analyzer cargo chardetng 0.1.17 tests/check_bytes().(&v, EUC_KRrust-analyzer cargo encoding_rs 0.8.35 EUC_KR.);
3716 }
3717
3718 #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:]
3719 fn test_euc_kr_single_byte_81rust-analyzer cargo chardetng 0.1.17 tests/test_euc_kr_single_byte_81().() {
3720 let mut v = Vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/Vec#::newrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T>`]new().();
3721 v.extend_from_slicerust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`]extend_from_slice().(b"\x81 ");
3722 for _ in 0..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/Range#40 {
3723 v.extend_from_slicerust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`]extend_from_slice().(b"\xC5\xD7\xBD\xBA\xC6\xAE. ");
3724 }
3725 check_bytesrust-analyzer cargo chardetng 0.1.17 tests/check_bytes().(&v, EUC_KRrust-analyzer cargo encoding_rs 0.8.35 EUC_KR.);
3726 }
3727
3728 #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:]
3729 fn test_euc_kr_single_byte_84rust-analyzer cargo chardetng 0.1.17 tests/test_euc_kr_single_byte_84().() {
3730 let mut v = Vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/Vec#::newrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T>`]new().();
3731 v.extend_from_slicerust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`]extend_from_slice().(b"\x84 ");
3732 for _ in 0..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/Range#40 {
3733 v.extend_from_slicerust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`]extend_from_slice().(b"\xC5\xD7\xBD\xBA\xC6\xAE. ");
3734 }
3735 check_bytesrust-analyzer cargo chardetng 0.1.17 tests/check_bytes().(&v, EUC_KRrust-analyzer cargo encoding_rs 0.8.35 EUC_KR.);
3736 }
3737
3738 #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:]
3739 fn test_not_euc_krrust-analyzer cargo chardetng 0.1.17 tests/test_not_euc_kr().() {
3740 let mut v = Vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/Vec#::newrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T>`]new().();
3741 v.extend_from_slicerust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`]extend_from_slice().(b"\xC9\xA0\xB0\xA1 ");
3742 for _ in 0..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/Range#40 {
3743 v.extend_from_slicerust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`]extend_from_slice().(b"\xC5\xD7\xBD\xBA\xC6\xAE. ");
3744 }
3745 check_bytesrust-analyzer cargo chardetng 0.1.17 tests/check_bytes().(&v, GBKrust-analyzer cargo encoding_rs 0.8.35 GBK.);
3746 }
3747
3748 #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:]
3749 fn test_shift_jis_x0213rust-analyzer cargo chardetng 0.1.17 tests/test_shift_jis_x0213().() {
3750 let mut v = Vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/Vec#::newrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T>`]new().();
3751 v.extend_from_slicerust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`]extend_from_slice().(b"\x87\xE5");
3752 for _ in 0..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/Range#40 {
3753 v.extend_from_slicerust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`]extend_from_slice().(b"\x82\xC9\x82\xD9\x82\xF1\x82\xB2");
3754 }
3755 check_bytesrust-analyzer cargo chardetng 0.1.17 tests/check_bytes().(&v, SHIFT_JISrust-analyzer cargo encoding_rs 0.8.35 SHIFT_JIS.);
3756 }
3757
3758 #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:]
3759 fn test_shift_jis_single_byte_fdrust-analyzer cargo chardetng 0.1.17 tests/test_shift_jis_single_byte_fd().() {
3760 let mut v = Vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/Vec#::newrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T>`]new().();
3761 v.extend_from_slicerust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`]extend_from_slice().(b"\xFD");
3762 for _ in 0..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/Range#40 {
3763 v.extend_from_slicerust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`]extend_from_slice().(b"\x82\xC9\x82\xD9\x82\xF1\x82\xB2");
3764 }
3765 check_bytesrust-analyzer cargo chardetng 0.1.17 tests/check_bytes().(&v, SHIFT_JISrust-analyzer cargo encoding_rs 0.8.35 SHIFT_JIS.);
3766 }
3767
3768 #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:]
3769 fn test_not_shift_jisrust-analyzer cargo chardetng 0.1.17 tests/test_not_shift_jis().() {
3770 let mut v = Vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/Vec#::newrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T>`]new().();
3771 v.extend_from_slicerust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`]extend_from_slice().(b"\x84\xE0");
3772 for _ in 0..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/Range#40 {
3773 v.extend_from_slicerust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`]extend_from_slice().(b"\x82\xC9\x82\xD9\x82\xF1\x82\xB2");
3774 }
3775 check_bytesrust-analyzer cargo chardetng 0.1.17 tests/check_bytes().(&v, GBKrust-analyzer cargo encoding_rs 0.8.35 GBK.);
3776 }
3777
3778 #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:]
3779 fn test_not_shift_jis_bisrust-analyzer cargo chardetng 0.1.17 tests/test_not_shift_jis_bis().() {
3780 let mut v = Vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/Vec#::newrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T>`]new().();
3781 v.extend_from_slicerust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`]extend_from_slice().(b"\x87\x7D");
3782 for _ in 0..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/Range#40 {
3783 v.extend_from_slicerust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`]extend_from_slice().(b"\x82\xC9\x82\xD9\x82\xF1\x82\xB2");
3784 }
3785 check_bytesrust-analyzer cargo chardetng 0.1.17 tests/check_bytes().(&v, GBKrust-analyzer cargo encoding_rs 0.8.35 GBK.);
3786 }
3787
3788 #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:]
3789 fn test_euc_jp_x0213rust-analyzer cargo chardetng 0.1.17 tests/test_euc_jp_x0213().() {
3790 let mut v = Vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/Vec#::newrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T>`]new().();
3791 v.extend_from_slicerust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`]extend_from_slice().(b"\xAD\xBF");
3792 for _ in 0..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/Range#80 {
3793 v.extend_from_slicerust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`]extend_from_slice().(b"\xA4\xCB\xA4\xDB\xA4\xF3\xA4\xB4");
3794 }
3795 check_bytesrust-analyzer cargo chardetng 0.1.17 tests/check_bytes().(&v, EUC_JPrust-analyzer cargo encoding_rs 0.8.35 EUC_JP.);
3796 }
3797
3798 #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:]
3799 fn test_euc_jp_x0213_other_planerust-analyzer cargo chardetng 0.1.17 tests/test_euc_jp_x0213_other_plane().() {
3800 let mut v = Vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/Vec#::newrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T>`]new().();
3801 v.extend_from_slicerust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`]extend_from_slice().(b"\x8F\xFE\xF6");
3802 for _ in 0..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/Range#80 {
3803 v.extend_from_slicerust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`]extend_from_slice().(b"\xA4\xCB\xA4\xDB\xA4\xF3\xA4\xB4");
3804 }
3805 check_bytesrust-analyzer cargo chardetng 0.1.17 tests/check_bytes().(&v, EUC_JPrust-analyzer cargo encoding_rs 0.8.35 EUC_JP.);
3806 }
3807
3808 #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:]
3809 fn test_not_euc_jprust-analyzer cargo chardetng 0.1.17 tests/test_not_euc_jp().() {
3810 let mut v = Vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/Vec#::newrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T>`]new().();
3811 v.extend_from_slicerust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`]extend_from_slice().(b"\x8F\xFE\xF7");
3812 for _ in 0..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/Range#80 {
3813 v.extend_from_slicerust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`]extend_from_slice().(b"\xA4\xCB\xA4\xDB\xA4\xF3\xA4\xB4");
3814 }
3815 check_bytesrust-analyzer cargo chardetng 0.1.17 tests/check_bytes().(&v, WINDOWS_1252rust-analyzer cargo encoding_rs 0.8.35 WINDOWS_1252.);
3816 }
3817
3818 #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:]
3819 fn test_not_euc_jp_bisrust-analyzer cargo chardetng 0.1.17 tests/test_not_euc_jp_bis().() {
3820 let mut v = Vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/Vec#::newrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T>`]new().();
3821 v.extend_from_slicerust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`]extend_from_slice().(b"\xA8\xDF");
3822 for _ in 0..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/Range#80 {
3823 v.extend_from_slicerust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`]extend_from_slice().(b"\xA4\xCB\xA4\xDB\xA4\xF3\xA4\xB4");
3824 }
3825 check_bytesrust-analyzer cargo chardetng 0.1.17 tests/check_bytes().(&v, BIG5rust-analyzer cargo encoding_rs 0.8.35 BIG5.);
3826 }
3827
3828 #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:]
3829 fn test_gbk_single_byte_ffrust-analyzer cargo chardetng 0.1.17 tests/test_gbk_single_byte_ff().() {
3830 let mut v = Vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/Vec#::newrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T>`]new().();
3831 v.extend_from_slicerust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`]extend_from_slice().(b"\xFF");
3832 for _ in 0..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/Range#80 {
3833 v.extend_from_slicerust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`]extend_from_slice().(b"\xB5\xC4");
3834 }
3835 check_bytesrust-analyzer cargo chardetng 0.1.17 tests/check_bytes().(&v, GBKrust-analyzer cargo encoding_rs 0.8.35 GBK.);
3836 }
3837
3838 #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:]
3839 fn test_gbk_single_byte_a0rust-analyzer cargo chardetng 0.1.17 tests/test_gbk_single_byte_a0().() {
3840 let mut v = Vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/Vec#::newrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T>`]new().();
3841 v.extend_from_slicerust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`]extend_from_slice().(b"\xA0 ");
3842 for _ in 0..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/Range#80 {
3843 v.extend_from_slicerust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`]extend_from_slice().(b"\xB5\xC4");
3844 }
3845 check_bytesrust-analyzer cargo chardetng 0.1.17 tests/check_bytes().(&v, GBKrust-analyzer cargo encoding_rs 0.8.35 GBK.);
3846 }
3847
3848 #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:]
3849 fn test_gbk_single_byte_ferust-analyzer cargo chardetng 0.1.17 tests/test_gbk_single_byte_fe().() {
3850 let mut v = Vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/Vec#::newrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T>`]new().();
3851 v.extend_from_slicerust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`]extend_from_slice().(b"\xFE ");
3852 for _ in 0..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/Range#80 {
3853 v.extend_from_slicerust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`]extend_from_slice().(b"\xB5\xC4");
3854 }
3855 check_bytesrust-analyzer cargo chardetng 0.1.17 tests/check_bytes().(&v, GBKrust-analyzer cargo encoding_rs 0.8.35 GBK.);
3856 }
3857
3858 #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:]
3859 fn test_not_gbk_single_byte_fcrust-analyzer cargo chardetng 0.1.17 tests/test_not_gbk_single_byte_fc().() {
3860 let mut v = Vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/Vec#::newrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T>`]new().();
3861 v.extend_from_slicerust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`]extend_from_slice().(b"\xFC ");
3862 for _ in 0..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/Range#80 {
3863 v.extend_from_slicerust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`]extend_from_slice().(b"\xB5\xC4");
3864 }
3865 check_bytesrust-analyzer cargo chardetng 0.1.17 tests/check_bytes().(&v, ISO_8859_5rust-analyzer cargo encoding_rs 0.8.35 ISO_8859_5.);
3866 }
3867 }