Skip to content

Commit bf3085e

Browse files
author
Shivendra Devadhe
committed
fix(rust): update public info APIs to use usize
1 parent c9a3466 commit bf3085e

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

rust/src/info/edge_info.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ impl EdgeInfo {
202202
/// Return the number of property groups.
203203
///
204204
/// TODO: upstream C++ uses `int` for this return type; prefer fixed-width.
205-
pub fn property_group_num(&self) -> i32 {
205+
pub fn property_group_num(&self) -> u_size {
206206
self.0.PropertyGroupNum()
207207
}
208208

@@ -245,7 +245,7 @@ impl EdgeInfo {
245245
/// Returns `None` if the index is out of range.
246246
///
247247
/// TODO: upstream C++ uses `int` for this parameter; prefer fixed-width.
248-
pub fn property_group_by_index(&self, index: i32) -> Option<PropertyGroup> {
248+
pub fn property_group_by_index(&self, index: usize) -> Option<PropertyGroup> {
249249
let sp = self.0.GetPropertyGroupByIndex(index);
250250
if sp.is_null() {
251251
None

rust/src/info/vertex_info.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ impl VertexInfo {
123123
/// Return the number of property groups.
124124
///
125125
/// TODO: upstream C++ uses `int` for this return type; prefer fixed-width.
126-
pub fn property_group_num(&self) -> i32 {
126+
pub fn property_group_num(&self) -> u_size {
127127
self.0.PropertyGroupNum()
128128
}
129129

@@ -173,7 +173,7 @@ impl VertexInfo {
173173
/// TODO: upstream C++ uses `int` for this parameter; prefer fixed-width.
174174
///
175175
/// Returns `None` if the index is out of range.
176-
pub fn property_group_by_index(&self, index: i32) -> Option<PropertyGroup> {
176+
pub fn property_group_by_index(&self, index: usize) -> Option<PropertyGroup> {
177177
let sp = self.0.GetPropertyGroupByIndex(index);
178178
if sp.is_null() {
179179
None

0 commit comments

Comments
 (0)