Another batch of lint fixes (#36521)
- **Enable a bunch of extra lints** - **First batch of fixes** - **More fixes** Release Notes: - N/A
This commit is contained in:
parent
69b1c6d6f5
commit
6825715503
147 changed files with 788 additions and 1042 deletions
|
@ -19,7 +19,7 @@ use util::ResultExt;
|
|||
use workspace::{ModalView, Workspace};
|
||||
use zed_actions::agent::OpenSettings;
|
||||
|
||||
const FEATURED_PROVIDERS: [&'static str; 4] = ["anthropic", "google", "openai", "ollama"];
|
||||
const FEATURED_PROVIDERS: [&str; 4] = ["anthropic", "google", "openai", "ollama"];
|
||||
|
||||
fn render_llm_provider_section(
|
||||
tab_index: &mut isize,
|
||||
|
@ -410,7 +410,7 @@ impl AiPrivacyTooltip {
|
|||
|
||||
impl Render for AiPrivacyTooltip {
|
||||
fn render(&mut self, window: &mut Window, cx: &mut Context<Self>) -> impl IntoElement {
|
||||
const DESCRIPTION: &'static str = "We believe in opt-in data sharing as the default for building AI products, rather than opt-out. We'll only use or store your data if you affirmatively send it to us. ";
|
||||
const DESCRIPTION: &str = "We believe in opt-in data sharing as the default for building AI products, rather than opt-out. We'll only use or store your data if you affirmatively send it to us. ";
|
||||
|
||||
tooltip_container(window, cx, move |this, _, _| {
|
||||
this.child(
|
||||
|
|
|
@ -16,8 +16,8 @@ use vim_mode_setting::VimModeSetting;
|
|||
|
||||
use crate::theme_preview::{ThemePreviewStyle, ThemePreviewTile};
|
||||
|
||||
const LIGHT_THEMES: [&'static str; 3] = ["One Light", "Ayu Light", "Gruvbox Light"];
|
||||
const DARK_THEMES: [&'static str; 3] = ["One Dark", "Ayu Dark", "Gruvbox Dark"];
|
||||
const LIGHT_THEMES: [&str; 3] = ["One Light", "Ayu Light", "Gruvbox Light"];
|
||||
const DARK_THEMES: [&str; 3] = ["One Dark", "Ayu Dark", "Gruvbox Dark"];
|
||||
const FAMILY_NAMES: [SharedString; 3] = [
|
||||
SharedString::new_static("One"),
|
||||
SharedString::new_static("Ayu"),
|
||||
|
@ -114,7 +114,7 @@ fn render_theme_section(tab_index: &mut isize, cx: &mut App) -> impl IntoElement
|
|||
|
||||
let themes = theme_names.map(|theme| theme_registry.get(theme).unwrap());
|
||||
|
||||
let theme_previews = [0, 1, 2].map(|index| {
|
||||
[0, 1, 2].map(|index| {
|
||||
let theme = &themes[index];
|
||||
let is_selected = theme.name == current_theme_name;
|
||||
let name = theme.name.clone();
|
||||
|
@ -176,9 +176,7 @@ fn render_theme_section(tab_index: &mut isize, cx: &mut App) -> impl IntoElement
|
|||
.color(Color::Muted)
|
||||
.size(LabelSize::Small),
|
||||
)
|
||||
});
|
||||
|
||||
theme_previews
|
||||
})
|
||||
}
|
||||
|
||||
fn write_mode_change(mode: ThemeMode, cx: &mut App) {
|
||||
|
|
|
@ -605,7 +605,7 @@ fn render_popular_settings_section(
|
|||
window: &mut Window,
|
||||
cx: &mut App,
|
||||
) -> impl IntoElement {
|
||||
const LIGATURE_TOOLTIP: &'static str =
|
||||
const LIGATURE_TOOLTIP: &str =
|
||||
"Font ligatures combine two characters into one. For example, turning =/= into ≠.";
|
||||
|
||||
v_flex()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue