diff --git a/crates/collab2/src/tests/test_server.rs b/crates/collab2/src/tests/test_server.rs index cfecb4880d1c226daef22a9233568bdace832296..c486fa7943466614da48d05a7fd6c169037aade5 100644 --- a/crates/collab2/src/tests/test_server.rs +++ b/crates/collab2/src/tests/test_server.rs @@ -260,8 +260,6 @@ impl TestServer { .store(true, SeqCst); } - //todo!(workspace) - #[allow(dead_code)] pub fn simulate_long_connection_interruption( &self, peer_id: PeerId, diff --git a/crates/copilot2/src/copilot2.rs b/crates/copilot2/src/copilot2.rs index 4fd05a9c089bceaa038c0b4478102969a27656bc..4d4ed42620b1954cdf7c02d0414190ce511c3a2d 100644 --- a/crates/copilot2/src/copilot2.rs +++ b/crates/copilot2/src/copilot2.rs @@ -563,7 +563,6 @@ impl Copilot { } } - #[allow(dead_code)] // todo!() fn sign_out(&mut self, cx: &mut ModelContext) -> Task> { self.update_sign_in_status(request::SignInStatus::NotSignedIn, cx); if let CopilotServer::Running(RunningCopilotServer { lsp: server, .. }) = &self.server { @@ -1126,7 +1125,6 @@ mod tests { .update(cx, |copilot, cx| copilot.sign_out(cx)) .await .unwrap(); - // todo!() po: these notifications now happen in reverse order? assert_eq!( lsp.receive_notification::() .await, diff --git a/crates/gpui2/src/platform/mac.rs b/crates/gpui2/src/platform/mac.rs index 462aa209ccb040f2df4d1a70466c1e48eb78e9a9..336679dc9fb13d893c0048ced615b282fd82e1f0 100644 --- a/crates/gpui2/src/platform/mac.rs +++ b/crates/gpui2/src/platform/mac.rs @@ -13,23 +13,13 @@ mod window; mod window_appearence; use crate::{px, size, GlobalPixels, Pixels, Size}; -use anyhow::anyhow; use cocoa::{ base::{id, nil}, - foundation::{NSAutoreleasePool, NSNotFound, NSRect, NSSize, NSString, NSUInteger, NSURL}, + foundation::{NSAutoreleasePool, NSNotFound, NSRect, NSSize, NSString, NSUInteger}, }; use metal_renderer::*; -use objc::{ - msg_send, - runtime::{BOOL, NO, YES}, - sel, sel_impl, -}; -use std::{ - ffi::{c_char, CStr, OsStr}, - ops::Range, - os::unix::prelude::OsStrExt, - path::PathBuf, -}; +use objc::runtime::{BOOL, NO, YES}; +use std::ops::Range; pub use dispatcher::*; pub use display::*; @@ -147,19 +137,3 @@ impl From for Size { // && self.origin.y + self.size.height >= other.origin.y // } // } - -// todo! -#[allow(unused)] -unsafe fn ns_url_to_path(url: id) -> crate::Result { - 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(), - ))) - } -} diff --git a/crates/gpui2/src/platform/mac/events.rs b/crates/gpui2/src/platform/mac/events.rs index b2d68497efc831a7e61b8c235756e95fade6af0c..c67018ad5d4666ec8ae15511e4739f811ebcf309 100644 --- a/crates/gpui2/src/platform/mac/events.rs +++ b/crates/gpui2/src/platform/mac/events.rs @@ -34,8 +34,6 @@ unsafe fn build_event_source() { mem::forget(source); } -// todo! -#[allow(unused)] pub fn key_to_native(key: &str) -> Cow { use cocoa::appkit::*; let code = match key { diff --git a/crates/gpui2/src/platform/mac/window.rs b/crates/gpui2/src/platform/mac/window.rs index fa39b22945e5f2176e66b68d2cd465b462bd6bf9..c75bb21399f8d8ccbeff45e1a987f8b4edba11ec 100644 --- a/crates/gpui2/src/platform/mac/window.rs +++ b/crates/gpui2/src/platform/mac/window.rs @@ -74,7 +74,6 @@ const NSWindowAnimationBehaviorUtilityWindow: NSInteger = 4; #[allow(non_upper_case_globals)] const NSViewLayerContentsRedrawDuringViewResize: NSInteger = 2; // https://developer.apple.com/documentation/appkit/nsdragoperation -#[allow(non_upper_case_globals)] type NSDragOperation = NSUInteger; #[allow(non_upper_case_globals)] const NSDragOperationNone: NSDragOperation = 0; diff --git a/crates/gpui2/src/scene.rs b/crates/gpui2/src/scene.rs index 687943a7b18fafcb52170ea93b628f4c58cafcbf..03d557b84d6b7abb7806cd056d907b6ec8237b55 100644 --- a/crates/gpui2/src/scene.rs +++ b/crates/gpui2/src/scene.rs @@ -172,7 +172,6 @@ pub struct Scene { } impl Scene { - #[allow(dead_code)] pub fn paths(&self) -> &[Path] { &self.paths } diff --git a/crates/text2/src/text2.rs b/crates/text2/src/text2.rs index c05ea1109c0665247e4b8e09e657658f52441bc6..b615d58c22850c2a1f2005e4aadfb19e7fc8672f 100644 --- a/crates/text2/src/text2.rs +++ b/crates/text2/src/text2.rs @@ -1189,7 +1189,6 @@ impl Buffer { self.undo_or_redo(transaction).log_err() } - #[allow(clippy::needless_collect)] pub fn undo_to_transaction(&mut self, transaction_id: TransactionId) -> Vec { let transactions = self .history @@ -1223,7 +1222,6 @@ impl Buffer { } } - #[allow(clippy::needless_collect)] pub fn redo_to_transaction(&mut self, transaction_id: TransactionId) -> Vec { let transactions = self .history @@ -1536,7 +1534,6 @@ impl Buffer { edits } - #[allow(clippy::type_complexity)] pub fn randomly_edit( &mut self, rng: &mut T,