File tree Expand file tree Collapse file tree 11 files changed +17
-13
lines changed
tests/mock-inference-provider/src Expand file tree Collapse file tree 11 files changed +17
-13
lines changed Original file line number Diff line number Diff line change @@ -75,6 +75,7 @@ allow_attributes = "deny"
7575dbg_macro = " deny"
7676expect_used = " deny"
7777if_not_else = " deny"
78+ ignored_unit_patterns = " deny"
7879manual_string_new = " deny"
7980match_bool = " deny"
8081needless_raw_string_hashes = " deny"
Original file line number Diff line number Diff line change @@ -1573,7 +1573,7 @@ impl AsyncTensorZeroGateway {
15731573 pyo3_async_runtimes:: tokio:: future_into_py ( this. py ( ) , async move {
15741574 let res = client. delete_datapoint ( dataset_name, datapoint_id) . await ;
15751575 Python :: with_gil ( |py| match res {
1576- Ok ( _ ) => Ok ( ( ) ) ,
1576+ Ok ( ( ) ) => Ok ( ( ) ) ,
15771577 Err ( e) => Err ( convert_error ( py, e) ) ,
15781578 } )
15791579 } )
Original file line number Diff line number Diff line change @@ -135,6 +135,7 @@ pub(crate) async fn evaluate_inference(
135135 } )
136136 . await
137137 {
138+ #[ expect( clippy:: ignored_unit_patterns) ]
138139 Ok ( _) => {
139140 debug ! ( evaluator_name = %evaluator_name, "Feedback sent successfully" ) ;
140141 } ,
Original file line number Diff line number Diff line change @@ -25,7 +25,9 @@ async fn main() -> Result<()> {
2525 let result = run_evaluation ( args, evaluation_run_id, & mut writer) . await ;
2626
2727 match & result {
28- Ok ( _) => info ! ( evaluation_run_id = %evaluation_run_id, "Evaluation completed successfully" ) ,
28+ Ok ( ( ) ) => {
29+ info ! ( evaluation_run_id = %evaluation_run_id, "Evaluation completed successfully" ) ;
30+ }
2931 Err ( e) => {
3032 tracing:: error!( evaluation_run_id = %evaluation_run_id, error = %e, "Evaluation failed" ) ;
3133 }
Original file line number Diff line number Diff line change @@ -393,13 +393,13 @@ pub async fn shutdown_signal() {
393393 let hangup = std:: future:: pending :: < ( ) > ( ) ;
394394
395395 tokio:: select! {
396- _ = ctrl_c => {
396+ ( ) = ctrl_c => {
397397 tracing:: info!( "Received Ctrl+C signal" ) ;
398398 }
399- _ = terminate => {
399+ ( ) = terminate => {
400400 tracing:: info!( "Received SIGTERM signal" ) ;
401401 }
402- _ = hangup => {
402+ ( ) = hangup => {
403403 tokio:: time:: sleep( std:: time:: Duration :: from_secs( 1 ) ) . await ;
404404 tracing:: info!( "Received SIGHUP signal" ) ;
405405 }
Original file line number Diff line number Diff line change @@ -57,7 +57,7 @@ tokio::task_local! {
5757pub fn skip_credential_validation ( ) -> bool {
5858 // tokio::task_local doesn't have an 'is_set' method, so we call 'try_with'
5959 // (which returns an `Err` if the task-local is not set)
60- SKIP_CREDENTIAL_VALIDATION . try_with ( |_ | ( ) ) . is_ok ( )
60+ SKIP_CREDENTIAL_VALIDATION . try_with ( |( ) | ( ) ) . is_ok ( )
6161}
6262
6363#[ derive( Debug , Default , Serialize ) ]
Original file line number Diff line number Diff line change @@ -48,7 +48,7 @@ pub async fn render_samples<T: StoredSample>(
4848 // Filter out examples where reresolve_input_for_fine_tuning failed.
4949 // If resolution_result is Ok, map Some(()) to Some(example).
5050 // If resolution_result is Err, .ok() yields None, so filter_map drops it.
51- resolution_result. ok ( ) . map ( |_ | example)
51+ resolution_result. ok ( ) . map ( |( ) | example)
5252 } )
5353 . filter_map ( |resolved_example| {
5454 // resolved_example is a StoredInference that was successfully processed by reresolve.
Original file line number Diff line number Diff line change @@ -387,7 +387,7 @@ impl FunctionConfig {
387387 // If the parsed output fails validation, we log the error and set `parsed_output` to None
388388 let parsed_output = match parsed_output {
389389 Some ( parsed_output) => match output_schema. validate ( & parsed_output) . await {
390- Ok ( _ ) => Some ( parsed_output) ,
390+ Ok ( ( ) ) => Some ( parsed_output) ,
391391 Err ( _) => None ,
392392 } ,
393393 None => None ,
Original file line number Diff line number Diff line change @@ -57,7 +57,7 @@ pub async fn howdy_loop(clickhouse: ClickHouseConnectionInfo) {
5757 let client = Client :: new ( ) ;
5858 let deployment_id = match get_deployment_id ( & clickhouse) . await {
5959 Ok ( deployment_id) => deployment_id,
60- Err ( _ ) => {
60+ Err ( ( ) ) => {
6161 return ;
6262 }
6363 } ;
Original file line number Diff line number Diff line change @@ -497,7 +497,7 @@ impl InferenceProvider for OpenAIProvider {
497497 get_batch_url ( self . api_base . as_ref ( ) . unwrap_or ( & OPENAI_DEFAULT_BASE_URL ) ) ?;
498498 request_url
499499 . path_segments_mut ( )
500- . map_err ( |_ | {
500+ . map_err ( |( ) | {
501501 Error :: new ( ErrorDetails :: Inference {
502502 message : "Failed to get mutable path segments" . to_string ( ) ,
503503 } )
You can’t perform that action at this time.
0 commit comments