Skip to content

Commit 6653023

Browse files
committed
resolve some warnings
1 parent 6440b41 commit 6653023

File tree

3 files changed

+3
-21
lines changed

3 files changed

+3
-21
lines changed

src/language_server/instance.rs

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,10 @@
11
use super::io::IO;
22
use crate::language_server::data::{semantic_token_modifiers, semantic_token_types};
33
use crate::location::{Span, Spanning};
4-
use crate::par::language::{Internal, Name};
54
use crate::par::program::NameWithType;
6-
use crate::par::types::TypeError;
75
use crate::playground::{Checked, Compiled};
8-
use eframe::egui::RichText;
96
use lsp_types::{self as lsp, Uri};
107
use std::collections::HashMap;
11-
use tracing_subscriber::fmt::format;
128

139
#[derive(Debug, Clone)]
1410
pub enum CompileError {
@@ -105,7 +101,7 @@ impl Instance {
105101
return None;
106102
}
107103
}
108-
Some(Err(e)) => return None,
104+
Some(Err(_)) => return None,
109105
None => lsp::MarkedString::String("Not compiled".to_string()),
110106
};
111107

@@ -345,7 +341,7 @@ impl Instance {
345341
});
346342
}
347343

348-
for (name, declaration) in &compiled.program.declarations {
344+
for (name, _) in &compiled.program.declarations {
349345
let name_span = name.span();
350346
semantic_tokens.push(lsp::SemanticToken {
351347
delta_line: name_span.start.row as u32,
@@ -357,7 +353,7 @@ impl Instance {
357353
});
358354
}
359355

360-
for (name, definition) in &compiled.program.definitions {
356+
for (name, _) in &compiled.program.definitions {
361357
let name_span = name.span();
362358
semantic_tokens.push(lsp::SemanticToken {
363359
delta_line: name_span.start.row as u32,

src/par/language.rs

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -257,14 +257,6 @@ impl Spanning for CompileError {
257257
}
258258
}
259259

260-
impl CompileError {
261-
pub fn message(&self) -> &str {
262-
match self {
263-
CompileError::MustEndProcess(_) => "process must end",
264-
}
265-
}
266-
}
267-
268260
type Pass<Name> = Option<Arc<process::Process<Internal<Name>, ()>>>;
269261

270262
impl<Name: Clone + Hash + Eq> Pattern<Name> {

src/par/parse.rs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -290,12 +290,6 @@ impl Spanning for SyntaxError {
290290
}
291291
}
292292

293-
impl SyntaxError {
294-
pub fn message(&self) -> &str {
295-
"Syntax error."
296-
}
297-
}
298-
299293
pub fn set_miette_hook() {
300294
_ = miette::set_hook(Box::new(|_| {
301295
Box::new(

0 commit comments

Comments
 (0)