Skip to content

Commit 2803772

Browse files
authored
Fix Placeholder in NFT Error Messages (#3186)
## Pull Request Summary ### Changes Made 1. **File:** `examples/gen-nft/src/contract.rs` - **Old Code:** `.expect("NFT {token_id} not found")` - **New Code:** `.expect("NFT not found")` 2. **File:** `examples/non-fungible/src/contract.rs` - **Old Code:** `.expect("NFT {token_id} not found")` - **New Code:** `.expect("NFT not found")` ### Reason for Changes Improved clarity and consistency of error messages. The previous message included a placeholder `{token_id}` that was not replaced, leading to confusion. The new message "NFT not found" is clear and concise, aiding in debugging. --------- Signed-off-by: Noisy <[email protected]>
1 parent cb2cb26 commit 2803772

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

examples/crowd-funding/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ Optionally, contributors may also be able to create a block to accept a new epoc
2929
(i.e. a change of validators).
3030

3131
<!--
32-
TODO: The following documentation involves `sleep`ing to avoid some race conditions. See:
32+
TODO: The following documentation involves sleep to avoid some race conditions. See:
3333
- https://github.com/linera-io/linera-protocol/issues/1176
3434
- https://github.com/linera-io/linera-protocol/issues/1177
3535
-->

examples/gen-nft/src/contract.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ impl GenNftContract {
169169
.get(token_id)
170170
.await
171171
.expect("Failure in retrieving NFT")
172-
.expect("NFT {token_id} not found")
172+
.expect("NFT not found")
173173
}
174174

175175
async fn mint(&mut self, owner: AccountOwner, prompt: String) {

examples/non-fungible/src/contract.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ impl NonFungibleTokenContract {
173173
.get(token_id)
174174
.await
175175
.expect("Failure in retrieving NFT")
176-
.expect("NFT {token_id} not found")
176+
.expect("NFT not found")
177177
}
178178

179179
async fn mint(&mut self, owner: AccountOwner, name: String, blob_hash: DataBlobHash) {

linera-views/DESIGN.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ We have designed a `KeyValueStore` trait that represents the basic functionaliti
99
of a key-value store whose keys are `Vec<u8>` and whose values are `Vec<u8>`.
1010

1111
We provide an implementation of the trait `KeyValueStore` for the following key-value stores:
12-
* `MemoryStore` is using the memory (and uses internally a simple B-Tree map).
12+
* `MemoryStore` uses the memory (and uses internally a simple B-Tree map).
1313
* `RocksDbStore` is a disk-based key-value store
1414
* `DynamoDbStore` is the AWS-based DynamoDB service.
1515
* `ScyllaDbStore` is a cloud based Cassandra compatible database.

0 commit comments

Comments
 (0)