


, sending it when I'm home again (around 2-4pm German timezone for you)

, sending it when I'm home again (around 2-4pm German timezone for you) 



If you want to work on interesting problems using Rust professionally, you should consider working here at Discord.

















































































shared_ptr's to C APIs?



































shared_ptr behind another pointer


shared_ptr behind another pointer std::shared_ptr<CHttpRunnable> *ppRunnable = malloc(sizeof *ppRunnable); *ppRunnable = pRunnable;






:) smilies


































bind or connect?

use std::net::UdpSocket;
fn main() -> std::io::Result<()> {
let socket = UdpSocket::bind("0.0.0.0:0")?;
let addr = socket.local_addr()?;
socket.send_to(b"Hello world?\n", &addr)?;
let mut buf = [0; 128];
let (read, addr) = socket.recv_from(&mut buf)?;
println!("{}: {}", addr, String::from_utf8_lossy(&buf[..read]));
Ok(())
}


use std::net::UdpSocket;
fn main() -> std::io::Result<()> {
let socket = UdpSocket::bind("0.0.0.0:0")?;
let addr = socket.local_addr()?;
socket.send_to(b"Hello world?\n", &addr)?;
let mut buf = [0; 128];
let (read, addr) = socket.recv_from(&mut buf)?;
println!("{}: {}", addr, String::from_utf8_lossy(&buf[..read]));
Ok(())
} 













python scripts/fix_style.py and it'll do it for you
















git rebase -i master? (edited)
git reset --soft HEAD^^^^^^^^^^^^^^^^^^ xd


git merge upstream/master is fine as well


git rebase master or with -i flag if you need to change commits



git merge master
rm -rf .git && git init && git add . && git commit -m fml







1









































