clippy warnings

This commit is contained in:
Michael Zhang 2023-12-30 04:41:54 -05:00
parent eb9dca70a6
commit cd8793e55c
3 changed files with 12 additions and 11 deletions

View file

@ -2,7 +2,7 @@
extern crate serde_json;
mod generate;
#[allow(unused_imports, dead_code)]
#[allow(unused_imports, dead_code, clippy::all)]
pub mod prisma;
mod routes;
pub mod state;

View file

@ -20,7 +20,7 @@ pub struct GameCoreState {
}
pub struct GameDerivedState<'a> {
core: &'a GameCoreState,
pub core: &'a GameCoreState,
}
impl GameCoreState {

View file

@ -5,7 +5,7 @@ extern crate triangle_sys as sys;
#[cfg(test)]
mod tests;
use std::{ffi::CString, mem::MaybeUninit, ptr};
use std::{ffi::CString, mem::MaybeUninit};
use anyhow::Result;
@ -49,17 +49,18 @@ pub fn triangulate<P>(opts: TrianglulateOpts<P>) -> Result<TriangulateResult>
where
P: IntoIterator<Item = Point>,
{
let mut switches = Vec::new();
switches.push("p".to_owned());
switches.push("c".to_owned());
switches.push("z".to_owned());
switches.push("A".to_owned());
let mut switches = vec![
"p".to_owned(),
"c".to_owned(),
"z".to_owned(),
"A".to_owned(),
"q".to_owned(),
"e".to_owned(),
"n".to_owned(),
];
if let Some(maximum_triangle_area) = opts.maximum_triangle_area {
switches.push(format!("a{maximum_triangle_area}"));
}
switches.push("q".to_owned());
switches.push("e".to_owned());
switches.push("n".to_owned());
if opts.voronoi {
switches.push("v".to_owned());
}