Remove extern crate statements (#3310)

This commit is contained in:
daxpedda 2023-12-25 09:25:09 +01:00 committed by GitHub
parent 61a873d79a
commit 28a811bbba
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
36 changed files with 54 additions and 26 deletions

View file

@ -14,6 +14,7 @@ use std::{
use core_foundation::runloop::{CFRunLoopGetMain, CFRunLoopWakeUp};
use icrate::AppKit::{NSApplication, NSApplicationActivationPolicy};
use icrate::Foundation::{is_main_thread, MainThreadMarker, NSSize};
use log::trace;
use objc2::rc::{autoreleasepool, Id};
use once_cell::sync::Lazy;

View file

@ -74,7 +74,7 @@ unsafe fn try_cursor_from_selector(sel: Sel) -> Option<Id<NSCursor>> {
let cursor: Id<NSCursor> = unsafe { msg_send_id![cls, performSelector: sel] };
Some(cursor)
} else {
warn!("cursor `{sel}` appears to be invalid");
log::warn!("cursor `{sel}` appears to be invalid");
None
}
}

View file

@ -1,4 +1,5 @@
use icrate::Foundation::{NSNotFound, NSRange, NSUInteger};
use log::trace;
// Replace with `!` once stable
#[derive(Debug)]

View file

@ -73,7 +73,7 @@ enum ImeState {
Commited,
}
bitflags! {
bitflags::bitflags! {
#[derive(Debug, Clone, Copy, PartialEq)]
struct ModLocationMask: u8 {
const LEFT = 0b0001;
@ -338,7 +338,7 @@ declare_class!(
// Leave the Preedit self.ivars()
self.ivars().ime_state.set(ImeState::Ground);
} else {
warn!("Expected to have IME enabled when receiving unmarkText");
log::warn!("Expected to have IME enabled when receiving unmarkText");
}
}

View file

@ -46,6 +46,7 @@ use icrate::Foundation::{
CGFloat, MainThreadBound, MainThreadMarker, NSArray, NSCopying, NSObject, NSPoint, NSRect,
NSSize, NSString,
};
use log::trace;
use objc2::rc::{autoreleasepool, Id};
use objc2::{declare_class, msg_send, msg_send_id, mutability, sel, ClassType, DeclaredClass};