Dev

38 posts

Dev banner
Dev

Dev

@_dev14325

Web3

Chandigarh , India Entrou em Aralık 2023
25 Seguindo8 Seguidores
Dev
Dev@_dev14325·
@_devJNS Eyes are hurting 😭
English
0
0
0
2
JNS
JNS@_devJNS·
can you code with this theme?
JNS tweet media
English
721
58
1.5K
119.7K
Dev
Dev@_dev14325·
covering essential Rust concepts : ✅ Memory safety & ownership ✅ Error handling & Option types ✅ Pattern matching with enums ✅ Generic programming ✅ Traits & polymorphism ✅ Collections (HashMap, Vector) ✅ String manipulation
English
0
0
0
15
Dev
Dev@_dev14325·
Just Published a comprehensive repository on RUST Repository link: lnkd.in/gaMyVg-D
English
1
0
0
12
Dev
Dev@_dev14325·
💡 Your Turn! Try to combine iterator and consuming adapters in a single pipeline. Can you create a one-liner that filters out odd numbers, doubles the even numbers, and sums them up? 🤔 Solution :
Dev tweet media
English
0
0
0
24
Dev
Dev@_dev14325·
🤔 When to Use What? Use iterator adapters when you want to "build a pipeline" of transformations. Use consuming adapters when you’re done with the iterator and need to get a result.
English
1
0
0
26
Dev
Dev@_dev14325·
🚀 Mastering Rust's Consuming and Iterator Adapters! 1/n 🔥 What are Iterator Adapters? Iterator adapters transform an iterator to create a new iterator. They do not consume the iterator instead they "adapt" it by applying some transformation.
English
1
0
0
30
Dev
Dev@_dev14325·
1. Using Result for File Handling with Errors Handle file reading and parsing with custom errors: 2. Using Option to Safely Return None or a Value Find the first uppercase letter in a string:
Dev tweet mediaDev tweet media
English
0
0
0
12
Dev
Dev@_dev14325·
🚀 Rust's Result & Option: Powerful Error Handling & Null Safety 🦀 Rust's Result and Option enums are game-changers for writing safe, reliable code! No more null pointer exceptions or unexpected crashes. Here’s how I used them in real-world scenarios:
English
1
0
0
19
Dev
Dev@_dev14325·
Why ✅ Safer Approach 2 Works : If nth(10) returns None, unwrap_or(' ') will return a default character instead of panicking. This is super useful if you just want to avoid the panic but still get a usable result.
Dev tweet mediaDev tweet mediaDev tweet media
English
0
0
0
13
Dev
Dev@_dev14325·
Why ✅ Safer Approach 1 Works: We explicitly handle both Some(c) and None, so there’s no chance of a panic. Rust enforces exhaustive pattern matching, so you’ll never forget to handle the None case.
English
1
0
0
14
Dev
Dev@_dev14325·
🚀 Mastering Rust Option Handling: Hey everyone! I've been working on Rust's Option<T> and how to safely access characters in a string without triggering runtime panics. Rust’s strict ownership and type system might seem tough at first, but trust me, it’s good for the safety
English
1
0
0
13
Dev
Dev@_dev14325·
Here’s a sneak peek of my code, where I showcase: 🔹 Moving Ownership — How one variable transfers ownership to another. 🔹 Function Ownership — How Rust manages ownership when passing values to functions. 🔹 Ownership Return
Dev tweet media
English
0
0
0
14
Dev
Dev@_dev14325·
Mastering Ownership in Rust — No More Dangling Pointers or Double-Free Errors! 💪🦀 Hey everyone! I've been exploring Rust's ownership system, and I wanted to share a simple yet powerful concept that demonstrates how Rust prevents common memory issue
English
1
0
0
17
Dev
Dev@_dev14325·
Contributions and token allocations are being tracked, but the tokens will not be transferred immediately to ensure the refund process works properly if needed.
English
0
0
0
23
Dev
Dev@_dev14325·
🔑 Next Steps: Refund & Claim Functionality : I will soon implement functions that will allow users to: # Claim Tokens if the sale is successful. # Claim Refunds if the sale does not reach the minimum cap.
English
1
0
0
29
Dev
Dev@_dev14325·
I’ve developed and deployed a Token Sale system on the Sepolia Testnet ! Here’s a quick summary of what I’ve built: ERC-20 Token (erc20.sol): Created a custom token MTK (3,000,000 tokens minted initially), designed for distribution in both presale and public sale phases.
Dev tweet mediaDev tweet mediaDev tweet media
English
1
0
0
54