Squelch warnings for now
This commit is contained in:
parent
379652f074
commit
196946cbb6
4 changed files with 15 additions and 9 deletions
|
@ -857,7 +857,6 @@ mod tests {
|
||||||
let project = Project::test(fs.clone(), ["/test".as_ref()], cx).await;
|
let project = Project::test(fs.clone(), ["/test".as_ref()], cx).await;
|
||||||
let window = cx.add_window(|cx| Workspace::test_new(project.clone(), cx));
|
let window = cx.add_window(|cx| Workspace::test_new(project.clone(), cx));
|
||||||
let workspace = window.root(cx);
|
let workspace = window.root(cx);
|
||||||
let window_id = window.window_id();
|
|
||||||
|
|
||||||
// Create some diagnostics
|
// Create some diagnostics
|
||||||
project.update(cx, |project, cx| {
|
project.update(cx, |project, cx| {
|
||||||
|
@ -944,7 +943,7 @@ mod tests {
|
||||||
});
|
});
|
||||||
|
|
||||||
// Open the project diagnostics view while there are already diagnostics.
|
// Open the project diagnostics view while there are already diagnostics.
|
||||||
let view = cx.add_view(window_id, |cx| {
|
let view = window.add_view(cx, |cx| {
|
||||||
ProjectDiagnosticsEditor::new(project.clone(), workspace.downgrade(), cx)
|
ProjectDiagnosticsEditor::new(project.clone(), workspace.downgrade(), cx)
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
#![allow(dead_code)]
|
||||||
|
|
||||||
use smallvec::SmallVec;
|
use smallvec::SmallVec;
|
||||||
|
|
||||||
pub fn rgb(hex: u32) -> Rgba {
|
pub fn rgb(hex: u32) -> Rgba {
|
||||||
|
@ -70,10 +72,12 @@ impl From<Rgba> for Hsla {
|
||||||
let delta = max - min;
|
let delta = max - min;
|
||||||
|
|
||||||
let l = (max + min) / 2.0;
|
let l = (max + min) / 2.0;
|
||||||
let s = match l {
|
let s = if l == 0.0 || l == 1.0 {
|
||||||
0.0 | 1.0 => 0.0,
|
0.0
|
||||||
l if l < 0.5 => delta / (2.0 * l),
|
} else if l < 0.5 {
|
||||||
l => delta / (2.0 - 2.0 * l),
|
delta / (2.0 * l)
|
||||||
|
} else {
|
||||||
|
delta / (2.0 - 2.0 * l)
|
||||||
};
|
};
|
||||||
|
|
||||||
let h = if delta == 0.0 {
|
let h = if delta == 0.0 {
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
#![allow(unused_variables, dead_code)]
|
||||||
|
|
||||||
use derive_more::{Add, Deref, DerefMut};
|
use derive_more::{Add, Deref, DerefMut};
|
||||||
use gpui::elements::layout_highlighted_chunks;
|
use gpui::elements::layout_highlighted_chunks;
|
||||||
use gpui::Entity;
|
use gpui::Entity;
|
||||||
|
@ -644,7 +646,7 @@ impl Size<Rems> {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, Default, Debug)]
|
#[derive(Clone, Default, Debug)]
|
||||||
struct Edges<T> {
|
pub struct Edges<T> {
|
||||||
top: T,
|
top: T,
|
||||||
bottom: T,
|
bottom: T,
|
||||||
left: T,
|
left: T,
|
||||||
|
@ -1498,12 +1500,11 @@ impl View for ViewFn {
|
||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod tests {
|
mod tests {
|
||||||
use crate::themes::rose_pine::{self, RosePineThemes};
|
|
||||||
|
|
||||||
use super::{
|
use super::{
|
||||||
length::{auto, rems},
|
length::{auto, rems},
|
||||||
*,
|
*,
|
||||||
};
|
};
|
||||||
|
use crate::themes::rose_pine;
|
||||||
use gpui::TestAppContext;
|
use gpui::TestAppContext;
|
||||||
|
|
||||||
#[gpui::test]
|
#[gpui::test]
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
#![allow(dead_code, unused_variables)]
|
||||||
|
|
||||||
use gpui::{AnyElement, Element, LayoutContext, View, ViewContext};
|
use gpui::{AnyElement, Element, LayoutContext, View, ViewContext};
|
||||||
use node::{length::auto, *};
|
use node::{length::auto, *};
|
||||||
use std::{borrow::Cow, cell::RefCell, marker::PhantomData, rc::Rc};
|
use std::{borrow::Cow, cell::RefCell, marker::PhantomData, rc::Rc};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue