From 5ee5bfae330ee2baf77e36b301ab73052b8ec5e7 Mon Sep 17 00:00:00 2001 From: a92126 <182859762@qq.com> Date: Wed, 23 Oct 2024 10:16:45 +0800 Subject: [PATCH] =?UTF-8?q?=E6=89=93=E5=8D=B0=E7=9A=84=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E8=B7=9Fjs=E4=BF=9D=E6=8C=81=E4=B8=80=E8=87=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tools/cheat-builder/make-acl.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/cheat-builder/make-acl.rs b/tools/cheat-builder/make-acl.rs index 1c08590..c229f8a 100644 --- a/tools/cheat-builder/make-acl.rs +++ b/tools/cheat-builder/make-acl.rs @@ -8,7 +8,6 @@ type Module = Vec; type LockKey = Vec; type LockHole = (String, Vec< LockKey >); -#[derive(Clone)] #[derive(Default)] struct Lock { name: String, @@ -319,7 +318,7 @@ fn incr( ch: char, ctx: &mut ParserCtx ) { ParserState::WaitLock | ParserState::ReadHole | ParserState::NeedPart => { ctx.state = ParserState::ReadLock; if ctx.currlock.is_some() { - let currlock = ctx.currlock.clone().unwrap(); + let currlock = ctx.currlock.take().unwrap(); ctx.locks.push( currlock ); } let tmp = Lock { @@ -630,7 +629,7 @@ fn transform<'a>( list: &'a Vec<(String, String)> ) -> Vec<(&'a String, Vec<(u32 retval.push( (serial, cheats) ); } else { - println!("no data {}", order); + //println!("no data {}", order); } } return retval; @@ -704,6 +703,7 @@ fn main() { let list = loadlist(); let roms = { let ret = transform( &list ); + println!("all rom has {}", ret.len()); let mut idx: BTreeMap<&String, Vec<(u32, Module)>> = BTreeMap::new(); for (serial, cheat) in ret.into_iter() { if cheat.len() == 0 {