Skip to content

Commit

Permalink
Fix clippy warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
oxalica committed Dec 30, 2022
1 parent 3ba40c0 commit 2e688f9
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion crates/ide/src/ty/union_find.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ impl<T> UnionFind<T> {
let (a, b) = (a as usize, b as usize);
let lhs = self.0[a].0.take().unwrap();
let rhs = self.0[b].0.take().unwrap();
let final_idx = match Ord::cmp(&self.0[a].2, &self.0[b as usize].2) {
let final_idx = match Ord::cmp(&self.0[a].2, &self.0[b].2) {
Ordering::Less => {
self.0[a].1 = b as u32;
self.0[b].0 = Some(lhs);
Expand Down
2 changes: 1 addition & 1 deletion crates/nil/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ pub type Result<T, E = Error> = std::result::Result<T, E>;

pub fn main_loop(conn: Connection) -> Result<()> {
let init_params =
conn.initialize(serde_json::to_value(&capabilities::server_capabilities()).unwrap())?;
conn.initialize(serde_json::to_value(capabilities::server_capabilities()).unwrap())?;
tracing::info!("Init params: {}", init_params);

let init_params = serde_json::from_value::<InitializeParams>(init_params)?;
Expand Down
2 changes: 1 addition & 1 deletion crates/nil/src/vfs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ impl Vfs {
return Err(format!("Invalid range {:?}", del_range).into());
}
let mut buf = String::with_capacity(
text.len() - usize::from(del_range.len()) + ins_text.len() as usize,
text.len() - usize::from(del_range.len()) + ins_text.len(),
);
buf += &text[..usize::from(del_range.start())];
buf += ins_text;
Expand Down

0 comments on commit 2e688f9

Please sign in to comment.