File tree Expand file tree Collapse file tree 3 files changed +22
-16
lines changed Expand file tree Collapse file tree 3 files changed +22
-16
lines changed Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ refs/tags/0.9: 36870b185fc5f5486636d4515f0e22677493f225
23
23
refs/tags/0.10: ac33f2b15782272ae348dbd7b14b8257b2148b5a
24
24
refs/tags/0.11.0: e1247cb1d0d681be034adb4b558b5a0c0d5720f9
25
25
refs/tags/0.12.0: f0c419429ef30723ceaf6b42f9b5a2aeb5d2e2d1
26
- refs/heads/beta: 370fe2786109360f7c35b8ba552b83b773dd71d6
26
+ refs/heads/beta: 52e7f5553e85cc939b25b478f83c32b91dc3885e
27
27
refs/tags/1.0.0-alpha: e42bd6d93a1d3433c486200587f8f9e12590a4d7
28
28
refs/heads/tmp: 370fe2786109360f7c35b8ba552b83b773dd71d6
29
29
refs/tags/1.0.0-alpha.2: 4c705f6bc559886632d3871b04f58aab093bfa2f
Original file line number Diff line number Diff line change @@ -190,7 +190,7 @@ impl<'a> Parser<'a> {
190
190
/// String, but I think it does when this eventually uses conditions so it
191
191
/// might as well start using it now.
192
192
fn err ( & mut self , msg : & str ) {
193
- self . errors . push ( msg. to_owned ( ) ) ;
193
+ self . errors . push ( msg. to_string ( ) ) ;
194
194
}
195
195
196
196
/// Optionally consumes the specified character. If the character is not at
@@ -353,7 +353,7 @@ impl<'a> Parser<'a> {
353
353
} else {
354
354
spec. ty = self . word ( ) ;
355
355
}
356
- spec
356
+ return spec;
357
357
}
358
358
359
359
/// Parses a Count parameter at the current position. This does not check
@@ -417,19 +417,25 @@ impl<'a> Parser<'a> {
417
417
fn integer ( & mut self ) -> Option < usize > {
418
418
let mut cur = 0 ;
419
419
let mut found = false ;
420
- while let Some ( ( _, c) ) = self . cur . clone ( ) . next ( ) {
421
- if let Some ( i) = c. to_digit ( 10 ) {
422
- cur = cur * 10 + i as usize ;
423
- found = true ;
424
- self . cur . next ( ) ;
425
- } else {
426
- break
420
+ loop {
421
+ match self . cur . clone ( ) . next ( ) {
422
+ Some ( ( _, c) ) => {
423
+ match c. to_digit ( 10 ) {
424
+ Some ( i) => {
425
+ cur = cur * 10 + i as usize ;
426
+ found = true ;
427
+ self . cur . next ( ) ;
428
+ }
429
+ None => { break }
430
+ }
431
+ }
432
+ None => { break }
427
433
}
428
434
}
429
435
if found {
430
- Some ( cur)
436
+ return Some ( cur) ;
431
437
} else {
432
- None
438
+ return None ;
433
439
}
434
440
}
435
441
}
Original file line number Diff line number Diff line change @@ -65,11 +65,11 @@ pub struct stat {
65
65
#[ stable( feature = "raw_ext" , since = "1.1.0" ) ]
66
66
pub st_flags : fflags_t ,
67
67
#[ stable( feature = "raw_ext" , since = "1.1.0" ) ]
68
- pub st_gen : uint32_t ,
68
+ pub st_gen : u32 ,
69
69
#[ stable( feature = "raw_ext" , since = "1.1.0" ) ]
70
- pub st_lspare : int32_t ,
70
+ pub st_lspare : i32 ,
71
71
#[ stable( feature = "raw_ext" , since = "1.1.0" ) ]
72
- pub st_qspare1 : int64_t ,
72
+ pub st_qspare1 : i64 ,
73
73
#[ stable( feature = "raw_ext" , since = "1.1.0" ) ]
74
- pub st_qspare2 : int64_t ,
74
+ pub st_qspare2 : i64 ,
75
75
}
You can’t perform that action at this time.
0 commit comments