@@ -151,11 +151,14 @@ async fn execution_submit(
151151}
152152
153153pub ( crate ) mod components {
154+ use super :: {
155+ Arc , Deserialize , ExecutionIdAccept , FunctionFqn , IntoResponse , Json , Query , Response ,
156+ Serialize , State , WebApiState , json,
157+ } ;
154158 use concepts:: {
155159 ComponentId , ComponentType , FunctionExtension , FunctionMetadata , ParameterType ,
156160 } ;
157-
158- use super :: * ;
161+ use std:: fmt:: Write as _;
159162
160163 #[ derive( Deserialize , Debug ) ]
161164 pub ( crate ) struct ComponentsListParams {
@@ -177,14 +180,14 @@ pub(crate) mod components {
177180 let mut components = state. component_registry_ro . list ( extensions) ;
178181
179182 if let Some ( name) = params. name {
180- components. retain ( |c| c. component_id . name . as_ref ( ) == & name) ;
183+ components. retain ( |c| c. component_id . name . as_ref ( ) == name) ;
181184 }
182185 if let Some ( digest) = params. digest {
183186 components
184- . retain ( |c| c. component_id . input_digest . digest_base16_without_prefix ( ) == digest)
187+ . retain ( |c| c. component_id . input_digest . digest_base16_without_prefix ( ) == digest) ;
185188 }
186189 if let Some ( ty) = params. r#type {
187- components. retain ( |c| c. component_id . component_type == ty)
190+ components. retain ( |c| c. component_id . component_type == ty) ;
188191 }
189192 let exports = params. exports . unwrap_or_default ( ) ;
190193 let imports = params. imports . unwrap_or_default ( ) ;
@@ -209,7 +212,7 @@ pub(crate) mod components {
209212 if export. extension . is_none ( ) {
210213 exports. push ( FunctionMetadataLite :: from ( export) ) ;
211214 } else if extensions {
212- exports_ext. push ( FunctionMetadataLite :: from ( export) )
215+ exports_ext. push ( FunctionMetadataLite :: from ( export) ) ;
213216 }
214217 }
215218
@@ -244,7 +247,7 @@ pub(crate) mod components {
244247 ExecutionIdAccept :: Text => {
245248 let mut output = String :: new ( ) ;
246249 for component in components {
247- output += & format ! ( "{}\n " , component. component_id) ;
250+ writeln ! ( output , "{}" , component. component_id) . expect ( "writing to string" ) ;
248251 }
249252 output. into_response ( )
250253 }
0 commit comments