Touch up PR 356
diff --git a/tests/BUCK b/tests/BUCK
index 6ad9f90..0ddf1a8 100644
--- a/tests/BUCK
+++ b/tests/BUCK
@@ -25,8 +25,8 @@
srcs = [
"ffi/tests.cc",
":bridge/source",
- ":module/source",
":extra/source",
+ ":module/source",
],
headers = {
"ffi/lib.rs.h": ":bridge/header",
@@ -41,11 +41,11 @@
)
rust_cxx_bridge(
- name = "module",
- src = "ffi/module.rs",
+ name = "extra",
+ src = "ffi/extra.rs",
)
rust_cxx_bridge(
- name = "extra",
- src = "ffi/extra.rs",
+ name = "module",
+ src = "ffi/module.rs",
)
diff --git a/tests/BUILD b/tests/BUILD
index 4dff0a0..233926b 100644
--- a/tests/BUILD
+++ b/tests/BUILD
@@ -27,8 +27,8 @@
srcs = [
"ffi/tests.cc",
":bridge/source",
- ":module/source",
":extra/source",
+ ":module/source",
],
hdrs = ["ffi/tests.h"],
deps = [
@@ -44,13 +44,13 @@
)
rust_cxx_bridge(
- name = "module",
- src = "ffi/module.rs",
+ name = "extra",
+ src = "ffi/extra.rs",
deps = [":impl"],
)
rust_cxx_bridge(
- name = "extra",
- src = "ffi/extra.rs",
+ name = "module",
+ src = "ffi/module.rs",
deps = [":impl"],
)
diff --git a/tests/ffi/extra.rs b/tests/ffi/extra.rs
index cd6ffe8..a809ea4 100644
--- a/tests/ffi/extra.rs
+++ b/tests/ffi/extra.rs
@@ -1,19 +1,15 @@
-// Separate mod so that &self in the lib.rs mod
-// has an unambiguous receiver.
-// At the moment, the cxx C++ codegen can't convert
-// more than one cxx::bridge mod per file, so that's why
-// we need to put this outside of lib.rs.
-// All of this could go into module.rs instead, but
-// for now its purpose is narrowly scoped for testing
-// aliasing between cxx::bridge mods, so we'll keep it that
-// way and start a new mod here.
+// Separate mod so that &self in the lib.rs mod has an unambiguous receiver. At
+// the moment, the cxx C++ codegen can't convert more than one cxx::bridge mod
+// per file, so that's why we need to put this outside of lib.rs. All of this
+// could go into module.rs instead, but for now its purpose is narrowly scoped
+// for testing aliasing between cxx::bridge mods, so we'll keep it that way and
+// start a new mod here.
// Rustfmt mangles the extern type alias.
// https://github.com/rust-lang/rustfmt/issues/4159
#[rustfmt::skip]
#[cxx::bridge(namespace = tests)]
pub mod ffi2 {
-
impl UniquePtr<D> {}
impl UniquePtr<E> {}
@@ -32,4 +28,4 @@
fn c_return_trivial() -> D;
fn c_return_opaque_ptr() -> UniquePtr<E>;
}
-}
\ No newline at end of file
+}
diff --git a/tests/ffi/lib.rs b/tests/ffi/lib.rs
index a0a2a73..7cffded 100644
--- a/tests/ffi/lib.rs
+++ b/tests/ffi/lib.rs
@@ -4,8 +4,8 @@
clippy::trivially_copy_pass_by_ref
)]
-pub mod module;
pub mod extra;
+pub mod module;
use cxx::{CxxString, CxxVector, UniquePtr};
use std::fmt::{self, Display};
diff --git a/tests/test.rs b/tests/test.rs
index 9828429..a9cd8e1 100644
--- a/tests/test.rs
+++ b/tests/test.rs
@@ -1,5 +1,5 @@
-use cxx_test_suite::ffi;
use cxx_test_suite::extra::ffi2;
+use cxx_test_suite::ffi;
use std::cell::Cell;
use std::ffi::CStr;