From: Ian Jackson Date: Tue, 26 Jan 2021 22:14:21 +0000 (+0000) Subject: remove redundant semicolons X-Git-Tag: otter-0.4.0~679 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=f1a91ae0af61fef2051c378cfd3825053d63133f;p=otter.git remove redundant semicolons Updated nightly, new warning. Signed-off-by: Ian Jackson --- diff --git a/daemon/cmdlistener.rs b/daemon/cmdlistener.rs index 8af23885..82339ad6 100644 --- a/daemon/cmdlistener.rs +++ b/daemon/cmdlistener.rs @@ -1183,7 +1183,7 @@ fn do_authorise_scope(cs: &CommandStream, wanted: &AccountScope) let y : Authorisation<(Passwd,Uid,InUserList)> = { - struct AuthorisedIf { authorised_for : Option }; + struct AuthorisedIf { authorised_for : Option } const SERVER_ONLY : (AuthorisedIf, Authorisation) = ( AuthorisedIf { authorised_for: None }, diff --git a/src/bin/otter.rs b/src/bin/otter.rs index e802379e..d2d96ef6 100644 --- a/src/bin/otter.rs +++ b/src/bin/otter.rs @@ -261,7 +261,7 @@ fn main() { subcommand: String, subargs: Vec, spec_dir: Option, - }; + } let (subcommand, subargs, mo) = parse_args::( env::args().collect(), &|rma|{ @@ -1178,7 +1178,7 @@ mod library_add { enum Situation { Poor(Vec, &'static str), Good([Pos; 2]), - }; + } use Situation::*; const WANTED: usize = 2; @@ -1220,7 +1220,7 @@ mod library_add { struct Placement { lhs: Coord, top: Coord, rhs: Coord, bot: Coord, clhs: Coord, cbot: Coord, // current line - }; + } let mut placement = match situation { Poor(insns, msg) => { diff --git a/src/bin/otterlib.rs b/src/bin/otterlib.rs index b981f8b1..b6ba1e23 100644 --- a/src/bin/otterlib.rs +++ b/src/bin/otterlib.rs @@ -74,7 +74,7 @@ fn preview(items: Vec) { uos: Vec, bbox: Vec>, size: Vec, - }; + } const SEVERAL: usize = 3; diff --git a/src/global.rs b/src/global.rs index 90cdd8be..3606d631 100644 --- a/src/global.rs +++ b/src/global.rs @@ -419,7 +419,7 @@ impl Instance { player_num: u32, nick: &'r str, account: &'r AccountName, - }; + } let players = self.gs.players.iter().filter_map(|(player, gpl)| { let ipl = self.iplayers.get(player)?; let (idx, _) = player.data().get_idx_version(); @@ -1129,7 +1129,7 @@ impl InstanceGuard<'_> { #[throws(anyhow::Error)] pub fn load_games(accounts: &mut AccountsGuard, games: &mut GamesGuard) { - enum AFState { Found(PathBuf), Used }; + enum AFState { Found(PathBuf), Used } use AFState::*; use SavefilenameParseResult::*; let mut a_leaves = HashMap::new(); diff --git a/src/pieces.rs b/src/pieces.rs index 456c8556..65c741d4 100644 --- a/src/pieces.rs +++ b/src/pieces.rs @@ -48,7 +48,7 @@ pub fn svg_rescale_path(input: &Html, scale: f64) -> Html { bits: BM, len: BI, index: BI, - }; + } impl RotatingBitmap { const fn new(bits: BM, len: BI) -> Self { Self{ bits, len, index:0 } } fn reset(&mut self) { self.index= 0; } diff --git a/src/shapelib.rs b/src/shapelib.rs index be5a37dc..8390dea6 100644 --- a/src/shapelib.rs +++ b/src/shapelib.rs @@ -458,7 +458,7 @@ impl Config1 { dirname: dirname.to_string(), catalogue: path, } - }; + } let results = glob::glob_with(pat, glob::MatchOptions { require_literal_separator: true, diff --git a/src/spec.rs b/src/spec.rs index 5d87b361..b830c03e 100644 --- a/src/spec.rs +++ b/src/spec.rs @@ -468,7 +468,7 @@ pub mod implementation { game_name: String, nick: &'r str, token_lines: Vec, - }; + } let common = CommonData { player_email: &self.addr, game_name: g.name.to_string(), @@ -489,7 +489,7 @@ pub mod implementation { unix_user: &'r str, #[serde(flatten)] common: CommonData<'r>, - }; + } let data = Data { unix_user: user, common, @@ -503,7 +503,7 @@ pub mod implementation { account: String, #[serde(flatten)] common: CommonData<'r>, - }; + } let data = Data { account: account.to_string(), common, diff --git a/src/updates.rs b/src/updates.rs index 3a57be27..26118a84 100644 --- a/src/updates.rs +++ b/src/updates.rs @@ -523,7 +523,7 @@ impl PreparedUpdate { Recorded(ClientSequence, Option<&'u PreparedPieceState>), Exactly(TransmitUpdateEntry<'u>), Piece, - }; + } let ftg = match by_client { None => FTG::Piece, Some((_,u_client,_)) if u_client != dest => FTG::Piece, diff --git a/zcoord/zcoord.rs b/zcoord/zcoord.rs index abb78ebb..54e4ce46 100644 --- a/zcoord/zcoord.rs +++ b/zcoord/zcoord.rs @@ -897,7 +897,7 @@ mod test { let last = a.as_ref().map(|m| m.repack().unwrap()); let i = Mutable::some_range(a.as_ref(), b.as_ref(), count)?; It { i, last } - }; + } impl It { fn nxt(&mut self, exp: Option<&str>) { let got = self.i.next();