Skip to content

Commit f47f044

Browse files
clean up linting
1 parent 6f672db commit f47f044

File tree

2 files changed

+2
-17
lines changed

2 files changed

+2
-17
lines changed

crates/pg_lsp/src/server.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -722,7 +722,7 @@ impl Server {
722722
self.pull_options();
723723
} else {
724724
let options = self.client.parse_options(params.settings)?;
725-
self.update_db_connection(options);
725+
self.update_db_connection(options)?;
726726
}
727727

728728
Ok(())
@@ -770,8 +770,7 @@ impl Server {
770770
Message::Notification(notification) => {
771771
dispatch::NotificationDispatcher::new(notification)
772772
.on::<DidChangeConfiguration, _>(|params| {
773-
self.did_change_configuration(params);
774-
Ok(())
773+
self.did_change_configuration(params)
775774
})?
776775
.on::<DidCloseTextDocument, _>(|params| self.did_close(params))?
777776
.on::<DidOpenTextDocument, _>(|params| self.did_open(params))?

crates/pg_lsp/src/server/debouncer/thread.rs

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ use super::buffer::{EventBuffer, Get, State};
88
struct DebouncerThread<B> {
99
mutex: Arc<Mutex<B>>,
1010
thread: JoinHandle<()>,
11-
stopped: Arc<AtomicBool>,
1211
}
1312

1413
impl<B> DebouncerThread<B> {
@@ -36,14 +35,8 @@ impl<B> DebouncerThread<B> {
3635
Self {
3736
mutex,
3837
thread,
39-
stopped,
4038
}
4139
}
42-
43-
fn stop(self) -> JoinHandle<()> {
44-
self.stopped.store(true, Ordering::Relaxed);
45-
self.thread
46-
}
4740
}
4841

4942
/// Threaded debouncer wrapping [EventBuffer]. Accepts a common delay and a
@@ -68,13 +61,6 @@ impl<T> EventDebouncer<T> {
6861
pub fn clear(&self) {
6962
self.0.mutex.lock().unwrap().clear();
7063
}
71-
72-
/// Signals the debouncer thread to quit and returns a
73-
/// [std::thread::JoinHandle] which can be `.join()`ed in the consumer
74-
/// thread. The common idiom is: `debouncer.stop().join().unwrap();`
75-
pub fn stop(self) -> JoinHandle<()> {
76-
self.0.stop()
77-
}
7864
}
7965

8066
#[cfg(test)]

0 commit comments

Comments
 (0)