Skip to content

Commit

Permalink
feat: update deps
Browse files Browse the repository at this point in the history
  • Loading branch information
devillove084 committed Nov 25, 2024
1 parent ac98030 commit d756ff7
Show file tree
Hide file tree
Showing 10 changed files with 21 additions and 43 deletions.
41 changes: 9 additions & 32 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion cxx-async/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ crate-type = ["lib"]
[dependencies]
async-recursion = "1"
once_cell = "1"
pin-utils = "0.1"

# CXX related dependencies
cxx = { version = "1", features = ["c++20"] }
Expand Down
3 changes: 0 additions & 3 deletions cxx-async/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -188,9 +188,6 @@ const SEND_RESULT_FINISHED: u32 = 2;

pub use cxx_async_macro::bridge;

#[doc(hidden)]
pub use pin_utils::unsafe_pinned;

// Replacements for macros that panic that are guaranteed to cause an abort, so that we don't unwind
// across C++ frames.

Expand Down
2 changes: 1 addition & 1 deletion examples/cppcoro/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ authors = ["Patrick Walton <pcwalton@mimiga.net>"]
edition = "2018"

[dependencies]
async-recursion = "0.3"
async-recursion = "1"
once_cell = "1"

# CXX related dependencies
Expand Down
1 change: 1 addition & 0 deletions examples/cppcoro/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ fn main() {

cxx_build::bridge("src/main.rs")
.file("src/cppcoro_example.cpp")
.flag("-std=c++20")
.flag_if_supported("-Wall")
.include("include")
.include("../common/include")
Expand Down
1 change: 1 addition & 0 deletions examples/cppcoro/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ use futures::{StreamExt, TryStreamExt};
use once_cell::sync::Lazy;
use std::future::Future;
use std::ops::Range;
use std::pin::Pin;

#[cxx::bridge]
mod ffi {
Expand Down
2 changes: 1 addition & 1 deletion examples/folly/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ authors = ["Patrick Walton <pcwalton@mimiga.net>"]
edition = "2018"

[dependencies]
async-recursion = "0.3"
async-recursion = "1"
once_cell = "1"

# CXX related dependencies
Expand Down
1 change: 1 addition & 0 deletions examples/folly/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ use futures::{StreamExt, TryStreamExt};
use once_cell::sync::Lazy;
use std::future::Future;
use std::ops::Range;
use std::pin::Pin;

#[cxx::bridge]
mod ffi {
Expand Down
2 changes: 1 addition & 1 deletion macro/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ proc-macro = true
[dependencies]
proc-macro2 = "1"
quote = "1"
syn = { version = "1", features = ["full"] }
syn = { version = "2" }
10 changes: 6 additions & 4 deletions macro/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,9 @@ fn bridge_future(pieces: AstPieces) -> TokenStream {
// method.
// 3. The struct isn't `repr(packed)`. We define the struct and don't have this
// attribute.
::cxx_async::unsafe_pinned!(future: ::cxx_async::private::BoxFuture<'static,
::cxx_async::CxxAsyncResult<#output>>);
fn future(self: Pin<&mut Self>) -> Pin<&mut ::cxx_async::private::BoxFuture<'static, ::cxx_async::CxxAsyncResult<#output>>> {
unsafe { self.map_unchecked_mut(|s| &mut s.future) }
}

#[doc(hidden)]
fn assert_field_is_unpin() {
Expand Down Expand Up @@ -272,8 +273,9 @@ fn bridge_stream(pieces: AstPieces) -> TokenStream {
// method.
// 3. The struct isn't `repr(packed)`. We define the struct and don't have this
// attribute.
::cxx_async::unsafe_pinned!(stream: ::cxx_async::private::BoxStream<'static,
::cxx_async::CxxAsyncResult<#item>>);
fn stream(self: Pin<&mut Self>) -> Pin<&mut ::cxx_async::private::BoxStream<'static, ::cxx_async::CxxAsyncResult<#item>>> {
unsafe { self.map_unchecked_mut(|s| &mut s.stream) }
}

#[doc(hidden)]
fn assert_field_is_unpin() {
Expand Down

0 comments on commit d756ff7

Please sign in to comment.