mirror of
https://github.com/zed-industries/zed.git
synced 2025-01-10 20:41:59 +00:00
Fix rustfmt by pulling out long string into constant
This commit is contained in:
parent
1cbdf2ba22
commit
62f5becf1f
1 changed files with 34 additions and 33 deletions
|
@ -282,6 +282,8 @@ impl EventEmitter<ViewEvent> for ProjectSearchView {}
|
|||
|
||||
impl Render for ProjectSearchView {
|
||||
fn render(&mut self, cx: &mut ViewContext<Self>) -> impl IntoElement {
|
||||
const PLEASE_AUTHENTICATE: &str = "API Key Missing: Please set 'OPENAI_API_KEY' in Environment Variables. If you authenticated using the Assistant Panel, please restart Zed to Authenticate.";
|
||||
|
||||
if self.has_matches() {
|
||||
div()
|
||||
.flex_1()
|
||||
|
@ -307,8 +309,7 @@ impl Render for ProjectSearchView {
|
|||
SemanticIndexStatus::NotAuthenticated => {
|
||||
major_text = Label::new("Not Authenticated");
|
||||
show_minor_text = false;
|
||||
Some(
|
||||
"API Key Missing: Please set 'OPENAI_API_KEY' in Environment Variables. If you authenticated using the Assistant Panel, please restart Zed to Authenticate.".to_string())
|
||||
Some(PLEASE_AUTHENTICATE.to_string())
|
||||
}
|
||||
SemanticIndexStatus::Indexed => Some("Indexing complete".to_string()),
|
||||
SemanticIndexStatus::Indexing {
|
||||
|
|
Loading…
Reference in a new issue