horizon-world probes: one binary, probe <name>
The 168 horizon-world examples the parity harnesses run become modules of one example, examples/probe, that dispatches on its first argument; crate::args() gives each the command line its example saw. Linking ~170 binaries, each instantiating horizon-world's generics again, was most of the parity job's probe build (review plan, section 1). The harnesses build `--example probe` and run `probe <name> ...`. tools/parity.py counts only the probes a harness ran, and the support modules they name, as its dependencies, so editing one probe still reruns only its own harnesses (and PARITY_RUST_SCOPE keeps working). The six manual tools (benches, loot_fill, structure_blocks, vanilla_diff, attribute_memory, behaviour_load_profile) stay separate examples. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
+3
-3
@@ -512,9 +512,9 @@ fn run<R: RandomSource>(f: Value, out: &mut dyn Write, make: fn(i64) -> R) {
|
||||
writeln!(w.out, "random {i} {} {}", r.next_long(), r.next_long()).unwrap();
|
||||
}
|
||||
}
|
||||
fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let arg = std::env::args().nth(1).unwrap();
|
||||
let side = std::env::args().nth(2).unwrap();
|
||||
pub fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let arg = crate::args().nth(1).unwrap();
|
||||
let side = crate::args().nth(2).unwrap();
|
||||
let dir = Path::new(&arg);
|
||||
let mut out = io::BufWriter::new(fs::File::create(dir.join(format!("rust-{side}.txt")))?);
|
||||
for line in fs::read_to_string(dir.join(format!("inputs-{side}.txt")))?.lines() {
|
||||
+3
-3
@@ -304,9 +304,9 @@ fn run(f: Value, out: &mut dyn Write) {
|
||||
w.all(&s);
|
||||
}
|
||||
}
|
||||
fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let arg = std::env::args().nth(1).unwrap();
|
||||
let side = std::env::args().nth(2).unwrap();
|
||||
pub fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let arg = crate::args().nth(1).unwrap();
|
||||
let side = crate::args().nth(2).unwrap();
|
||||
let dir = Path::new(&arg);
|
||||
let mut out = io::BufWriter::new(fs::File::create(dir.join(format!("rust-{side}.txt")))?);
|
||||
for line in fs::read_to_string(dir.join(format!("inputs-{side}.txt")))?.lines() {
|
||||
+2
-2
@@ -18,8 +18,8 @@ fn anchor(
|
||||
a.to_json().unwrap_or_else(|_| "error".to_owned())
|
||||
)
|
||||
}
|
||||
fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let arg = std::env::args().nth(1).expect("private directory");
|
||||
pub fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let arg = crate::args().nth(1).expect("private directory");
|
||||
let dir = Path::new(&arg);
|
||||
let mut out = io::BufWriter::new(fs::File::create(dir.join("rust.txt"))?);
|
||||
for line in fs::read_to_string(dir.join("inputs.txt"))?.lines() {
|
||||
+2
-2
@@ -80,8 +80,8 @@ fn state(out: &mut dyn Write, id: usize, a: &Instance, pool: &[Modifier]) -> io:
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let arg = std::env::args().nth(1).expect("private fixture directory");
|
||||
pub fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let arg = crate::args().nth(1).expect("private fixture directory");
|
||||
let dir = Path::new(&arg);
|
||||
let mut out = io::BufWriter::new(fs::File::create(dir.join("rust.txt"))?);
|
||||
for line in fs::read_to_string(dir.join("inputs.txt"))?.lines() {
|
||||
+3
-3
@@ -304,10 +304,10 @@ fn run<A: TestAttributes>(dir: &Path, output: &str) -> Result<(), Box<dyn std::e
|
||||
Ok(())
|
||||
}
|
||||
|
||||
fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let arg = std::env::args().nth(1).unwrap();
|
||||
pub fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let arg = crate::args().nth(1).unwrap();
|
||||
let dir = Path::new(&arg);
|
||||
if std::env::args().nth(2).as_deref() == Some("live") {
|
||||
if crate::args().nth(2).as_deref() == Some("live") {
|
||||
run::<Live>(dir, "rust-live.txt")
|
||||
} else {
|
||||
run::<EntityAttributes>(dir, "rust.txt")
|
||||
+2
-2
@@ -271,7 +271,7 @@ mod integration {
|
||||
}
|
||||
}
|
||||
pub fn run() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let args: Vec<_> = std::env::args().collect();
|
||||
let args: Vec<_> = crate::args().collect();
|
||||
let dir = Path::new(&args[1]);
|
||||
let mut out =
|
||||
io::BufWriter::new(fs::File::create(dir.join(format!("rust-{}.txt", args[2])))?);
|
||||
@@ -499,6 +499,6 @@ mod integration {
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
pub fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
integration::run()
|
||||
}
|
||||
+3
-3
@@ -625,9 +625,9 @@ fn run(f: Value, out: &mut dyn Write) {
|
||||
w.all(&s);
|
||||
}
|
||||
}
|
||||
fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let arg = std::env::args().nth(1).unwrap();
|
||||
let side = std::env::args().nth(2).unwrap();
|
||||
pub fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let arg = crate::args().nth(1).unwrap();
|
||||
let side = crate::args().nth(2).unwrap();
|
||||
let dir = Path::new(&arg);
|
||||
let mut out = io::BufWriter::new(fs::File::create(dir.join(format!("rust-{side}.txt")))?);
|
||||
for line in fs::read_to_string(dir.join(format!("inputs-{side}.txt")))?.lines() {
|
||||
+2
-2
@@ -156,8 +156,8 @@ fn fixture(
|
||||
writeln!(out, "tail {}", random.next_long())?;
|
||||
Ok(())
|
||||
}
|
||||
fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let arg = std::env::args().nth(1).expect("private fixture directory");
|
||||
pub fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let arg = crate::args().nth(1).expect("private fixture directory");
|
||||
let dir = Path::new(&arg);
|
||||
let ids: [u32; 5] = serde_json::from_str(&fs::read_to_string(dir.join("facts-server.json"))?)?;
|
||||
let blocks = ids.map(BlockStateId);
|
||||
+2
-2
@@ -20,8 +20,8 @@ fn biome_key(id: &i32) -> Option<&str> {
|
||||
_ => Some("horizon:other"),
|
||||
}
|
||||
}
|
||||
fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let arg = std::env::args().nth(1).expect("private fixture directory");
|
||||
pub fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let arg = crate::args().nth(1).expect("private fixture directory");
|
||||
let dir = Path::new(&arg);
|
||||
let mut out = io::BufWriter::new(fs::File::create(dir.join("rust.txt"))?);
|
||||
for line in fs::read_to_string(dir.join("inputs.txt"))?.lines() {
|
||||
+2
-2
@@ -20,8 +20,8 @@ use std::{
|
||||
fn n(v: &Value) -> i32 {
|
||||
v.as_i64().unwrap() as i32
|
||||
}
|
||||
fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let arg = std::env::args().nth(1).expect("private fixture directory");
|
||||
pub fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let arg = crate::args().nth(1).expect("private fixture directory");
|
||||
let dir = Path::new(&arg);
|
||||
let bundle: Value = serde_json::from_str(&fs::read_to_string(dir.join("registries.json"))?)?;
|
||||
let noises: BTreeMap<String, String> = serde_json::from_value(bundle["noises"].clone())?;
|
||||
+2
-2
@@ -150,8 +150,8 @@ fn fixture(
|
||||
writeln!(world.out, "tail {}", random.next_long())?;
|
||||
Ok(())
|
||||
}
|
||||
fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let arg = std::env::args().nth(1).expect("private fixture directory");
|
||||
pub fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let arg = crate::args().nth(1).expect("private fixture directory");
|
||||
let dir = Path::new(&arg);
|
||||
let mut out = io::BufWriter::new(fs::File::create(dir.join("rust.txt"))?);
|
||||
for line in fs::read_to_string(dir.join("inputs.txt"))?.lines() {
|
||||
+2
-2
@@ -26,8 +26,8 @@ fn normalized(value: Value) -> Value {
|
||||
value => value,
|
||||
}
|
||||
}
|
||||
fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let arg = std::env::args().nth(1).expect("private fixture directory");
|
||||
pub fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let arg = crate::args().nth(1).expect("private fixture directory");
|
||||
let dir = Path::new(&arg);
|
||||
let read = |name: &str| -> Result<BTreeMap<String, String>, Box<dyn std::error::Error>> {
|
||||
Ok(serde_json::from_str(&fs::read_to_string(
|
||||
+2
-2
@@ -29,8 +29,8 @@ impl DensitySampler for Erosion {
|
||||
}
|
||||
}
|
||||
}
|
||||
fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let arg = std::env::args().nth(1).expect("private fixture directory");
|
||||
pub fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let arg = crate::args().nth(1).expect("private fixture directory");
|
||||
let dir = Path::new(&arg);
|
||||
let mut out = io::BufWriter::new(fs::File::create(dir.join("rust.txt"))?);
|
||||
for line in fs::read_to_string(dir.join("inputs.txt"))?.lines() {
|
||||
+2
-2
@@ -68,8 +68,8 @@ fn operations(worker: &mut BiomeTemperature, ops: &Value, out: &mut impl Write)
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let arg = std::env::args().nth(1).expect("private directory");
|
||||
pub fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let arg = crate::args().nth(1).expect("private directory");
|
||||
let dir = Path::new(&arg);
|
||||
let mut out = io::BufWriter::new(fs::File::create(dir.join("rust.txt"))?);
|
||||
for line in fs::read_to_string(dir.join("inputs.txt"))?.lines() {
|
||||
+2
-2
@@ -174,8 +174,8 @@ impl<W: Write> BlockCollisionWorld for World<W> {
|
||||
Ok(self.palette[block.state.0 as usize].shape.clone())
|
||||
}
|
||||
}
|
||||
fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let arg = std::env::args().nth(1).expect("private fixture directory");
|
||||
pub fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let arg = crate::args().nth(1).expect("private fixture directory");
|
||||
let dir = Path::new(&arg);
|
||||
let out = Rc::new(RefCell::new(io::BufWriter::new(fs::File::create(
|
||||
dir.join("rust.txt"),
|
||||
+2
-2
@@ -72,8 +72,8 @@ fn pending(tag: Option<&Tag>) -> String {
|
||||
}
|
||||
}
|
||||
}
|
||||
fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let args: Vec<_> = std::env::args().collect();
|
||||
pub fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let args: Vec<_> = crate::args().collect();
|
||||
let mut out = io::BufWriter::new(fs::File::create(&args[2])?);
|
||||
let mut position = ChunkPos::default();
|
||||
let mut chunk = ProtoBlockEntities::<i64>::new(position);
|
||||
+2
-2
@@ -237,8 +237,8 @@ impl BlockLandingWorld for World<'_, '_> {
|
||||
self.query(format!("level-event {e} {} {d}", pos(p)))
|
||||
}
|
||||
}
|
||||
fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let arg = std::env::args().nth(1).expect("private fixture directory");
|
||||
pub fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let arg = crate::args().nth(1).expect("private fixture directory");
|
||||
let dir = Path::new(&arg);
|
||||
let mut out = io::BufWriter::new(fs::File::create(dir.join("rust.txt"))?);
|
||||
let read = |name: &str| -> Result<Tag, Box<dyn std::error::Error>> {
|
||||
+2
-2
@@ -20,8 +20,8 @@ fn bbox(v: &Value) -> Aabb {
|
||||
.collect::<Vec<_>>();
|
||||
Aabb::new(Vec3::new(v[0], v[1], v[2]), Vec3::new(v[3], v[4], v[5]))
|
||||
}
|
||||
fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let arg = std::env::args().nth(1).expect("private fixture directory");
|
||||
pub fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let arg = crate::args().nth(1).expect("private fixture directory");
|
||||
let dir = Path::new(&arg);
|
||||
let read = |name: &str| -> Result<Tag, Box<dyn std::error::Error>> {
|
||||
Ok(
|
||||
+2
-2
@@ -97,8 +97,8 @@ impl BlockPushWorld for World<'_> {
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let arg = std::env::args().nth(1).expect("private fixture directory");
|
||||
pub fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let arg = crate::args().nth(1).expect("private fixture directory");
|
||||
let dir = Path::new(&arg);
|
||||
let mut out = io::BufWriter::new(fs::File::create(dir.join("rust.txt"))?);
|
||||
for line in fs::read_to_string(dir.join("inputs.txt"))?.lines() {
|
||||
+2
-2
@@ -22,8 +22,8 @@ fn tag(v: &Value) -> Tag {
|
||||
_ => panic!("invalid registry metadata"),
|
||||
}
|
||||
}
|
||||
fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let arg = std::env::args().nth(1).expect("private fixture directory");
|
||||
pub fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let arg = crate::args().nth(1).expect("private fixture directory");
|
||||
let dir = Path::new(&arg);
|
||||
let facts: Value = serde_json::from_str(&fs::read_to_string(dir.join("facts-server.json"))?)?;
|
||||
let registry = BlockRegistry::from_nbt(&Tag::compound([
|
||||
+2
-2
@@ -9,8 +9,8 @@ use std::{
|
||||
io::{self, Write},
|
||||
path::Path,
|
||||
};
|
||||
fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let arg = std::env::args().nth(1).expect("private fixture directory");
|
||||
pub fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let arg = crate::args().nth(1).expect("private fixture directory");
|
||||
let dir = Path::new(&arg);
|
||||
let read = |name: &str| -> Result<Tag, Box<dyn std::error::Error>> {
|
||||
Ok(
|
||||
+2
-2
@@ -103,8 +103,8 @@ impl<W: Write> SurvivalWorld for World<'_, W> {
|
||||
Ok(self.neighbors[old as usize % self.neighbors.len()])
|
||||
}
|
||||
}
|
||||
fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let arg = std::env::args().nth(1).expect("private fixture directory");
|
||||
pub fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let arg = crate::args().nth(1).expect("private fixture directory");
|
||||
let dir = Path::new(&arg);
|
||||
let read = |name: &str| -> Result<Tag, Box<dyn std::error::Error>> {
|
||||
Ok(
|
||||
+2
-2
@@ -191,8 +191,8 @@ fn summary(level: &Cells, before: &HashMap<BlockPos, BlockStateId>, out: &mut St
|
||||
}
|
||||
}
|
||||
|
||||
fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let mut args = std::env::args().skip(1);
|
||||
pub fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let mut args = crate::args().skip(1);
|
||||
let resources = args.next().expect("resource directory");
|
||||
let cases = args.next().expect("case file");
|
||||
let output = args.next().expect("output file");
|
||||
+2
-2
@@ -117,8 +117,8 @@ impl BlockingItemDamageWorld for World<'_> {
|
||||
Ok(self.flag("server"))
|
||||
}
|
||||
}
|
||||
fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let arg = std::env::args().nth(1).unwrap();
|
||||
pub fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let arg = crate::args().nth(1).unwrap();
|
||||
let dir = Path::new(&arg);
|
||||
let mut out = io::BufWriter::new(fs::File::create(dir.join("rust.txt"))?);
|
||||
for line in fs::read_to_string(dir.join("inputs.txt"))?.lines() {
|
||||
+2
-2
@@ -51,8 +51,8 @@ impl TypeMatchWorld for World<'_> {
|
||||
})
|
||||
}
|
||||
}
|
||||
fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let arg = std::env::args().nth(1).unwrap();
|
||||
pub fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let arg = crate::args().nth(1).unwrap();
|
||||
let dir = Path::new(&arg);
|
||||
let mut out = io::BufWriter::new(fs::File::create(dir.join("rust.txt"))?);
|
||||
for line in fs::read_to_string(dir.join("inputs.txt"))?.lines() {
|
||||
+2
-2
@@ -151,8 +151,8 @@ fn fixture(
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let arg = std::env::args().nth(1).expect("private fixture directory");
|
||||
pub fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let arg = crate::args().nth(1).expect("private fixture directory");
|
||||
let dir = Path::new(&arg);
|
||||
let facts: Value = serde_json::from_str(&fs::read_to_string(dir.join("facts-server.json"))?)?;
|
||||
let bundle: Value = serde_json::from_str(&fs::read_to_string(dir.join("tags.json"))?)?;
|
||||
+2
-2
@@ -69,8 +69,8 @@ fn maximum(v: &Value) -> Option<i32> {
|
||||
fn fraction(f: Fraction) -> String {
|
||||
format!("{}/{}", f.numerator(), f.denominator())
|
||||
}
|
||||
fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let arg = std::env::args().nth(1).unwrap();
|
||||
pub fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let arg = crate::args().nth(1).unwrap();
|
||||
let dir = Path::new(&arg);
|
||||
let mut out = io::BufWriter::new(fs::File::create(dir.join("rust.txt"))?);
|
||||
for line in fs::read_to_string(dir.join("inputs.txt"))?.lines() {
|
||||
+2
-2
@@ -82,8 +82,8 @@ fn fixture(
|
||||
writeln!(out, "tail {}", random.next_long())?;
|
||||
Ok(())
|
||||
}
|
||||
fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let arg = std::env::args().nth(1).expect("private fixture directory");
|
||||
pub fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let arg = crate::args().nth(1).expect("private fixture directory");
|
||||
let dir = Path::new(&arg);
|
||||
let mut out = io::BufWriter::new(fs::File::create(dir.join("rust.txt"))?);
|
||||
for line in fs::read_to_string(dir.join("inputs.txt"))?.lines() {
|
||||
+2
-2
@@ -47,8 +47,8 @@ impl CarverOutput for Output<'_> {
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let arg = std::env::args().nth(1).expect("private fixture directory");
|
||||
pub fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let arg = crate::args().nth(1).expect("private fixture directory");
|
||||
let dir = Path::new(&arg);
|
||||
let mut out = io::BufWriter::new(fs::File::create(dir.join("rust.txt"))?);
|
||||
for line in fs::read_to_string(dir.join("inputs.txt"))?.lines() {
|
||||
+2
-2
@@ -9,8 +9,8 @@ use std::{
|
||||
fn n(v: &Value) -> i32 {
|
||||
v.as_i64().unwrap() as i32
|
||||
}
|
||||
fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let arg = std::env::args().nth(1).expect("private fixture directory");
|
||||
pub fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let arg = crate::args().nth(1).expect("private fixture directory");
|
||||
let dir = Path::new(&arg);
|
||||
let mut out = io::BufWriter::new(fs::File::create(dir.join("rust.txt"))?);
|
||||
for line in fs::read_to_string(dir.join("inputs.txt"))?.lines() {
|
||||
+2
-2
@@ -82,8 +82,8 @@ fn fixture(
|
||||
writeln!(out, "tail {}", random.next_long())?;
|
||||
Ok(())
|
||||
}
|
||||
fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let arg = std::env::args().nth(1).expect("private fixture directory");
|
||||
pub fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let arg = crate::args().nth(1).expect("private fixture directory");
|
||||
let dir = Path::new(&arg);
|
||||
let mut out = io::BufWriter::new(fs::File::create(dir.join("rust.txt"))?);
|
||||
for line in fs::read_to_string(dir.join("inputs.txt"))?.lines() {
|
||||
+2
-2
@@ -106,8 +106,8 @@ fn canonical(tag: &Tag, out: &mut String) {
|
||||
}
|
||||
}
|
||||
|
||||
fn main() -> Result<(), Error> {
|
||||
let mut args = std::env::args().skip(1);
|
||||
pub fn main() -> Result<(), Error> {
|
||||
let mut args = crate::args().skip(1);
|
||||
let resources = std::path::PathBuf::from(args.next().ok_or("client resource directory")?);
|
||||
let seed: i64 = args.next().ok_or("seed")?.parse()?;
|
||||
let dimension = format!("minecraft:{}", args.next().ok_or("dimension")?);
|
||||
+2
-2
@@ -223,8 +223,8 @@ fn fixture(
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let arg = std::env::args().nth(1).expect("private fixture directory");
|
||||
pub fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let arg = crate::args().nth(1).expect("private fixture directory");
|
||||
let dir = Path::new(&arg);
|
||||
let facts: Value = serde_json::from_str(&fs::read_to_string(dir.join("facts-server.json"))?)?;
|
||||
let bundle: Value = serde_json::from_str(&fs::read_to_string(dir.join("tags.json"))?)?;
|
||||
+2
-2
@@ -4,8 +4,8 @@ use std::{
|
||||
fs,
|
||||
io::{self, Write},
|
||||
};
|
||||
fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let args: Vec<_> = std::env::args().collect();
|
||||
pub fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let args: Vec<_> = crate::args().collect();
|
||||
let mut out = io::BufWriter::new(fs::File::create(&args[2])?);
|
||||
writeln!(
|
||||
out,
|
||||
+2
-2
@@ -69,8 +69,8 @@ impl ClimbingWorld for World<'_> {
|
||||
self.last = Some(p);
|
||||
}
|
||||
}
|
||||
fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let arg = std::env::args().nth(1).unwrap();
|
||||
pub fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let arg = crate::args().nth(1).unwrap();
|
||||
let dir = Path::new(&arg);
|
||||
let registry = BlockRegistry::from_nbt(
|
||||
&nbt::read_named(
|
||||
+2
-2
@@ -244,8 +244,8 @@ impl<W: Write> PowderSnowWorld for RegistryWorld<'_, W> {
|
||||
Ok(self.feet.is_item("minecraft:leather_boots"))
|
||||
}
|
||||
}
|
||||
fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let arg = std::env::args().nth(1).expect("private fixture directory");
|
||||
pub fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let arg = crate::args().nth(1).expect("private fixture directory");
|
||||
let dir = Path::new(&arg);
|
||||
let registry = if dir.join("block-registry.nbt").exists() {
|
||||
Some(BlockRegistry::from_nbt(
|
||||
+2
-6
@@ -56,12 +56,8 @@ impl Input<'_> {
|
||||
Vec3::new(self.number(), self.number(), self.number())
|
||||
}
|
||||
}
|
||||
fn main() -> Result<(), Box<dyn Error>> {
|
||||
let base = PathBuf::from(
|
||||
std::env::args()
|
||||
.nth(1)
|
||||
.ok_or("fixture directory required")?,
|
||||
);
|
||||
pub fn main() -> Result<(), Box<dyn Error>> {
|
||||
let base = PathBuf::from(crate::args().nth(1).ok_or("fixture directory required")?);
|
||||
let (registry_root, _) = nbt::read_named(
|
||||
&fs::read(base.join("block-registry.nbt"))?,
|
||||
Limits::default(),
|
||||
+2
-2
@@ -56,8 +56,8 @@ impl ArmorWorld for World<'_> {
|
||||
Ok(v)
|
||||
}
|
||||
}
|
||||
fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let arg = std::env::args().nth(1).unwrap();
|
||||
pub fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let arg = crate::args().nth(1).unwrap();
|
||||
let dir = Path::new(&arg);
|
||||
let mut out = io::BufWriter::new(fs::File::create(dir.join("rust.txt"))?);
|
||||
for line in fs::read_to_string(dir.join("inputs.txt"))?.lines() {
|
||||
+2
-2
@@ -135,8 +135,8 @@ impl DurabilityWorld for World<'_> {
|
||||
writeln!(self.out, "copy-after {}", snapshot(©))
|
||||
}
|
||||
}
|
||||
fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let arg = std::env::args().nth(1).unwrap();
|
||||
pub fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let arg = crate::args().nth(1).unwrap();
|
||||
let dir = Path::new(&arg);
|
||||
let mut out = io::BufWriter::new(fs::File::create(dir.join("rust.txt"))?);
|
||||
for line in fs::read_to_string(dir.join("inputs.txt"))?.lines() {
|
||||
+2
-2
@@ -88,8 +88,8 @@ fn snapshot(
|
||||
maps[1] == maps[2]
|
||||
)
|
||||
}
|
||||
fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let arg = std::env::args().nth(1).unwrap();
|
||||
pub fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let arg = crate::args().nth(1).unwrap();
|
||||
let dir = Path::new(&arg);
|
||||
let mut out = io::BufWriter::new(fs::File::create(dir.join("rust.txt"))?);
|
||||
for line in fs::read_to_string(dir.join("inputs.txt"))?.lines() {
|
||||
+2
-2
@@ -237,8 +237,8 @@ fn run<R: RandomSource>(f: Value, out: &mut dyn Write, make: fn(i64) -> R) {
|
||||
writeln!(w.out, "random {i} {} {}", r.next_long(), r.next_long()).unwrap();
|
||||
}
|
||||
}
|
||||
fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let arg = std::env::args().nth(1).unwrap();
|
||||
pub fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let arg = crate::args().nth(1).unwrap();
|
||||
let dir = Path::new(&arg);
|
||||
let mut out = io::BufWriter::new(fs::File::create(dir.join("rust.txt"))?);
|
||||
for line in fs::read_to_string(dir.join("inputs.txt"))?.lines() {
|
||||
+2
-2
@@ -403,8 +403,8 @@ fn run<R: RandomSource>(f: Value, out: &mut dyn Write, make: fn(i64) -> R) {
|
||||
writeln!(w.out, "random {i} {} {}", r.next_long(), r.next_long()).unwrap();
|
||||
}
|
||||
}
|
||||
fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let arg = std::env::args().nth(1).unwrap();
|
||||
pub fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let arg = crate::args().nth(1).unwrap();
|
||||
let dir = Path::new(&arg);
|
||||
let mut out = io::BufWriter::new(fs::File::create(dir.join("rust.txt"))?);
|
||||
for line in fs::read_to_string(dir.join("inputs.txt"))?.lines() {
|
||||
+2
-2
@@ -206,8 +206,8 @@ fn run<R: RandomSource>(f: Value, out: &mut dyn Write, make: fn(i64) -> R) {
|
||||
writeln!(w.out, "random {i} {} {}", r.next_long(), r.next_long()).unwrap();
|
||||
}
|
||||
}
|
||||
fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let arg = std::env::args().nth(1).unwrap();
|
||||
pub fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let arg = crate::args().nth(1).unwrap();
|
||||
let dir = Path::new(&arg);
|
||||
let mut out = io::BufWriter::new(fs::File::create(dir.join("rust.txt"))?);
|
||||
for line in fs::read_to_string(dir.join("inputs.txt"))?.lines() {
|
||||
+2
-2
@@ -91,8 +91,8 @@ impl ImmunityWorld for Env<'_> {
|
||||
self.query("loaded", "loaded")
|
||||
}
|
||||
}
|
||||
fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let arg = std::env::args().nth(1).unwrap();
|
||||
pub fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let arg = crate::args().nth(1).unwrap();
|
||||
let dir = Path::new(&arg);
|
||||
let slots: Value = serde_json::from_str(&fs::read_to_string(dir.join("slots.json"))?)?;
|
||||
let mut out = io::BufWriter::new(fs::File::create(dir.join("rust.txt"))?);
|
||||
+2
-2
@@ -115,8 +115,8 @@ impl DamageReductionWorld for World<'_> {
|
||||
Ok(0.0)
|
||||
}
|
||||
}
|
||||
fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let arg = std::env::args().nth(1).unwrap();
|
||||
pub fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let arg = crate::args().nth(1).unwrap();
|
||||
let dir = Path::new(&arg);
|
||||
let slots: Value = serde_json::from_str(&fs::read_to_string(dir.join("slots.json"))?)?;
|
||||
let mut out = io::BufWriter::new(fs::File::create(dir.join("rust.txt"))?);
|
||||
+2
-2
@@ -85,8 +85,8 @@ impl SourceWorld for World<'_> {
|
||||
Ok(self.state()["creative"][id].as_bool().unwrap())
|
||||
}
|
||||
}
|
||||
fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let arg = std::env::args().nth(1).unwrap();
|
||||
pub fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let arg = crate::args().nth(1).unwrap();
|
||||
let dir = Path::new(&arg);
|
||||
let catalog = Catalog::from_json(
|
||||
&serde_json::from_str(&fs::read_to_string(dir.join("catalog.json"))?)?,
|
||||
+3
-3
@@ -4,7 +4,7 @@
|
||||
//! With a TARGET DataVersion only the data fixes up to it run, on a world in the
|
||||
//! layout of before 1.16.
|
||||
use horizon_world::datafix::files;
|
||||
use std::{env, fs, io, path::Path, process::ExitCode};
|
||||
use std::{fs, io, path::Path, process::ExitCode};
|
||||
|
||||
fn copy(from: &Path, to: &Path) -> io::Result<()> {
|
||||
fs::create_dir_all(to)?;
|
||||
@@ -20,8 +20,8 @@ fn copy(from: &Path, to: &Path) -> io::Result<()> {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
fn main() -> ExitCode {
|
||||
let args: Vec<String> = env::args().skip(1).collect();
|
||||
pub fn main() -> ExitCode {
|
||||
let args: Vec<String> = crate::args().skip(1).collect();
|
||||
let (input, output, target) = match args.as_slice() {
|
||||
[input, output] => (input, output, None),
|
||||
[input, output, target] => (input, output, target.parse::<i32>().ok()),
|
||||
+2
-2
@@ -102,8 +102,8 @@ impl<W: Write> PlacementContext for World<'_, W> {
|
||||
.is_some_and(|steps| steps.iter().flatten().any(|id| *id == feature)))
|
||||
}
|
||||
}
|
||||
fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let arg = std::env::args().nth(1).expect("private fixture directory");
|
||||
pub fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let arg = crate::args().nth(1).expect("private fixture directory");
|
||||
let dir = Path::new(&arg);
|
||||
let mut out = io::BufWriter::new(fs::File::create(dir.join("rust.txt"))?);
|
||||
for line in fs::read_to_string(dir.join("inputs.txt"))?.lines() {
|
||||
+3
-4
@@ -1,5 +1,4 @@
|
||||
#[path = "support/decoration_storage.rs"]
|
||||
mod storage;
|
||||
use crate::support::decoration_storage as storage;
|
||||
use horizon_core::{
|
||||
biome::obfuscate_seed,
|
||||
position::{BlockPos, ChunkPos},
|
||||
@@ -292,8 +291,8 @@ fn fixture(
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let arg = std::env::args().nth(1).expect("private fixture directory");
|
||||
pub fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let arg = crate::args().nth(1).expect("private fixture directory");
|
||||
let dir = Path::new(&arg);
|
||||
let (registry, states) = storage::load(dir)?;
|
||||
let mut out = io::BufWriter::new(fs::File::create(dir.join("rust.txt"))?);
|
||||
+2
-2
@@ -152,8 +152,8 @@ impl<W: Write> PistonCollisionWorld for World<'_, W> {
|
||||
.map_err(io::Error::other)
|
||||
}
|
||||
}
|
||||
fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let arg = std::env::args().nth(1).expect("private fixture directory");
|
||||
pub fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let arg = crate::args().nth(1).expect("private fixture directory");
|
||||
let dir = Path::new(&arg);
|
||||
let facts: Value = serde_json::from_str(&fs::read_to_string(dir.join("facts.json"))?)?;
|
||||
let states = facts["states"]
|
||||
+2
-2
@@ -73,8 +73,8 @@ impl EdgeBackoffWorld for World<'_> {
|
||||
.unwrap_or(false))
|
||||
}
|
||||
}
|
||||
fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let arg = std::env::args().nth(1).expect("private fixture directory");
|
||||
pub fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let arg = crate::args().nth(1).expect("private fixture directory");
|
||||
let dir = Path::new(&arg);
|
||||
let mut out = io::BufWriter::new(fs::File::create(dir.join("rust.txt"))?);
|
||||
for line in fs::read_to_string(dir.join("inputs.txt"))?.lines() {
|
||||
+2
-2
@@ -228,8 +228,8 @@ fn error(e: Error<Stop>) -> &'static str {
|
||||
Error::World(Stop::Duplicate) => "duplicate",
|
||||
}
|
||||
}
|
||||
fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let arg = std::env::args().nth(1).unwrap();
|
||||
pub fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let arg = crate::args().nth(1).unwrap();
|
||||
let dir = Path::new(&arg);
|
||||
let mut out = io::BufWriter::new(fs::File::create(dir.join("rust.txt"))?);
|
||||
for line in fs::read_to_string(dir.join("inputs.txt"))?.lines() {
|
||||
+3
-3
@@ -494,9 +494,9 @@ fn run(f: Value, out: &mut dyn Write) {
|
||||
w.all(&s);
|
||||
}
|
||||
}
|
||||
fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let arg = std::env::args().nth(1).unwrap();
|
||||
let side = std::env::args().nth(2).unwrap();
|
||||
pub fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let arg = crate::args().nth(1).unwrap();
|
||||
let side = crate::args().nth(2).unwrap();
|
||||
let dir = Path::new(&arg);
|
||||
let mut out = io::BufWriter::new(fs::File::create(dir.join(format!("rust-{side}.txt")))?);
|
||||
for line in fs::read_to_string(dir.join(format!("inputs-{side}.txt")))?.lines() {
|
||||
+2
-2
@@ -330,8 +330,8 @@ impl EffectSyncWorld<Key> for World<'_> {
|
||||
sync::update_invisibility(s, self)
|
||||
}
|
||||
}
|
||||
fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let args: Vec<_> = std::env::args().collect();
|
||||
pub fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let args: Vec<_> = crate::args().collect();
|
||||
let dir = Path::new(&args[1]);
|
||||
let metadata: Value = serde_json::from_str(&fs::read_to_string(dir.join("catalog.json"))?)?;
|
||||
let catalog = Catalog::from_json(&metadata)?;
|
||||
+2
-2
@@ -36,8 +36,8 @@ fn lookup(out: &mut dyn Write, label: &str, result: Result<f64, LookupError>) ->
|
||||
),
|
||||
}
|
||||
}
|
||||
fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let arg = std::env::args().nth(1).unwrap();
|
||||
pub fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let arg = crate::args().nth(1).unwrap();
|
||||
let dir = Path::new(&arg);
|
||||
let catalog = Arc::new(Catalog::from_json(&serde_json::from_str(
|
||||
&fs::read_to_string(dir.join("catalog.json"))?,
|
||||
+2
-2
@@ -142,8 +142,8 @@ impl<W: Write> EntityCollisionWorld for World<'_, W> {
|
||||
&& source.is_none_or(|id| self.entities[id.0 as usize - 1].root != entity.root))
|
||||
}
|
||||
}
|
||||
fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let arg = std::env::args().nth(1).expect("private fixture directory");
|
||||
pub fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let arg = crate::args().nth(1).expect("private fixture directory");
|
||||
let dir = Path::new(&arg);
|
||||
let mut out = io::BufWriter::new(fs::File::create(dir.join("rust.txt"))?);
|
||||
for line in fs::read_to_string(dir.join("inputs.txt"))?.lines() {
|
||||
+2
-2
@@ -319,8 +319,8 @@ fn limit_checks(template: &Value, states: [FluidState; 5]) {
|
||||
assert!(!interaction.update(&mut world, false, 0).unwrap());
|
||||
assert!(interaction.trackers().is_empty());
|
||||
}
|
||||
fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let arg = std::env::args().nth(1).expect("private fixture directory");
|
||||
pub fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let arg = crate::args().nth(1).expect("private fixture directory");
|
||||
let dir = Path::new(&arg);
|
||||
let mut out = io::BufWriter::new(fs::File::create(dir.join("rust.txt"))?);
|
||||
let load = |n: &str| -> Result<_, Box<dyn std::error::Error>> {
|
||||
+2
-2
@@ -327,8 +327,8 @@ impl RestitutionWorld for Bounce<'_, '_> {
|
||||
self.0.set_velocity(v)
|
||||
}
|
||||
}
|
||||
fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let arg = std::env::args().nth(1).expect("private fixture directory");
|
||||
pub fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let arg = crate::args().nth(1).expect("private fixture directory");
|
||||
let dir = Path::new(&arg);
|
||||
let mut out = io::BufWriter::new(fs::File::create(dir.join("rust.txt"))?);
|
||||
for line in fs::read_to_string(dir.join("inputs.txt"))?.lines() {
|
||||
+2
-2
@@ -69,8 +69,8 @@ fn bbox(v: &Value) -> Aabb {
|
||||
Vec3::new(values[3], values[4], values[5]),
|
||||
)
|
||||
}
|
||||
fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let arg = std::env::args().nth(1).expect("private fixture directory");
|
||||
pub fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let arg = crate::args().nth(1).expect("private fixture directory");
|
||||
let dir = Path::new(&arg);
|
||||
let mut out = io::BufWriter::new(fs::File::create(dir.join("rust.txt"))?);
|
||||
for line in fs::read_to_string(dir.join("inputs.txt"))?.lines() {
|
||||
+2
-2
@@ -392,8 +392,8 @@ impl AfterUseWorld<usize, u8, Component> for World {
|
||||
c.apply(self, original)
|
||||
}
|
||||
}
|
||||
fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let arg = std::env::args().nth(1).unwrap();
|
||||
pub fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let arg = crate::args().nth(1).unwrap();
|
||||
let dir = Path::new(&arg);
|
||||
let mut out = io::BufWriter::new(fs::File::create(dir.join("rust.txt"))?);
|
||||
for line in fs::read_to_string(dir.join("inputs.txt"))?.lines() {
|
||||
+2
-2
@@ -77,8 +77,8 @@ fn emit(out: &mut impl Write, shape: &VoxelShape) -> io::Result<()> {
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let arg = std::env::args().nth(1).expect("private fixture directory");
|
||||
pub fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let arg = crate::args().nth(1).expect("private fixture directory");
|
||||
let dir = Path::new(&arg);
|
||||
let mut out = io::BufWriter::new(fs::File::create(dir.join("rust.txt"))?);
|
||||
for line in fs::read_to_string(dir.join("inputs.txt"))?.lines() {
|
||||
+2
-2
@@ -12,8 +12,8 @@ use std::{
|
||||
io::{BufRead, BufReader, BufWriter, Write},
|
||||
path::Path,
|
||||
};
|
||||
fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let path = std::env::args().nth(1).ok_or("private fixture directory")?;
|
||||
pub fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let path = crate::args().nth(1).ok_or("private fixture directory")?;
|
||||
let dir = Path::new(&path);
|
||||
let read = |name: &str| -> Result<Tag, Box<dyn std::error::Error>> {
|
||||
Ok(
|
||||
+2
-2
@@ -100,8 +100,8 @@ impl FallDamageWorld for World<'_> {
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let arg = std::env::args().nth(1).expect("private fixture directory");
|
||||
pub fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let arg = crate::args().nth(1).expect("private fixture directory");
|
||||
let dir = Path::new(&arg);
|
||||
let mut out = io::BufWriter::new(fs::File::create(dir.join("rust.txt"))?);
|
||||
for line in fs::read_to_string(dir.join("inputs.txt"))?.lines() {
|
||||
+2
-2
@@ -189,8 +189,8 @@ fn tag(v: &Value) -> Tag {
|
||||
_ => panic!("invalid registry metadata"),
|
||||
}
|
||||
}
|
||||
fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let arg = std::env::args().nth(1).expect("private fixture directory");
|
||||
pub fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let arg = crate::args().nth(1).expect("private fixture directory");
|
||||
let dir = Path::new(&arg);
|
||||
let resources: Value = serde_json::from_str(&fs::read_to_string(dir.join("catalog.json"))?)?;
|
||||
let definitions = |name: &str| {
|
||||
+2
-2
@@ -161,8 +161,8 @@ fn fixture(
|
||||
writeln!(out, "tail {}", random.next_long())?;
|
||||
Ok(())
|
||||
}
|
||||
fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let arg = std::env::args().nth(1).expect("private fixture directory");
|
||||
pub fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let arg = crate::args().nth(1).expect("private fixture directory");
|
||||
let dir = Path::new(&arg);
|
||||
let ids: [u32; 5] = serde_json::from_str(&fs::read_to_string(dir.join("facts-server.json"))?)?;
|
||||
let blocks = ids.map(BlockStateId);
|
||||
+3
-4
@@ -1,6 +1,5 @@
|
||||
//! Transport for native modifier chains and a feature callback sharing the RNG.
|
||||
#[path = "support/placement_queries.rs"]
|
||||
mod queries;
|
||||
use crate::support::placement_queries as queries;
|
||||
use horizon_core::random::{LegacyRandom, RandomSource, XoroshiroRandom};
|
||||
use horizon_world::worldgen::{
|
||||
anchor::WorldGenerationContext,
|
||||
@@ -74,8 +73,8 @@ fn fixture(
|
||||
writeln!(out.borrow_mut(), "tail {}", random.next_long())?;
|
||||
Ok(())
|
||||
}
|
||||
fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let arg = std::env::args().nth(1).expect("private fixture directory");
|
||||
pub fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let arg = crate::args().nth(1).expect("private fixture directory");
|
||||
let dir = Path::new(&arg);
|
||||
let mut out = io::BufWriter::new(fs::File::create(dir.join("rust.txt"))?);
|
||||
for line in fs::read_to_string(dir.join("inputs.txt"))?.lines() {
|
||||
+2
-2
@@ -496,8 +496,8 @@ fn query_state(
|
||||
}
|
||||
writeln!(out, "tags {bits}")
|
||||
}
|
||||
fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let arg = std::env::args().nth(1).expect("private fixture directory");
|
||||
pub fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let arg = crate::args().nth(1).expect("private fixture directory");
|
||||
let dir = Path::new(&arg);
|
||||
let facts: Value = serde_json::from_str(&fs::read_to_string(dir.join("facts-server.json"))?)?;
|
||||
let bundle: Value = serde_json::from_str(&fs::read_to_string(dir.join("tags.json"))?)?;
|
||||
+2
-2
@@ -7,8 +7,8 @@ use std::{
|
||||
io::{self, Write},
|
||||
path::Path,
|
||||
};
|
||||
fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let arg = std::env::args().nth(1).expect("private fixture directory");
|
||||
pub fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let arg = crate::args().nth(1).expect("private fixture directory");
|
||||
let dir = Path::new(&arg);
|
||||
let mut out = io::BufWriter::new(fs::File::create(dir.join("rust.txt"))?);
|
||||
for line in fs::read_to_string(dir.join("inputs.txt"))?.lines() {
|
||||
+2
-2
@@ -145,8 +145,8 @@ fn tag(v: &Value) -> Tag {
|
||||
_ => panic!("invalid registry metadata"),
|
||||
}
|
||||
}
|
||||
fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let arg = std::env::args().nth(1).expect("private fixture directory");
|
||||
pub fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let arg = crate::args().nth(1).expect("private fixture directory");
|
||||
let dir = Path::new(&arg);
|
||||
let facts: Value = serde_json::from_str(&fs::read_to_string(dir.join("facts-server.json"))?)?;
|
||||
let registry = BlockRegistry::from_nbt(&Tag::compound([
|
||||
+2
-2
@@ -91,8 +91,8 @@ impl BoatFluidBoxWorld for World<'_> {
|
||||
self.boat
|
||||
}
|
||||
}
|
||||
fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let arg = std::env::args().nth(1).expect("private fixture directory");
|
||||
pub fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let arg = crate::args().nth(1).expect("private fixture directory");
|
||||
let dir = Path::new(&arg);
|
||||
let mut out = io::BufWriter::new(fs::File::create(dir.join("rust.txt"))?);
|
||||
for line in fs::read_to_string(dir.join("inputs.txt"))?.lines() {
|
||||
+2
-2
@@ -51,8 +51,8 @@ fn tag(v: &Value) -> Tag {
|
||||
_ => panic!("invalid registry metadata"),
|
||||
}
|
||||
}
|
||||
fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let arg = std::env::args().nth(1).expect("private fixture directory");
|
||||
pub fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let arg = crate::args().nth(1).expect("private fixture directory");
|
||||
let dir = Path::new(&arg);
|
||||
let facts: Value = serde_json::from_str(&fs::read_to_string(dir.join("facts-server.json"))?)?;
|
||||
let registry = BlockRegistry::from_nbt(&Tag::compound([
|
||||
+2
-2
@@ -60,8 +60,8 @@ impl FluidFlowWorld for World<'_> {
|
||||
Ok(self.f["states"][s]["faces"].as_u64().unwrap() & (1 << (d as u8)) != 0)
|
||||
}
|
||||
}
|
||||
fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let arg = std::env::args().nth(1).expect("private fixture directory");
|
||||
pub fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let arg = crate::args().nth(1).expect("private fixture directory");
|
||||
let dir = Path::new(&arg);
|
||||
let mut out = io::BufWriter::new(fs::File::create(dir.join("rust.txt"))?);
|
||||
for line in fs::read_to_string(dir.join("inputs.txt"))?.lines() {
|
||||
+2
-2
@@ -67,8 +67,8 @@ impl FluidOccupancyWorld for World<'_, '_> {
|
||||
Ok(self.min + self.height - 1)
|
||||
}
|
||||
}
|
||||
fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let arg = std::env::args().nth(1).unwrap();
|
||||
pub fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let arg = crate::args().nth(1).unwrap();
|
||||
let dir = Path::new(&arg);
|
||||
let registry = BlockRegistry::from_nbt(
|
||||
&nbt::read_named(
|
||||
+2
-2
@@ -34,8 +34,8 @@ impl FluidHeightWorld for World<'_> {
|
||||
panic!("ray shape does not use camera immersion support")
|
||||
}
|
||||
}
|
||||
fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let arg = std::env::args().nth(1).expect("private fixture directory");
|
||||
pub fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let arg = crate::args().nth(1).expect("private fixture directory");
|
||||
let dir = Path::new(&arg);
|
||||
let mut out = io::BufWriter::new(fs::File::create(dir.join("rust.txt"))?);
|
||||
for line in fs::read_to_string(dir.join("inputs.txt"))?.lines() {
|
||||
+2
-2
@@ -84,8 +84,8 @@ impl FoodWorld for World<'_> {
|
||||
self.query(f, &format!("hurt {:08x}", bits(v)))
|
||||
}
|
||||
}
|
||||
fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let arg = std::env::args().nth(1).unwrap();
|
||||
pub fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let arg = crate::args().nth(1).unwrap();
|
||||
let dir = Path::new(&arg);
|
||||
let mut out = io::BufWriter::new(fs::File::create(dir.join("rust.txt"))?);
|
||||
for line in fs::read_to_string(dir.join("inputs.txt"))?.lines() {
|
||||
+2
-2
@@ -160,8 +160,8 @@ fn run<R: RandomSource>(f: Value, out: &mut dyn Write, make: fn(i64) -> R) {
|
||||
writeln!(w.out, "random {i} {} {}", r.next_long(), r.next_long()).unwrap();
|
||||
}
|
||||
}
|
||||
fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let arg = std::env::args().nth(1).unwrap();
|
||||
pub fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let arg = crate::args().nth(1).unwrap();
|
||||
let dir = Path::new(&arg);
|
||||
let mut out = io::BufWriter::new(fs::File::create(dir.join("rust.txt"))?);
|
||||
for line in fs::read_to_string(dir.join("inputs.txt"))?.lines() {
|
||||
+2
-2
@@ -49,8 +49,8 @@ fn tag(v: &Value) -> Option<Tag> {
|
||||
_ => panic!("tag type"),
|
||||
})
|
||||
}
|
||||
fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let arg = std::env::args().nth(1).unwrap();
|
||||
pub fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let arg = crate::args().nth(1).unwrap();
|
||||
let dir = Path::new(&arg);
|
||||
let mut out = io::BufWriter::new(fs::File::create(dir.join("rust.txt"))?);
|
||||
for line in fs::read_to_string(dir.join("inputs.txt"))?.lines() {
|
||||
+2
-2
@@ -33,8 +33,8 @@ fn position(v: &Value) -> Option<BlockPos> {
|
||||
))
|
||||
}
|
||||
}
|
||||
fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let arg = std::env::args().nth(1).expect("private fixture directory");
|
||||
pub fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let arg = crate::args().nth(1).expect("private fixture directory");
|
||||
let dir = Path::new(&arg);
|
||||
let mut out = io::BufWriter::new(fs::File::create(dir.join("rust.txt"))?);
|
||||
for line in fs::read_to_string(dir.join("inputs.txt"))?.lines() {
|
||||
+2
-2
@@ -33,8 +33,8 @@ fn fixture(
|
||||
writeln!(out, "tail {}", random.next_long())?;
|
||||
Ok(())
|
||||
}
|
||||
fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let arg = std::env::args().nth(1).expect("private fixture directory");
|
||||
pub fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let arg = crate::args().nth(1).expect("private fixture directory");
|
||||
let dir = Path::new(&arg);
|
||||
let mut out = io::BufWriter::new(fs::File::create(dir.join("rust.txt"))?);
|
||||
for line in fs::read_to_string(dir.join("inputs.txt"))?.lines() {
|
||||
+2
-2
@@ -187,8 +187,8 @@ fn fixture(
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let directory = std::env::args().nth(1).expect("private fixture directory");
|
||||
pub fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let directory = crate::args().nth(1).expect("private fixture directory");
|
||||
let dir = Path::new(&directory);
|
||||
let facts: Value = serde_json::from_str(&fs::read_to_string(dir.join("facts-server.json"))?)?;
|
||||
let tags: Value = serde_json::from_str(&fs::read_to_string(dir.join("tags.json"))?)?;
|
||||
+2
-2
@@ -77,8 +77,8 @@ impl RayWorld for World<'_, '_> {
|
||||
panic!("direct interaction clip")
|
||||
}
|
||||
}
|
||||
fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let arg = std::env::args().nth(1).expect("private fixture directory");
|
||||
pub fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let arg = crate::args().nth(1).expect("private fixture directory");
|
||||
let dir = Path::new(&arg);
|
||||
let mut out = io::BufWriter::new(fs::File::create(dir.join("rust.txt"))?);
|
||||
let read = |n: &str| -> Result<Tag, Box<dyn std::error::Error>> {
|
||||
+2
-2
@@ -218,8 +218,8 @@ impl horizon_world::inventory_pickup::PickupHooks<u8, usize, i32> for World {
|
||||
Ok(self.op["infinite"].as_bool().unwrap())
|
||||
}
|
||||
}
|
||||
fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let arg = std::env::args().nth(1).unwrap();
|
||||
pub fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let arg = crate::args().nth(1).unwrap();
|
||||
let dir = Path::new(&arg);
|
||||
let mut out = io::BufWriter::new(fs::File::create(dir.join("rust.txt"))?);
|
||||
for line in fs::read_to_string(dir.join("inputs.txt"))?.lines() {
|
||||
+2
-2
@@ -149,8 +149,8 @@ impl InventoryTickWorld<u8, u8, i32> for World {
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let arg = std::env::args().nth(1).unwrap();
|
||||
pub fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let arg = crate::args().nth(1).unwrap();
|
||||
let dir = Path::new(&arg);
|
||||
let mut out = io::BufWriter::new(fs::File::create(dir.join("rust.txt"))?);
|
||||
for line in fs::read_to_string(dir.join("inputs.txt"))?.lines() {
|
||||
+2
-2
@@ -230,8 +230,8 @@ impl UseServices<usize, u8, bool> for Services {
|
||||
self.event(view, state, &format!("synced {id}"))
|
||||
}
|
||||
}
|
||||
fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let arg = std::env::args().nth(1).unwrap();
|
||||
pub fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let arg = crate::args().nth(1).unwrap();
|
||||
let dir = Path::new(&arg);
|
||||
let mut out = io::BufWriter::new(fs::File::create(dir.join("rust.txt"))?);
|
||||
for line in fs::read_to_string(dir.join("inputs.txt"))?.lines() {
|
||||
+2
-2
@@ -295,8 +295,8 @@ impl StartServices<usize, u8, bool> for Services {
|
||||
self.kinetic_count = 0;
|
||||
}
|
||||
}
|
||||
fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let arg = std::env::args().nth(1).unwrap();
|
||||
pub fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let arg = crate::args().nth(1).unwrap();
|
||||
let dir = Path::new(&arg);
|
||||
let mut out = io::BufWriter::new(fs::File::create(dir.join("rust.txt"))?);
|
||||
for line in fs::read_to_string(dir.join("inputs.txt"))?.lines() {
|
||||
+2
-2
@@ -277,8 +277,8 @@ impl AfterUseWorld<usize, u8, Component> for World {
|
||||
c.apply(self, original)
|
||||
}
|
||||
}
|
||||
fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let arg = std::env::args().nth(1).unwrap();
|
||||
pub fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let arg = crate::args().nth(1).unwrap();
|
||||
let dir = Path::new(&arg);
|
||||
let mut out = io::BufWriter::new(fs::File::create(dir.join("rust.txt"))?);
|
||||
for line in fs::read_to_string(dir.join("inputs.txt"))?.lines() {
|
||||
+2
-2
@@ -157,8 +157,8 @@ impl ItemBlockingWorld for World<'_> {
|
||||
self.event(&format!("block-using 0 {:08x} {fully}", bits(damage)))
|
||||
}
|
||||
}
|
||||
fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let arg = std::env::args().nth(1).unwrap();
|
||||
pub fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let arg = crate::args().nth(1).unwrap();
|
||||
let dir = Path::new(&arg);
|
||||
let mut out = io::BufWriter::new(fs::File::create(dir.join("rust.txt"))?);
|
||||
for line in fs::read_to_string(dir.join("inputs.txt"))?.lines() {
|
||||
+2
-2
@@ -130,8 +130,8 @@ impl CooldownUser for User<'_> {
|
||||
self.book.add(group(&stack), ticks, self.events)
|
||||
}
|
||||
}
|
||||
fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let arg = std::env::args().nth(1).unwrap();
|
||||
pub fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let arg = crate::args().nth(1).unwrap();
|
||||
let dir = Path::new(&arg);
|
||||
let mut out = io::BufWriter::new(fs::File::create(dir.join("rust.txt"))?);
|
||||
for line in fs::read_to_string(dir.join("inputs.txt"))?.lines() {
|
||||
+2
-2
@@ -82,8 +82,8 @@ impl DurabilityWorld for World<'_> {
|
||||
self.event(s, "break")
|
||||
}
|
||||
}
|
||||
fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let arg = std::env::args().nth(1).unwrap();
|
||||
pub fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let arg = crate::args().nth(1).unwrap();
|
||||
let dir = Path::new(&arg);
|
||||
let mut out = io::BufWriter::new(fs::File::create(dir.join("rust.txt"))?);
|
||||
for line in fs::read_to_string(dir.join("inputs.txt"))?.lines() {
|
||||
+2
-2
@@ -178,8 +178,8 @@ fn run<R: RandomSource>(f: Value, out: &mut dyn Write, make: fn(i64) -> R) {
|
||||
writeln!(w.out, "random {i} {} {}", r.next_long(), r.next_long()).unwrap();
|
||||
}
|
||||
}
|
||||
fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let arg = std::env::args().nth(1).unwrap();
|
||||
pub fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let arg = crate::args().nth(1).unwrap();
|
||||
let dir = Path::new(&arg);
|
||||
let mut out = io::BufWriter::new(fs::File::create(dir.join("rust.txt"))?);
|
||||
for line in fs::read_to_string(dir.join("inputs.txt"))?.lines() {
|
||||
+2
-2
@@ -86,8 +86,8 @@ fn append(arena: &mut Vec<Stack>, copy: CopyResult<Stack>) -> usize {
|
||||
}
|
||||
}
|
||||
}
|
||||
fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let arg = std::env::args().nth(1).unwrap();
|
||||
pub fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let arg = crate::args().nth(1).unwrap();
|
||||
let dir = Path::new(&arg);
|
||||
let mut out = io::BufWriter::new(fs::File::create(dir.join("rust.txt"))?);
|
||||
for line in fs::read_to_string(dir.join("inputs.txt"))?.lines() {
|
||||
+2
-2
@@ -115,8 +115,8 @@ fn all(
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let arg = std::env::args().nth(1).unwrap();
|
||||
pub fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let arg = crate::args().nth(1).unwrap();
|
||||
let dir = Path::new(&arg);
|
||||
let mut out = io::BufWriter::new(fs::File::create(dir.join("rust.txt"))?);
|
||||
for line in fs::read_to_string(dir.join("inputs.txt"))?.lines() {
|
||||
+2
-2
@@ -33,8 +33,8 @@ fn snapshot(out: &mut dyn Write, s: &ItemUseStack<'_>) -> io::Result<()> {
|
||||
s.use_on_release()
|
||||
)
|
||||
}
|
||||
fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let arg = std::env::args().nth(1).unwrap();
|
||||
pub fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let arg = crate::args().nth(1).unwrap();
|
||||
let dir = Path::new(&arg);
|
||||
let catalog = ItemUseCatalog::from_json(&serde_json::from_str(&fs::read_to_string(
|
||||
dir.join("catalog.json"),
|
||||
+2
-2
@@ -85,8 +85,8 @@ impl ItemUseWorld for World<'_> {
|
||||
Ok(self.state()["virtual_remaining"].as_i64().unwrap() as i32)
|
||||
}
|
||||
}
|
||||
fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let arg = std::env::args().nth(1).unwrap();
|
||||
pub fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let arg = crate::args().nth(1).unwrap();
|
||||
let dir = Path::new(&arg);
|
||||
let mut out = io::BufWriter::new(fs::File::create(dir.join("rust.txt"))?);
|
||||
for line in fs::read_to_string(dir.join("inputs.txt"))?.lines() {
|
||||
+2
-2
@@ -166,8 +166,8 @@ impl UseLifecycleWorld for World<'_> {
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let arg = std::env::args().nth(1).unwrap();
|
||||
pub fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let arg = crate::args().nth(1).unwrap();
|
||||
let dir = Path::new(&arg);
|
||||
let mut out = io::BufWriter::new(fs::File::create(dir.join("rust.txt"))?);
|
||||
for line in fs::read_to_string(dir.join("inputs.txt"))?.lines() {
|
||||
+2
-2
@@ -199,8 +199,8 @@ impl StartUseWorld for World<'_> {
|
||||
self.kinetic_count = 0;
|
||||
}
|
||||
}
|
||||
fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let arg = std::env::args().nth(1).unwrap();
|
||||
pub fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let arg = crate::args().nth(1).unwrap();
|
||||
let dir = Path::new(&arg);
|
||||
let mut out = io::BufWriter::new(fs::File::create(dir.join("rust.txt"))?);
|
||||
for line in fs::read_to_string(dir.join("inputs.txt"))?.lines() {
|
||||
+2
-2
@@ -35,8 +35,8 @@ impl JavaKey for Key {
|
||||
fn opt(v: Option<i32>) -> String {
|
||||
v.map_or("none".into(), |v| v.to_string())
|
||||
}
|
||||
fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let arg = std::env::args().nth(1).unwrap();
|
||||
pub fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let arg = crate::args().nth(1).unwrap();
|
||||
let dir = Path::new(&arg);
|
||||
let mut out = io::BufWriter::new(fs::File::create(dir.join("rust.txt"))?);
|
||||
for line in fs::read_to_string(dir.join("inputs.txt"))?.lines() {
|
||||
+3
-3
@@ -48,10 +48,10 @@ impl JavaKey for Key {
|
||||
fn opt(v: Option<i32>) -> String {
|
||||
v.map_or("none".into(), |v| v.to_string())
|
||||
}
|
||||
fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let arg = std::env::args().nth(1).unwrap();
|
||||
pub fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let arg = crate::args().nth(1).unwrap();
|
||||
let dir = Path::new(&arg);
|
||||
let side = std::env::args().nth(2).unwrap();
|
||||
let side = crate::args().nth(2).unwrap();
|
||||
let mut out = io::BufWriter::new(fs::File::create(dir.join(format!("rust-{side}.txt")))?);
|
||||
for line in fs::read_to_string(dir.join(format!("inputs-{side}.txt")))?.lines() {
|
||||
let f: Value = serde_json::from_str(line)?;
|
||||
+2
-2
@@ -43,8 +43,8 @@ impl LevelAccess for Cells {
|
||||
}
|
||||
}
|
||||
|
||||
fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let mut args = std::env::args().skip(1);
|
||||
pub fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let mut args = crate::args().skip(1);
|
||||
let resources = args.next().expect("resource directory");
|
||||
let cases = args.next().expect("case file");
|
||||
let output = args.next().expect("output file");
|
||||
+2
-2
@@ -43,8 +43,8 @@ impl LevelAccess for Cells {
|
||||
}
|
||||
}
|
||||
|
||||
fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let mut args = std::env::args().skip(1);
|
||||
pub fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let mut args = crate::args().skip(1);
|
||||
let resources = args.next().expect("resource directory");
|
||||
let cases = args.next().expect("case file");
|
||||
let output = args.next().expect("output file");
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user