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 pointershared_ptr
behind another pointer std::shared_ptr<CHttpRunnable> *ppRunnable = malloc(sizeof *ppRunnable); *ppRunnable = pRunnable;
:)
smiliesbind
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 yougit rebase -i master
? (edited)git reset --soft HEAD^^^^^^^^^^^^^^^^^^
xdgit merge upstream/master
is fine as wellgit rebase master
or with -i
flag if you need to change commitsgit merge master
rm -rf .git && git init && git add . && git commit -m fml