File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change 9
9
- master
10
10
11
11
jobs :
12
- rustfmt :
12
+ rustfmt-clippy :
13
13
runs-on : ubuntu-latest
14
14
15
15
steps :
Original file line number Diff line number Diff line change @@ -652,6 +652,7 @@ impl Cursor {
652
652
pub fn enum_val_signed ( & self ) -> Option < i64 > {
653
653
unsafe {
654
654
if self . kind ( ) == CXCursor_EnumConstantDecl {
655
+ #[ allow( clippy:: unnecessary_cast) ]
655
656
Some ( clang_getEnumConstantDeclValue ( self . x ) as i64 )
656
657
} else {
657
658
None
@@ -665,6 +666,7 @@ impl Cursor {
665
666
pub fn enum_val_unsigned ( & self ) -> Option < u64 > {
666
667
unsafe {
667
668
if self . kind ( ) == CXCursor_EnumConstantDecl {
669
+ #[ allow( clippy:: unnecessary_cast) ]
668
670
Some ( clang_getEnumConstantDeclUnsignedValue ( self . x ) as u64 )
669
671
} else {
670
672
None
@@ -2134,7 +2136,7 @@ impl EvalResult {
2134
2136
pub fn as_double ( & self ) -> Option < f64 > {
2135
2137
match self . kind ( ) {
2136
2138
CXEval_Float => {
2137
- Some ( unsafe { clang_EvalResult_getAsDouble ( self . x ) } as f64 )
2139
+ Some ( unsafe { clang_EvalResult_getAsDouble ( self . x ) } )
2138
2140
}
2139
2141
_ => None ,
2140
2142
}
@@ -2162,6 +2164,7 @@ impl EvalResult {
2162
2164
if value < i64:: min_value ( ) as c_longlong {
2163
2165
return None ;
2164
2166
}
2167
+ #[ allow( clippy:: unnecessary_cast) ]
2165
2168
Some ( value as i64 )
2166
2169
}
2167
2170
You can’t perform that action at this time.
0 commit comments