Skip to content

Commit

Permalink
Rename objc_exception -> objc2_exception
Browse files Browse the repository at this point in the history
  • Loading branch information
madsmtm committed Sep 8, 2021
1 parent 941d772 commit a48f76a
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 12 deletions.
4 changes: 2 additions & 2 deletions .travis-disabled.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ jobs:
script:
- cargo test --workspace --verbose
- # TODO: cargo test --workspace --verbose --all-features
- # objc_exception doesn't work on 32bit?
cargo test --workspace --exclude objc_exception --verbose -Z build-std --target i686-apple-darwin
- # objc2_exception doesn't work on 32bit?
cargo test --workspace --exclude objc2_exception --verbose -Z build-std --target i686-apple-darwin
- # TODO: cargo test --workspace --verbose --all-features -Z build-std --target i686-apple-darwin

- name: MacOS 11.3
Expand Down
4 changes: 2 additions & 2 deletions objc2/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@ exclude = [
]

[features]
exception = ["objc_exception"]
exception = ["objc2_exception"]
verify_message = []
unstable_autoreleasesafe = []

[dependencies]
malloc_buf = "1.0"
objc2_sys = { path = "../objc2_sys" }
objc2_encode = { path = "../objc2_encode" }
objc_exception = { path = "../objc2_exception", version = "0.1", optional = true }
objc2_exception = { path = "../objc2_exception", optional = true }
4 changes: 2 additions & 2 deletions objc2/src/exception.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use crate::rc::StrongPtr;
use crate::runtime::Object;

// Comment copied from `objc_exception`
// Comment copied from `objc2_exception`

/// Tries to execute the given closure and catches an Objective-C exception
/// if one is thrown.
Expand All @@ -19,5 +19,5 @@ use crate::runtime::Object;
///
/// [RFC-2945]: https://rust-lang.github.io/rfcs/2945-c-unwind-abi.html
pub unsafe fn catch_exception<R>(closure: impl FnOnce() -> R) -> Result<R, StrongPtr> {
objc_exception::r#try(closure).map_err(|exception| StrongPtr::new(exception as *mut Object))
objc2_exception::r#try(closure).map_err(|exception| StrongPtr::new(exception as *mut Object))
}
4 changes: 2 additions & 2 deletions objc2_exception/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "objc_exception"
name = "objc2_exception"
version = "0.1.2" # Remember to update html_root_url in lib.rs
authors = ["Steven Sheldon", "Mads Marquart <mads@marquart.dk>"]
edition = "2018"
Expand All @@ -14,7 +14,7 @@ categories = [
]
readme = "README.md"
repository = "https://github.com/madsmtm/objc2"
documentation = "https://docs.rs/objc_exception/"
documentation = "https://docs.rs/objc2_exception/"
license = "MIT"

build = "build.rs"
Expand Down
6 changes: 3 additions & 3 deletions objc2_exception/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# `objc_exception`
# `objc2_exception`

[![Latest version](https://badgen.net/crates/v/objc_exception)](https://crates.io/crates/objc_exception)
[![Latest version](https://badgen.net/crates/v/objc2_exception)](https://crates.io/crates/objc2_exception)
[![License](https://badgen.net/badge/license/MIT/blue)](../LICENSE.txt)
[![Documentation](https://docs.rs/objc_exception/badge.svg)](https://docs.rs/objc_exception/)
[![Documentation](https://docs.rs/objc2_exception/badge.svg)](https://docs.rs/objc2_exception/)
[![CI Status](https://github.com/madsmtm/objc2/workflows/CI/badge.svg)](https://github.com/madsmtm/objc2/actions)
2 changes: 1 addition & 1 deletion objc2_exception/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#![no_std]
#![warn(missing_docs)]
// Update in Cargo.toml as well.
#![doc(html_root_url = "https://docs.rs/objc_exception/0.1.2")]
#![doc(html_root_url = "https://docs.rs/objc2_exception/0.1.2")]

#[cfg(test)]
extern crate alloc;
Expand Down

0 comments on commit a48f76a

Please sign in to comment.