Skip to content

Instantly share code, notes, and snippets.

C:\Users\Trent\Desktop\blah\hello_world>cargo update gl -v
Updating git repository `https://github.com/bjz/gl-rs`
Unable to update https://github.com/bjz/gl-rs
Caused by:
failed to clone into: C:\Users\Trent\.cargo\git\db\gl-rs-5020f97825182d66
Caused by:
[2] SSL is not supported by this copy of libgit2.
C:\Users\Trent\Desktop\blah\hello_world>cargo update gl -v
Updating git repository `https://github.com/bjz/gl-rs`
Unable to update https://github.com/bjz/gl-rs
Caused by:
failed to clone into: C:\Users\Trent\.cargo\git\db\gl-rs-5020f97825182d66
Caused by:
[2] SSL is not supported by this copy of libgit2.
cargo.toml:
[package]
name = "hello_world"
version = "0.0.1"
authors = ["PudgePacket <[email protected]>"]
[dependencies.gl]
git = "https://github.com/bjz/gl-rs"
pub enum VertexData {
GeoVert(GeometericVertex),
TexVert(TextureVertex),
VertNml(VertexNormals),
PmSVert(ParameterSpaceVertex),
}
impl fmt::Show for VertexData {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
pub enum LineType {
GeometericVertexLine(GeometericVertex),
FaceLine(Face),
Failed,
Unused,
}
// Geometric vertex (v)
pub struct GeometericVertex {
pub x: f64,
// Geometric vertex (v)
pub struct GeometericVertex {
pub x: f64,
pub y: f64,
pub z: f64,
}
fn new_make_geometric_vertex<Y, T: Index<uint,Y>>(d: T) -> GeometericVertex {
GeometericVertex { x: d[0], y: d[1], z: d[2] }
}
fn line_type_from_reg<T>(line: &str, x:fn(&str) -> Option<T>) -> LineType {
match x(line) {
Some(y) => Failed,
None => Failed,
}
Failed
}
E:\Github\Rusticle\src\types\utils.rs:139:14: 139:20 error: missing lifetime specifier [E0106]
E:\Github\Rusticle\src\types\utils.rs:139 static rs: [(&Regex,fn(&str) -> LineType), ..1] = [(&GeometericVertexRegex,vert_from_reg)];
^~~~~~
error: aborting due to previous error
[Finished in 0.3s]
using System;
using System.Text.RegularExpressions;
using System.Linq;
namespace fun {
class MainClass {
public static void Main (string[] args) {
var input = Console.ReadLine ();
Console.WriteLine (input.Contains ("+") ? Enumerable.Aggregate (from n in (new Regex (@"\d+|\.\d+|\d+\.").Matches (input).OfType<Match> ())select (n.ToString ()), (acc, x) => (float.Parse (acc) + float.Parse (x)).ToString()) : "");
}
def make_counter(starting_value):
count = starting_value
def counter():
nonlocal count
count += 1
return count
return counter
my_counter = make_counter(5)
my_counter()