Skip to content

Commit b74c2f4

Browse files
committed
removed unnecessary type cast
1 parent 51a2868 commit b74c2f4

6 files changed

Lines changed: 8 additions & 8 deletions

File tree

market-contract/src/sale_views.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ impl Contract {
9999
let keys = sales.as_vector();
100100

101101
//where to start pagination - if we have a from_index, we'll use that - otherwise start from 0 index
102-
let start = u128::from(from_index.unwrap_or(0));
102+
let start = from_index.unwrap_or(0);
103103

104104
//iterate through the keys vector
105105
keys.iter()

nft-contract-approval/src/enumeration.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ impl Contract {
6060
};
6161

6262
//where to start pagination - if we have a from_index, we'll use that - otherwise start from 0 index
63-
let start = u128::from(from_index.unwrap_or(0));
63+
let start = from_index.unwrap_or(0);
6464

6565
//iterate through the keys vector
6666
tokens.iter()

nft-contract-basic/src/enumeration.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ impl Contract {
6060
};
6161

6262
//where to start pagination - if we have a from_index, we'll use that - otherwise start from 0 index
63-
let start = u128::from(from_index.unwrap_or(0));
63+
let start = from_index.unwrap_or(0);
6464

6565
//iterate through the keys vector
6666
tokens.iter()

nft-contract-events/src/enumeration.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ impl Contract {
1111
//Query for nft tokens on the contract regardless of the owner using pagination
1212
pub fn nft_tokens(&self, from_index: Option<u128>, limit: Option<u64>) -> Vec<JsonToken> {
1313
//where to start pagination - if we have a from_index, we'll use that - otherwise start from 0 index
14-
let start = u128::from(from_index.unwrap_or(0));
14+
let start = from_index.unwrap_or(0);
1515

1616
//iterate through each token using an iterator
1717
self.token_metadata_by_id.keys()

nft-contract-royalty/src/enumeration.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ impl Contract {
6060
};
6161

6262
//where to start pagination - if we have a from_index, we'll use that - otherwise start from 0 index
63-
let start = u128::from(from_index.unwrap_or(0));
63+
let start = from_index.unwrap_or(0);
6464

6565
//iterate through the keys vector
6666
tokens.iter()

nft-series/src/enumeration.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ impl Contract {
2727
//Query for nft tokens on the contract regardless of the owner using pagination
2828
pub fn nft_tokens(&self, from_index: Option<u128>, limit: Option<u64>) -> Vec<JsonToken> {
2929
//where to start pagination - if we have a from_index, we'll use that - otherwise start from 0 index
30-
let start = u128::from(from_index.unwrap_or(0));
30+
let start = from_index.unwrap_or(0);
3131

3232
//iterate through each token using an iterator
3333
self.tokens_by_id
@@ -97,7 +97,7 @@ impl Contract {
9797
// Paginate through all the series on the contract and return the a vector of JsonSeries
9898
pub fn get_series(&self, from_index: Option<u128>, limit: Option<u64>) -> Vec<JsonSeries> {
9999
//where to start pagination - if we have a from_index, we'll use that - otherwise start from 0 index
100-
let start = u128::from(from_index.unwrap_or(0));
100+
let start = from_index.unwrap_or(0);
101101

102102
//iterate through each series using an iterator
103103
self.series_by_id
@@ -159,7 +159,7 @@ impl Contract {
159159
};
160160

161161
//where to start pagination - if we have a from_index, we'll use that - otherwise start from 0 index
162-
let start = u128::from(from_index.unwrap_or(0));
162+
let start = from_index.unwrap_or(0);
163163

164164
//iterate through the tokens
165165
tokens

0 commit comments

Comments
 (0)