Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit29ecd77

Browse files
committed
Fix to work on Rust 1.24.0 again and remove unused imports.
1 parent98fd158 commit29ecd77

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

‎scripts/unicode.py‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -281,6 +281,7 @@ def emit_break_module(f, break_table, break_cats, name):
281281
f.write(""" }
282282
283283
fn bsearch_range_value_table(c: char, r: &'static [(char, char, %sCat)]) -> (u32, u32, %sCat) {
284+
use core;
284285
use core::cmp::Ordering::{Equal, Less, Greater};
285286
match r.binary_search_by(|&(lo, hi, _)| {
286287
if lo <= c && c <= hi { Equal }

‎src/grapheme.rs‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -566,7 +566,6 @@ impl GraphemeCursor {
566566
/// assert_eq!(cursor.next_boundary(&s[2..4], 2), Ok(None));
567567
/// ```
568568
pubfnnext_boundary(&mutself,chunk:&str,chunk_start:usize) ->Result<Option<usize>,GraphemeIncomplete>{
569-
use tables::graphemeas gr;
570569
ifself.offset ==self.len{
571570
returnOk(None);
572571
}
@@ -642,7 +641,6 @@ impl GraphemeCursor {
642641
/// assert_eq!(cursor.prev_boundary(&s[0..2], 0), Ok(None));
643642
/// ```
644643
pubfnprev_boundary(&mutself,chunk:&str,chunk_start:usize) ->Result<Option<usize>,GraphemeIncomplete>{
645-
use tables::graphemeas gr;
646644
ifself.offset ==0{
647645
returnOk(None);
648646
}

‎src/tables.rs‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -346,6 +346,7 @@ pub mod grapheme {
346346
}
347347

348348
fnbsearch_range_value_table(c:char,r:&'static[(char,char,GraphemeCat)]) ->(u32,u32,GraphemeCat){
349+
use core;
349350
use core::cmp::Ordering::{Equal,Less,Greater};
350351
match r.binary_search_by(|&(lo, hi, _)|{
351352
if lo <= c && c <= hi{Equal}
@@ -987,6 +988,7 @@ pub mod word {
987988
}
988989

989990
fnbsearch_range_value_table(c:char,r:&'static[(char,char,WordCat)]) ->(u32,u32,WordCat){
991+
use core;
990992
use core::cmp::Ordering::{Equal,Less,Greater};
991993
match r.binary_search_by(|&(lo, hi, _)|{
992994
if lo <= c && c <= hi{Equal}
@@ -1452,6 +1454,7 @@ pub mod emoji {
14521454
}
14531455

14541456
fnbsearch_range_value_table(c:char,r:&'static[(char,char,EmojiCat)]) ->(u32,u32,EmojiCat){
1457+
use core;
14551458
use core::cmp::Ordering::{Equal,Less,Greater};
14561459
match r.binary_search_by(|&(lo, hi, _)|{
14571460
if lo <= c && c <= hi{Equal}
@@ -1554,6 +1557,7 @@ pub mod sentence {
15541557
}
15551558

15561559
fnbsearch_range_value_table(c:char,r:&'static[(char,char,SentenceCat)]) ->(u32,u32,SentenceCat){
1560+
use core;
15571561
use core::cmp::Ordering::{Equal,Less,Greater};
15581562
match r.binary_search_by(|&(lo, hi, _)|{
15591563
if lo <= c && c <= hi{Equal}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp