Skip to content
This repository has been archived by the owner on Dec 29, 2022. It is now read-only.

Commit

Permalink
Merge pull request #763 from BORN2LOSE/field_names
Browse files Browse the repository at this point in the history
Changing field names
  • Loading branch information
nrc authored Mar 16, 2018
2 parents 5c5e479 + 3b0b225 commit 22254c4
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 10 deletions.
7 changes: 2 additions & 5 deletions src/build/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -399,11 +399,8 @@ impl BuildQueue {
.spawn(move || {
// window/progress notification that we are about to build
notifier.notify_begin_progress();
loop {
match progress_receiver.recv() {
Ok(progress) => notifier.notify_progress(progress),
Err(_) => break, // error means the sender was Dropped at build end
}
while let Ok(progress) = progress_receiver.recv() {
notifier.notify_progress(progress);
}
notifier.notify_end_progress();
})
Expand Down
4 changes: 2 additions & 2 deletions src/build/rustc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ impl RlsRustcCalls {
fn new(analysis: Arc<Mutex<Option<Analysis>>>) -> RlsRustcCalls {
RlsRustcCalls {
default_calls: RustcDefaultCalls,
analysis: analysis,
analysis,
}
}
}
Expand Down Expand Up @@ -279,7 +279,7 @@ struct ReplacedFileLoader {
impl ReplacedFileLoader {
fn new(replacements: HashMap<PathBuf, String>) -> ReplacedFileLoader {
ReplacedFileLoader {
replacements: replacements,
replacements,
real_file_loader: RealFileLoader,
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/lsp_data.rs
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@ impl notification::Notification for Progress {
* to indicate progress.
*/
#[allow(non_upper_case_globals)]
pub const NOTIFICATION__Progress: &'static str = "window/progress";
pub const NOTIFICATION__Progress: &str = "window/progress";

#[derive(Debug, PartialEq, Deserialize, Serialize, Clone)]
pub struct ProgressParams {
Expand Down
2 changes: 1 addition & 1 deletion src/server/io.rs
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ pub trait Output: Sync + Send + Clone + 'static {
/// Notify the client of a failure with the given diagnostic message.
fn failure_message<M: Into<String>>(&self, id: usize, code: jsonrpc::ErrorCode, msg: M) {
let error = jsonrpc::Error {
code: code,
code,
message: msg.into(),
data: None,
};
Expand Down
2 changes: 1 addition & 1 deletion src/server/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ impl<O: Output> LsService<O> {

LsService {
msg_reader: reader,
output: output,
output,
ctx: ActionContext::new(analysis, vfs, config),
dispatcher,
}
Expand Down

0 comments on commit 22254c4

Please sign in to comment.