Skip to content

Commit

Permalink
Rename objc_id -> objc2_id
Browse files Browse the repository at this point in the history
  • Loading branch information
madsmtm committed Sep 8, 2021
1 parent 2691325 commit 215f406
Show file tree
Hide file tree
Showing 12 changed files with 19 additions and 19 deletions.
2 changes: 1 addition & 1 deletion objc2/src/macros.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ macro_rules! sel {
Sends a message to an object.
The first argument can be any type that dereferences to a type that implements
[`Message`], like a reference, a pointer, or an `objc_id::Id` to an object.
[`Message`], like a reference, a pointer, or an `objc2_id::Id` to an object.
The syntax is similar to the message syntax in Objective-C.
Expand Down
2 changes: 1 addition & 1 deletion objc2_foundation/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ block = ["objc2_block"]
[dependencies]
objc2_block = { path = "../objc2_block", optional = true }
objc = { path = "../objc2", version = "0.2.7" }
objc_id = { path = "../objc2_id", version = "0.1.1" }
objc2_id = { path = "../objc2_id" }
4 changes: 2 additions & 2 deletions objc2_foundation/src/array.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use core::ops::{Index, Range};
use objc::runtime::{Class, Object};
use objc::{class, msg_send};
use objc::{Encode, Encoding};
use objc_id::{Id, Owned, Ownership, ShareId, Shared};
use objc2_id::{Id, Owned, Ownership, ShareId, Shared};

use super::{INSCopying, INSFastEnumeration, INSMutableCopying, INSObject, NSEnumerator};

Expand Down Expand Up @@ -420,7 +420,7 @@ mod tests {

use super::{INSArray, INSMutableArray, NSArray, NSMutableArray};
use crate::{INSObject, INSString, NSObject, NSString};
use objc_id::Id;
use objc2_id::Id;

fn sample_array(len: usize) -> Id<NSArray<NSObject>> {
let mut vec = Vec::with_capacity(len);
Expand Down
2 changes: 1 addition & 1 deletion objc2_foundation/src/data.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use super::{INSCopying, INSMutableCopying, INSObject, NSRange};
use objc::msg_send;
#[cfg(feature = "block")]
use objc2_block::{Block, ConcreteBlock};
use objc_id::Id;
use objc2_id::Id;

pub trait INSData: INSObject {
fn len(&self) -> usize {
Expand Down
4 changes: 2 additions & 2 deletions objc2_foundation/src/dictionary.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use core::ptr;

use objc::runtime::Class;
use objc::{class, msg_send};
use objc_id::{Id, Owned, Ownership, ShareId};
use objc2_id::{Id, Owned, Ownership, ShareId};

use super::{INSCopying, INSFastEnumeration, INSObject, NSArray, NSEnumerator, NSSharedArray};

Expand Down Expand Up @@ -166,7 +166,7 @@ where
#[cfg(test)]
mod tests {
use alloc::vec;
use objc_id::Id;
use objc2_id::Id;

use super::{INSDictionary, NSDictionary};
use crate::{INSArray, INSObject, INSString, NSObject, NSString};
Expand Down
2 changes: 1 addition & 1 deletion objc2_foundation/src/enumerator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use std::os::raw::c_ulong;

use objc::runtime::Object;
use objc::{msg_send, Encode, Encoding, RefEncode};
use objc_id::Id;
use objc2_id::Id;

use super::INSObject;

Expand Down
2 changes: 1 addition & 1 deletion objc2_foundation/src/object.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use core::any::Any;
use objc::msg_send;
use objc::runtime::{Class, BOOL, NO};
use objc::Message;
use objc_id::{Id, ShareId};
use objc2_id::{Id, ShareId};

use super::NSString;

Expand Down
2 changes: 1 addition & 1 deletion objc2_foundation/src/string.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use core::str;
use std::os::raw::c_char;

use objc::msg_send;
use objc_id::{Id, ShareId};
use objc2_id::{Id, ShareId};

use super::INSObject;

Expand Down
2 changes: 1 addition & 1 deletion objc2_foundation/src/value.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ use std::os::raw::c_char;
use objc::runtime::Class;
use objc::Encode;
use objc::{class, msg_send};
use objc_id::Id;
use objc2_id::Id;

use super::{INSCopying, INSObject};

Expand Down
4 changes: 2 additions & 2 deletions objc2_id/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "objc_id"
name = "objc2_id"
version = "0.1.1" # Remember to update html_root_url in lib.rs
authors = ["Steven Sheldon", "Mads Marquart <mads@marquart.dk>"]
edition = "2018"
Expand All @@ -13,7 +13,7 @@ categories = [
]
readme = "README.md"
repository = "https://github.com/madsmtm/objc2"
documentation = "https://docs.rs/objc_id/"
documentation = "https://docs.rs/objc2_id/"
license = "MIT"

[dependencies]
Expand Down
8 changes: 4 additions & 4 deletions objc2_id/README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# `objc_id`
# `objc2_id`

[![Latest version](https://badgen.net/crates/v/objc_id)](https://crates.io/crates/objc_id)
[![Latest version](https://badgen.net/crates/v/objc2_id)](https://crates.io/crates/objc2_id)
[![License](https://badgen.net/badge/license/MIT/blue)](../LICENSE.txt)
[![Documentation](https://docs.rs/objc_id/badge.svg)](https://docs.rs/objc_id/)
[![Documentation](https://docs.rs/objc2_id/badge.svg)](https://docs.rs/objc2_id/)
[![CI Status](https://github.com/madsmtm/objc2/workflows/CI/badge.svg)](https://github.com/madsmtm/objc2/actions)

Rust smart pointers for Objective-C reference counting.
Expand All @@ -19,7 +19,7 @@ Weak references may be created using the WeakId struct.

``` rust
use objc::runtime::{Class, Object};
use objc_id::{Id, WeakId};
use objc2_id::{Id, WeakId};

let cls = Class::get("NSObject").unwrap();
let obj: Id<Object> = unsafe {
Expand Down
4 changes: 2 additions & 2 deletions objc2_id/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Weak references may be created using the [`WeakId`] struct.
```no_run
# use objc::msg_send;
use objc::runtime::{Class, Object};
use objc_id::{Id, WeakId};
use objc2_id::{Id, WeakId};
let cls = Class::get("NSObject").unwrap();
let obj: Id<Object> = unsafe {
Expand All @@ -39,7 +39,7 @@ assert!(weak.load().is_none());
// This crate is, but its dependencies are not
#![no_std]
// Update in Cargo.toml as well.
#![doc(html_root_url = "https://docs.rs/objc_id/0.1.1")]
#![doc(html_root_url = "https://docs.rs/objc2_id/0.1.1")]

pub use id::{Id, Owned, Ownership, ShareId, Shared, WeakId};

Expand Down

0 comments on commit 215f406

Please sign in to comment.