Skip to content

Instantly share code, notes, and snippets.

View Boddlnagg's full-sized avatar

Patrick Reisert Boddlnagg

View GitHub Profile
Compiling winrt v0.1.0 (file:///D:/Code/Rust/winrt-rust)
time: 3.015; rss: 510MB parsing
time: 0.000; rss: 511MB recursion limit
time: 0.000; rss: 511MB crate injection
time: 0.000; rss: 511MB plugin loading
time: 0.000; rss: 511MB plugin registration
time: 12.359; rss: 782MB expansion
time: 0.000; rss: 782MB maybe building test harness
time: 0.131; rss: 783MB maybe creating a macro crate
time: 0.000; rss: 783MB checking for inline asm in case the target doesn't support it
@Boddlnagg
Boddlnagg / hstring.rs
Created May 15, 2016 20:26
HSTRING wrapper
use ::std::ptr;
use ::winapi::*;
use ::runtimeobject::*;
pub struct HString(HSTRING);
impl<'a> From<&'a str> for HString {
fn from(s: &'a str) -> Self {
let mut s16: Vec<_> = s.encode_utf16().collect();
let len = s16.len();