This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Fresh array v0.1.4 (https://github.com/shadowmint/rust-array?ref=0.1.5#f574f1a3) | |
Compiling txt v0.1.0 (file:///Users/doug/dev/rust-txt) | |
src/parser/parser.rs:63:18: 63:35 error: cannot infer an appropriate lifetime for autoref due to conflicting requirements | |
src/parser/parser.rs:63 for token in ast.tokens.iter() { | |
^~~~~~~~~~~~~~~~~ | |
src/parser/parser.rs:62:3: 83:4 note: consider using an explicit lifetime parameter as shown: fn phase_pattern_match(&'a self, ast: &'a mut Ast<'a, T>) | |
src/parser/parser.rs:62 fn phase_pattern_match(&'a self, ast:&mut Ast<'a, T>) { | |
src/parser/parser.rs:63 for token in ast.tokens.iter() { | |
src/parser/parser.rs:64 let mut matched = false; | |
src/parser/parser.rs:65 self.patterns.iter().all(|pattern| -> bool { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@function str-split($value) { | |
$rtn: (); | |
$tmp: $value; | |
$busy: true; | |
@while $busy { | |
$index: str-index($tmp, ' '); | |
@if $index { | |
$bit: str-slice($tmp, 0, $index - 1); | |
$rtn: append($rtn, $bit); | |
$tmp: str-slice($tmp, $index + 1); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// Invoke this when the last 'length' nodes are all the same repeat type. | |
/// If the node before the first one is *also* that type, merge into that | |
/// node; otherwise perform the default repeat action. | |
fn reduce_repeat<'a>(&self, stack:&mut Vec<AstNode<'a, T>>, id:T, length:uint) { | |
let mut merged:Vec<AstNode<'a, T>> = Vec::new(); | |
for i in range(0, length) { | |
merged.push(stack.pop().unwrap()); | |
} | |
trace!("Trying to peform a repeat reducation...!") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ---- | |
// Sass (v3.3.14) | |
// Compass (v1.0.0) | |
// ---- | |
@function str-split($value) { | |
$rtn: (); | |
$tmp: $value; | |
$busy: true; | |
@while $busy { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
impl<'a> Iterator<Path> for GlobIter<'a> { | |
fn next(&mut self) -> Option<Path> { | |
match self.walker { | |
Some(ref mut walker) => { | |
let mut ended = false; | |
while !ended { | |
match walker.next() { | |
Some(v) => { | |
match v.lstat() { | |
Ok(stats) => { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dougs-Mac-mini:rust-array doug$ cargo test | |
Compiling array v0.1.6 (file:///Users/doug/dev/rust-array) | |
src/array.rs:140:64: 140:72 error: explicit lifetime bound required | |
src/array.rs:140 impl<'a, T: PartialEq + Clone + Default> Index<uint,T> for &'a Array<T> { | |
^~~~~~~~ | |
src/array.rs:147:71: 147:79 error: explicit lifetime bound required | |
src/array.rs:147 impl<'a, T: PartialEq + Clone + Default> IndexMut<uint,T> for &'a mut Array<T> { | |
^~~~~~~~ | |
src/view.rs:13:14: 13:22 error: explicit lifetime bound required | |
src/view.rs:13 parent:&'a Array<T>, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#pragma strict | |
import System.Collections.Generic; | |
/** Create a new instance */ | |
public static function factory(dx:int, dy:int, size:float):TacticsMap { | |
var rtn = new TacticsMap(); | |
rtn.tiles = new int[dx * dy]; | |
rtn.heights = new int[dx * dy]; | |
rtn.dx = dx; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use std::io::{File,IoResult,UserRWX}; | |
use std::os; | |
use std::io::TempDir; | |
use std::io::fs; | |
pub struct FileUtils { | |
pub path:Option<TempDir> | |
} | |
impl FileUtils { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use pattern::Pattern; | |
use pattern::Glob; | |
mod pattern; | |
fn main() { | |
let foo = Glob; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/lib/codegen.rs b/src/lib/codegen.rs | |
index 3166f63..f8121a8 100644 | |
--- a/src/lib/codegen.rs | |
+++ b/src/lib/codegen.rs | |
@@ -800,7 +800,7 @@ impl<'a> IndentWriter<'a> { | |
#[allow(dead_code)] | |
fn fail<S : Str>(&self, reason: S) { | |
- self.write_line(format!("fail!({:?});", reason)); | |
+ self.write_line(format!("fail!({});", reason.as_slice())); |