Another pass of #[allow()] removal (#3825)
We still have a bunch of leftovers in ui2/theme2 and in gpui2 display_link module. Release Notes: - N/A
This commit is contained in:
parent
1c20a7fc37
commit
d185fca80c
7 changed files with 3 additions and 40 deletions
|
@ -260,8 +260,6 @@ impl TestServer {
|
||||||
.store(true, SeqCst);
|
.store(true, SeqCst);
|
||||||
}
|
}
|
||||||
|
|
||||||
//todo!(workspace)
|
|
||||||
#[allow(dead_code)]
|
|
||||||
pub fn simulate_long_connection_interruption(
|
pub fn simulate_long_connection_interruption(
|
||||||
&self,
|
&self,
|
||||||
peer_id: PeerId,
|
peer_id: PeerId,
|
||||||
|
|
|
@ -563,7 +563,6 @@ impl Copilot {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(dead_code)] // todo!()
|
|
||||||
fn sign_out(&mut self, cx: &mut ModelContext<Self>) -> Task<Result<()>> {
|
fn sign_out(&mut self, cx: &mut ModelContext<Self>) -> Task<Result<()>> {
|
||||||
self.update_sign_in_status(request::SignInStatus::NotSignedIn, cx);
|
self.update_sign_in_status(request::SignInStatus::NotSignedIn, cx);
|
||||||
if let CopilotServer::Running(RunningCopilotServer { lsp: server, .. }) = &self.server {
|
if let CopilotServer::Running(RunningCopilotServer { lsp: server, .. }) = &self.server {
|
||||||
|
@ -1126,7 +1125,6 @@ mod tests {
|
||||||
.update(cx, |copilot, cx| copilot.sign_out(cx))
|
.update(cx, |copilot, cx| copilot.sign_out(cx))
|
||||||
.await
|
.await
|
||||||
.unwrap();
|
.unwrap();
|
||||||
// todo!() po: these notifications now happen in reverse order?
|
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
lsp.receive_notification::<lsp::notification::DidCloseTextDocument>()
|
lsp.receive_notification::<lsp::notification::DidCloseTextDocument>()
|
||||||
.await,
|
.await,
|
||||||
|
|
|
@ -13,23 +13,13 @@ mod window;
|
||||||
mod window_appearence;
|
mod window_appearence;
|
||||||
|
|
||||||
use crate::{px, size, GlobalPixels, Pixels, Size};
|
use crate::{px, size, GlobalPixels, Pixels, Size};
|
||||||
use anyhow::anyhow;
|
|
||||||
use cocoa::{
|
use cocoa::{
|
||||||
base::{id, nil},
|
base::{id, nil},
|
||||||
foundation::{NSAutoreleasePool, NSNotFound, NSRect, NSSize, NSString, NSUInteger, NSURL},
|
foundation::{NSAutoreleasePool, NSNotFound, NSRect, NSSize, NSString, NSUInteger},
|
||||||
};
|
};
|
||||||
use metal_renderer::*;
|
use metal_renderer::*;
|
||||||
use objc::{
|
use objc::runtime::{BOOL, NO, YES};
|
||||||
msg_send,
|
use std::ops::Range;
|
||||||
runtime::{BOOL, NO, YES},
|
|
||||||
sel, sel_impl,
|
|
||||||
};
|
|
||||||
use std::{
|
|
||||||
ffi::{c_char, CStr, OsStr},
|
|
||||||
ops::Range,
|
|
||||||
os::unix::prelude::OsStrExt,
|
|
||||||
path::PathBuf,
|
|
||||||
};
|
|
||||||
|
|
||||||
pub use dispatcher::*;
|
pub use dispatcher::*;
|
||||||
pub use display::*;
|
pub use display::*;
|
||||||
|
@ -147,19 +137,3 @@ impl From<NSRect> for Size<GlobalPixels> {
|
||||||
// && self.origin.y + self.size.height >= other.origin.y
|
// && self.origin.y + self.size.height >= other.origin.y
|
||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
|
|
||||||
// todo!
|
|
||||||
#[allow(unused)]
|
|
||||||
unsafe fn ns_url_to_path(url: id) -> crate::Result<PathBuf> {
|
|
||||||
let path: *mut c_char = msg_send![url, fileSystemRepresentation];
|
|
||||||
if path.is_null() {
|
|
||||||
Err(anyhow!(
|
|
||||||
"url is not a file path: {}",
|
|
||||||
CStr::from_ptr(url.absoluteString().UTF8String()).to_string_lossy()
|
|
||||||
))
|
|
||||||
} else {
|
|
||||||
Ok(PathBuf::from(OsStr::from_bytes(
|
|
||||||
CStr::from_ptr(path).to_bytes(),
|
|
||||||
)))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
|
@ -34,8 +34,6 @@ unsafe fn build_event_source() {
|
||||||
mem::forget(source);
|
mem::forget(source);
|
||||||
}
|
}
|
||||||
|
|
||||||
// todo!
|
|
||||||
#[allow(unused)]
|
|
||||||
pub fn key_to_native(key: &str) -> Cow<str> {
|
pub fn key_to_native(key: &str) -> Cow<str> {
|
||||||
use cocoa::appkit::*;
|
use cocoa::appkit::*;
|
||||||
let code = match key {
|
let code = match key {
|
||||||
|
|
|
@ -74,7 +74,6 @@ const NSWindowAnimationBehaviorUtilityWindow: NSInteger = 4;
|
||||||
#[allow(non_upper_case_globals)]
|
#[allow(non_upper_case_globals)]
|
||||||
const NSViewLayerContentsRedrawDuringViewResize: NSInteger = 2;
|
const NSViewLayerContentsRedrawDuringViewResize: NSInteger = 2;
|
||||||
// https://developer.apple.com/documentation/appkit/nsdragoperation
|
// https://developer.apple.com/documentation/appkit/nsdragoperation
|
||||||
#[allow(non_upper_case_globals)]
|
|
||||||
type NSDragOperation = NSUInteger;
|
type NSDragOperation = NSUInteger;
|
||||||
#[allow(non_upper_case_globals)]
|
#[allow(non_upper_case_globals)]
|
||||||
const NSDragOperationNone: NSDragOperation = 0;
|
const NSDragOperationNone: NSDragOperation = 0;
|
||||||
|
|
|
@ -172,7 +172,6 @@ pub struct Scene {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Scene {
|
impl Scene {
|
||||||
#[allow(dead_code)]
|
|
||||||
pub fn paths(&self) -> &[Path<ScaledPixels>] {
|
pub fn paths(&self) -> &[Path<ScaledPixels>] {
|
||||||
&self.paths
|
&self.paths
|
||||||
}
|
}
|
||||||
|
|
|
@ -1189,7 +1189,6 @@ impl Buffer {
|
||||||
self.undo_or_redo(transaction).log_err()
|
self.undo_or_redo(transaction).log_err()
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(clippy::needless_collect)]
|
|
||||||
pub fn undo_to_transaction(&mut self, transaction_id: TransactionId) -> Vec<Operation> {
|
pub fn undo_to_transaction(&mut self, transaction_id: TransactionId) -> Vec<Operation> {
|
||||||
let transactions = self
|
let transactions = self
|
||||||
.history
|
.history
|
||||||
|
@ -1223,7 +1222,6 @@ impl Buffer {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(clippy::needless_collect)]
|
|
||||||
pub fn redo_to_transaction(&mut self, transaction_id: TransactionId) -> Vec<Operation> {
|
pub fn redo_to_transaction(&mut self, transaction_id: TransactionId) -> Vec<Operation> {
|
||||||
let transactions = self
|
let transactions = self
|
||||||
.history
|
.history
|
||||||
|
@ -1536,7 +1534,6 @@ impl Buffer {
|
||||||
edits
|
edits
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(clippy::type_complexity)]
|
|
||||||
pub fn randomly_edit<T>(
|
pub fn randomly_edit<T>(
|
||||||
&mut self,
|
&mut self,
|
||||||
rng: &mut T,
|
rng: &mut T,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue