Skip to content

Instantly share code, notes, and snippets.

一(二)南ことり
二(右)東條希
三(左)西木野真姫
四(投)高坂穂乃果
五(中)絢瀬絵里
六(三)矢澤にこ
七(遊)星空凛
八(捕)園田海未
九(一)小泉花陽
/ 所有権帰ってくる
fn borrower_a(x: &int) -> int { *x }
// 所有権帰ってくる
fn borrower_b(x: &int) {
let a = x;
println!("{}", a);
}
// 所有権帰ってくる
trait Hoge {
fn hoge(&self) ->int;
}
impl<T> Hoge for Vec<T> {
fn hoge(&self) -> int { 1i }
}
fn main() {
let v = vec!(1i, 2, 3);
fn hoge() -> ||:'static -> bool {
let a = || { true };
return a;
}
fn main() {
let a = hoge();
a();
}
use std::hash::Hash;
use std::collections::HashMap;
pub struct Hashing<K: Eq + Hash, V: Eq + Hash> {
x: HashMap<K, V>
}
impl<'a, K: Eq + Hash + Clone, V: Eq + Hash + Clone> Hashing<K, V> {
pub fn new(h: HashMap<K, V>) -> Hashing<K, V> {
Hashing { x: h }
# にこまき
- EERR
- 大島智
- たみふる
- D否
# のぞえり
- murata
- 鈴宮きりは
- 高乃朔
--- Type 'make test' to test library
--- Built internal test runner
running 0 tests
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured
src/test.rs:18:23: 18:45 error: borrowed value does not live long enough
src/test.rs:18 let initial_vec = __::Vect::new(vec_int).initial(2u);
^~~~~~~~~~~~~~~~~~~~~~
#[allow(non_camel_case_types)]
struct __;
impl __ {
pub fn hello() {
println!("hello");
}
}
fn main() {
@gong023
gong023 / introduce_grunt_contrib_jasmine.diff
Created February 24, 2014 14:43
grunt_contrib_jasmine
diff --git a/.gitignore b/.gitignore
index 509eb00..99f37ae 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,2 @@
js/libs/
+node_modules/
diff --git a/Gruntfile.js b/Gruntfile.js
new file mode 100644
index 0000000..ab4b14e
@gong023
gong023 / fail switch_to.frame log
Created November 1, 2013 08:14
fail switch_to.frame log using Appium GUI 0.11.2
debug: Appium request initiated at /wd/hub/session
debug: Request received with params: {"desiredCapabilities":{"browserName":"","platform":"Mac","version":"6.1","device":"iPhone Simulator","app":"safari"}}
info: Trying to use mobile safari, version 6.1
info: Looking for built in app MobileSafari
info: Got app, trying to copy /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator6.1.sdk/Applications/MobileSafari.app to tmp dir