Skip to content

Commit 7b758ec

Browse files
committed
Fix a few warnings
1 parent b0aee5e commit 7b758ec

File tree

3 files changed

+4
-1
lines changed

3 files changed

+4
-1
lines changed

src/message/mod.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ pub unsafe trait Message {
7070
send_message(self, sel, args)
7171
}
7272

73+
#[allow(missing_docs)]
7374
#[cfg(feature = "verify_message")]
7475
unsafe fn send_message<A, R>(&self, sel: Sel, args: A) -> Result<R, MessageError>
7576
where
@@ -285,7 +286,6 @@ where
285286
#[cfg(test)]
286287
mod tests {
287288
use super::Message;
288-
use crate::runtime::Object;
289289
use crate::test_utils;
290290

291291
#[test]
@@ -314,6 +314,7 @@ mod tests {
314314
#[cfg(not(feature = "verify_message"))]
315315
#[test]
316316
fn test_send_message_nil() {
317+
use crate::runtime::Object;
317318
let nil: *mut Object = ::std::ptr::null_mut();
318319
let result: usize = unsafe { msg_send![nil, hash] };
319320
assert!(result == 0);

src/runtime.rs

+1
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ pub struct Object {
7474
/// A pointer to the start of a method implementation.
7575
pub type Imp = unsafe extern "C" fn();
7676

77+
#[allow(missing_docs)]
7778
#[link(name = "objc", kind = "dylib")]
7879
extern "C" {
7980
pub fn sel_registerName(name: *const c_char) -> Sel;

src/test_utils.rs

+1
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ impl Drop for CustomObject {
4040
}
4141

4242
#[derive(Eq, PartialEq)]
43+
#[repr(C)]
4344
pub struct CustomStruct {
4445
pub a: u64,
4546
pub b: u64,

0 commit comments

Comments
 (0)