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::marker::PhantomData; | |
| use std::convert::TryFrom; | |
| use std::convert::TryInto; | |
| #[derive(Debug)] | |
| struct ConversionError; | |
| struct ResultSet<T> { | |
| column_names: Vec<String>, | |
| rows: Vec<Vec<i32>>, |
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::rc::Rc; | |
| struct ResultSet { | |
| column_names: Rc<Vec<String>>, | |
| rows: Vec<Vec<i32>>, | |
| } | |
| impl ResultSet { | |
| fn pop(&mut self) -> Option<Row> { | |
| self.rows.pop().map(|columns| Row { |
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
| struct ResultSet { | |
| column_names: Vec<String>, | |
| rows: Vec<Vec<i32>>, | |
| } | |
| impl ResultSet { | |
| fn get<'rs>(&'rs self, row_no: usize) -> Option<Row<'rs>> { | |
| self.rows.get(row_no).map(|columns| Row { | |
| column_names: self.column_names.as_slice(), | |
| columns: columns.as_slice(), |
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; | |
| struct Connection; | |
| struct Handle<'c>(&'c Connection); | |
| struct Statement<'c>(&'c Connection); | |
| struct Rows<'c, 'l>(Statement<'c>, &'l mut Handle<'c>); |
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; | |
| struct Connection; | |
| struct Handle<'c>(&'c Connection); | |
| struct Statement<'c>(&'c Connection); | |
| struct Rows<'c, 'l>(Statement<'c>, &'l mut Handle<'c>); |
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 tokio_timer::timer::Timer; | |
| use tokio_timer; | |
| use tokio_executor::park::{Park, Unpark, ParkThread}; | |
| use tokio_executor::Enter; | |
| use futures::sync::oneshot; | |
| use futures::Future; | |
| use std::thread; | |
| use std::sync::atomic::{AtomicBool, Ordering}; | |
| use std::sync::Arc; |
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::{self, Read, Seek, SeekFrom}; | |
| use std::fmt::Display; | |
| use futures::prelude::*; | |
| use futures::sync::mpsc::{unbounded, UnboundedReceiver, UnboundedSender}; | |
| use futures::unsync::mpsc::unbounded as unsync_unbounded; | |
| use futures::stream::iter_ok; | |
| use futures::future::{FutureResult, ok}; | |
| use futures::future::lazy; | |
| use std::thread; | |
| use std::env; |
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::collections::VecDeque; | |
| use std::time::{Instant, Duration}; | |
| #[derive(Debug)] | |
| struct Throughput { | |
| window: VecDeque<u64>, | |
| front: Instant, | |
| duration: Duration, | |
| } |
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::fmt::Debug; | |
| #[derive(Debug)] | |
| struct Server<State> where State: ServerState + Debug { | |
| work_dir: String, | |
| state: State | |
| } | |
| impl Server<Starting> { | |
| fn start(self) -> Server<Running> { |
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
| [15:43:26] [Server thread/INFO] [FML]: Loading dimension 2 (serv_mods) (net.minecraft.server.dedicated.DedicatedServer@67205199) | |
| [15:43:26] [Server thread/FATAL]: Error executing task | |
| java.util.concurrent.ExecutionException: java.lang.NoSuchMethodError: net.minecraft.world.biome.Biome.func_185361_o()I | |
| at java.util.concurrent.FutureTask.report(FutureTask.java:122) ~[?:1.8.0_25] | |
| at java.util.concurrent.FutureTask.get(FutureTask.java:192) ~[?:1.8.0_25] | |
| at net.minecraft.util.Util.func_181617_a(SourceFile:47) [h.class:?] | |
| at net.minecraft.server.MinecraftServer.func_71190_q(MinecraftServer.java:679) [MinecraftServer.class:?] | |
| at net.minecraft.server.dedicated.DedicatedServer.func_71190_q(DedicatedServer.java:384) [lh.class:?] | |
| at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:624) [MinecraftServer.class:?] | |
| at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:482) [MinecraftServer.class:?] |