@@ -250,8 +250,8 @@ impl ScanPaths {
250250/// The current configuration for an instrument
251251impl CurrentConfiguration {
252252 /// The name of the instrument
253- pub async fn instrument ( & self ) -> async_graphql :: Result < & str > {
254- Ok ( self . db_config . name ( ) )
253+ pub async fn instrument ( & self ) -> & str {
254+ self . db_config . name ( )
255255 }
256256 /// The template used to build the path to the data directory for an instrument
257257 pub async fn directory_template ( & self ) -> async_graphql:: Result < String > {
@@ -270,19 +270,19 @@ impl CurrentConfiguration {
270270 /// The latest scan number stored in the DB. This is the last scan number provided by this
271271 /// service but may not reflect the most recent scan number for an instrument if an external
272272 /// service (eg GDA) has incremented its own number tracker.
273- pub async fn db_scan_number ( & self ) -> async_graphql :: Result < u32 > {
274- Ok ( self . db_config . scan_number ( ) )
273+ pub async fn db_scan_number ( & self ) -> u32 {
274+ self . db_config . scan_number ( )
275275 }
276276 /// The highest matching number file for this instrument in the configured tracking directory.
277277 /// May be null if no directory is available for this instrument or if there are no matching
278278 /// number files.
279- pub async fn file_scan_number ( & self ) -> async_graphql :: Result < Option < u32 > > {
280- Ok ( self . high_file )
279+ pub async fn file_scan_number ( & self ) -> Option < u32 > {
280+ self . high_file
281281 }
282282 /// The file extension used for the file based tracking, eg using an extension of 'ext'
283283 /// would create files `1.ext`, `2.ext` etc
284- pub async fn tracker_file_extension ( & self ) -> async_graphql :: Result < Option < & str > > {
285- Ok ( self . db_config . tracker_file_extension ( ) )
284+ pub async fn tracker_file_extension ( & self ) -> Option < & str > {
285+ self . db_config . tracker_file_extension ( )
286286 }
287287}
288288
0 commit comments