Skip to content

Commit

Permalink
clippy fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
DarkWanderer committed Nov 25, 2023
1 parent c7afb2b commit 10b498d
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 13 deletions.
4 changes: 2 additions & 2 deletions src/chat.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
use crate::{CONTEXT, RUNTIME};
use arma_rs::{Context, Group};
use arma_rs::Group;
use chatgpt::{config::ModelConfigurationBuilder, converse::Conversation, prelude::ChatGPT};
use std::{collections::HashMap, env, sync::Arc, time::Duration};
use tokio::sync::{Mutex, RwLock};
use tokio::sync::Mutex;
use tokio::time::sleep;

lazy_static::lazy_static! {
Expand Down
16 changes: 6 additions & 10 deletions src/kdtree.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,10 @@ impl<T: PartialOrd + Copy> KdNode<T> {
} else {
self.left = Some(Box::new(Self::new(point)));
}
} else if let Some(right) = self.right.as_mut() {
right.insert(point, depth + 1);
} else {
if let Some(right) = self.right.as_mut() {
right.insert(point, depth + 1);
} else {
self.right = Some(Box::new(Self::new(point)));
}
self.right = Some(Box::new(Self::new(point)));
}
}

Expand All @@ -46,12 +44,10 @@ impl<T: PartialOrd + Copy> KdNode<T> {
} else {
None
}
} else if let Some(right) = self.right.as_ref() {
right.search(point, depth + 1)
} else {
if let Some(right) = self.right.as_ref() {
right.search(point, depth + 1)
} else {
None
}
None
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ mod kdtree;
mod shape;

use arma_rs::{arma, Context, Extension};
use lazy_static;

use std::result::Result;
use tokio::sync::RwLock;
use uuid::Uuid;
Expand Down

0 comments on commit 10b498d

Please sign in to comment.