@@ -33,11 +33,11 @@ pub enum OutputFormat {
3333impl std:: fmt:: Display for OutputFormat {
3434 fn fmt ( & self , f : & mut std:: fmt:: Formatter < ' _ > ) -> std:: fmt:: Result {
3535 match self {
36- OutputFormat :: Json => write ! ( f, "json" ) ,
37- OutputFormat :: Pretty => write ! ( f, "pretty" ) ,
38- OutputFormat :: Compact => write ! ( f, "compact" ) ,
39- OutputFormat :: Markdown => write ! ( f, "markdown" ) ,
40- OutputFormat :: Csv => write ! ( f, "csv" ) ,
36+ Self :: Json => write ! ( f, "json" ) ,
37+ Self :: Pretty => write ! ( f, "pretty" ) ,
38+ Self :: Compact => write ! ( f, "compact" ) ,
39+ Self :: Markdown => write ! ( f, "markdown" ) ,
40+ Self :: Csv => write ! ( f, "csv" ) ,
4141 }
4242 }
4343}
@@ -57,10 +57,10 @@ pub enum QuickOutputFormat {
5757impl std:: fmt:: Display for QuickOutputFormat {
5858 fn fmt ( & self , f : & mut std:: fmt:: Formatter < ' _ > ) -> std:: fmt:: Result {
5959 match self {
60- QuickOutputFormat :: Json => write ! ( f, "json" ) ,
61- QuickOutputFormat :: Pretty => write ! ( f, "pretty" ) ,
62- QuickOutputFormat :: Compact => write ! ( f, "compact" ) ,
63- QuickOutputFormat :: Markdown => write ! ( f, "markdown" ) ,
60+ Self :: Json => write ! ( f, "json" ) ,
61+ Self :: Pretty => write ! ( f, "pretty" ) ,
62+ Self :: Compact => write ! ( f, "compact" ) ,
63+ Self :: Markdown => write ! ( f, "markdown" ) ,
6464 }
6565 }
6666}
@@ -76,10 +76,10 @@ pub enum AssistantOutputFormat {
7676impl std:: fmt:: Display for AssistantOutputFormat {
7777 fn fmt ( & self , f : & mut std:: fmt:: Formatter < ' _ > ) -> std:: fmt:: Result {
7878 match self {
79- AssistantOutputFormat :: Json => write ! ( f, "json" ) ,
80- AssistantOutputFormat :: Pretty => write ! ( f, "pretty" ) ,
81- AssistantOutputFormat :: Compact => write ! ( f, "compact" ) ,
82- AssistantOutputFormat :: Markdown => write ! ( f, "markdown" ) ,
79+ Self :: Json => write ! ( f, "json" ) ,
80+ Self :: Pretty => write ! ( f, "pretty" ) ,
81+ Self :: Compact => write ! ( f, "compact" ) ,
82+ Self :: Markdown => write ! ( f, "markdown" ) ,
8383 }
8484 }
8585}
@@ -107,7 +107,7 @@ pub enum LensTemplate {
107107}
108108
109109impl LensTemplate {
110- pub fn as_form_value ( & self ) -> & ' static str {
110+ pub const fn as_form_value ( & self ) -> & ' static str {
111111 match self {
112112 Self :: Default => "0" ,
113113 Self :: News => "1" ,
@@ -122,7 +122,7 @@ pub enum NewsFilterMode {
122122}
123123
124124impl NewsFilterMode {
125- pub fn as_str ( & self ) -> & ' static str {
125+ pub const fn as_str ( & self ) -> & ' static str {
126126 match self {
127127 Self :: Hide => "hide" ,
128128 Self :: Blur => "blur" ,
@@ -138,7 +138,7 @@ pub enum NewsFilterScope {
138138}
139139
140140impl NewsFilterScope {
141- pub fn as_str ( & self ) -> & ' static str {
141+ pub const fn as_str ( & self ) -> & ' static str {
142142 match self {
143143 Self :: Title => "title" ,
144144 Self :: Summary => "summary" ,
@@ -199,7 +199,7 @@ pub enum Commands {
199199 AskPage ( AskPageArgs ) ,
200200 /// Translate text through Kagi Translate using session-token auth
201201 Translate ( Box < TranslateArgs > ) ,
202- /// Answer a query with Kagi's FastGPT API
202+ /// Answer a query with Kagi's ` FastGPT` API
203203 Fastgpt ( FastGptArgs ) ,
204204 /// Query Kagi's enrichment indexes
205205 Enrich ( EnrichCommand ) ,
@@ -246,13 +246,13 @@ pub struct SearchArgs {
246246 /// Scope search to a Kagi lens by numeric index (e.g., "0", "1", "2").
247247 ///
248248 /// Lens indices are user-specific. Find yours by:
249- /// 1. Visit https://kagi.com/settings/lenses to see enabled lenses
249+ /// 1. Visit < https://kagi.com/settings/lenses> to see enabled lenses
250250 /// 2. Search in Kagi web UI with a lens active
251251 /// 3. Check the URL for the "l=" parameter value
252252 #[ arg( long, value_name = "INDEX" ) ]
253253 pub lens : Option < String > ,
254254
255- /// Restrict results to a Kagi region code such as "us", "gb", or "no_region"
255+ /// Restrict results to a Kagi region code such as "us", "gb", or "` no_region` "
256256 #[ arg( long, value_name = "REGION" ) ]
257257 pub region : Option < String > ,
258258
@@ -315,7 +315,7 @@ pub struct BatchSearchArgs {
315315 #[ arg( long, value_name = "INDEX" ) ]
316316 pub lens : Option < String > ,
317317
318- /// Restrict results to a Kagi region code such as "us", "gb", or "no_region"
318+ /// Restrict results to a Kagi region code such as "us", "gb", or "` no_region` "
319319 #[ arg( long, value_name = "REGION" ) ]
320320 pub region : Option < String > ,
321321
@@ -505,7 +505,7 @@ impl NewsArgs {
505505 Ok ( ( ) )
506506 }
507507
508- pub fn has_filter_inputs ( & self ) -> bool {
508+ pub const fn has_filter_inputs ( & self ) -> bool {
509509 !self . filter_preset . is_empty ( ) || !self . filter_keyword . is_empty ( )
510510 }
511511}
@@ -799,7 +799,7 @@ pub struct TranslateArgs {
799799 #[ arg( long) ]
800800 pub preserve_formatting : Option < bool > ,
801801
802- /// Raw JSON array passed through as context_memory
802+ /// Raw JSON array passed through as ` context_memory`
803803 #[ arg( long, value_name = "JSON" ) ]
804804 pub context_memory_json : Option < String > ,
805805
@@ -849,7 +849,7 @@ pub struct EnrichCommand {
849849pub enum EnrichSubcommand {
850850 /// Query Kagi's Teclis web enrichment index
851851 Web ( EnrichArgs ) ,
852- /// Query Kagi's TinyGem news enrichment index
852+ /// Query Kagi's ` TinyGem` news enrichment index
853853 News ( EnrichArgs ) ,
854854}
855855
0 commit comments