File tree Expand file tree Collapse file tree 2 files changed +12
-2
lines changed
prebindgen-proc-macro/src Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Original file line number Diff line number Diff line change 2323 run : |
2424 rustup toolchain install ${{ matrix.rust }}
2525 rustup default ${{ matrix.rust }}
26+
27+ - name : Install Rust toolchain
28+ run : rustup component add rustfmt clippy
29+
30+ - name : Run clippy without default features
31+ run : cargo clippy --all-targets --no-default-features --all-features -- --deny warnings
32+
33+ - name : Run rustfmt
34+ run : cargo fmt --check -- --config "unstable_features=true,imports_granularity=Crate,group_imports=StdExternalCrate"
35+
2636 - name : Build
2737 run : cargo build
2838 - name : Run tests
Original file line number Diff line number Diff line change @@ -109,7 +109,7 @@ impl Parse for PrebindgenArgs {
109109}
110110
111111thread_local ! {
112- static THREAD_ID : std:: cell:: RefCell <Option <u64 >> = std:: cell:: RefCell :: new( None ) ;
112+ static THREAD_ID : std:: cell:: RefCell <Option <u64 >> = const { std:: cell:: RefCell :: new( None ) } ;
113113 static JSONL_PATHS : std:: cell:: RefCell <HashMap <String , std:: path:: PathBuf >> = std:: cell:: RefCell :: new( HashMap :: new( ) ) ;
114114}
115115
@@ -271,7 +271,7 @@ pub fn prebindgen(args: TokenStream, input: TokenStream) -> TokenStream {
271271
272272 // Get the full path to the JSONL file
273273 let file_path = get_prebindgen_jsonl_path ( & group) ;
274- if let Err ( _ ) = prebindgen:: utils:: write_to_jsonl_file ( & file_path, & [ & new_record] ) {
274+ if prebindgen:: utils:: write_to_jsonl_file ( & file_path, & [ & new_record] ) . is_err ( ) {
275275 return TokenStream :: from ( quote ! {
276276 compile_error!( "Failed to write prebindgen record" ) ;
277277 } ) ;
You can’t perform that action at this time.
0 commit comments