You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@graphar.apache.org by "Copilot (via GitHub)" <gi...@apache.org> on 2026/02/28 06:11:37 UTC

Re: [PR] feat(Rust): add `GraphInfo` support [incubator-graphar]

Copilot commented on code in PR #883:
URL: https://github.com/apache/incubator-graphar/pull/883#discussion_r2867118552


##########
rust/src/ffi.rs:
##########
@@ -348,6 +368,81 @@ pub(crate) mod graphar {
         fn edge_info_dump(edge_info: &EdgeInfo) -> Result<UniquePtr<CxxString>>;
     }
 
+    struct MaybeIndex {
+        has_value: bool,
+        index: usize,
+    }
+

Review Comment:
   `MaybeIndex` is defined inside the `cxx::bridge` module as a private struct, but this file imports it (`use crate::ffi::graphar::MaybeIndex;`) and implements `From<MaybeIndex> for Option<usize>` in the parent module. That will not compile due to Rust privacy rules (parent modules cannot access private items from a child module). Make `MaybeIndex` visible (e.g. `pub(crate) struct MaybeIndex`) or move the `From` impl (and any uses) inside the `graphar` module and expose a public conversion helper instead.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@graphar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@graphar.apache.org
For additional commands, e-mail: commits-help@graphar.apache.org