Skip to content

Commit ea61b3d

Browse files
committed
fix warnings & clippy
1 parent 184f0a3 commit ea61b3d

File tree

4 files changed

+24
-22
lines changed

4 files changed

+24
-22
lines changed

src/display.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -479,7 +479,7 @@ fn cleanup_and_escape(message: &str, remove_ansi: bool) -> String {
479479
}
480480

481481
let escaped = if remove_ansi {
482-
String::from_utf8(strip_ansi_escapes::strip(&escaped.into_bytes())).unwrap()
482+
String::from_utf8(strip_ansi_escapes::strip(escaped.into_bytes())).unwrap()
483483
} else {
484484
escaped
485485
};

src/interpreter.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -371,7 +371,10 @@ pub trait ReplLikeInterpreter {
371371
)))
372372
}
373373
}
374-
pub fn index_from_name(name: &str, config: &[(neovim_lib::Value, neovim_lib::Value)]) -> Option<usize> {
374+
pub fn index_from_name(
375+
name: &str,
376+
config: &[(neovim_lib::Value, neovim_lib::Value)],
377+
) -> Option<usize> {
375378
for (i, kv) in config.iter().enumerate() {
376379
if name == kv.0.as_str().unwrap_or("") {
377380
return Some(i);

src/interpreters/SQL_original.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ impl Interpreter for SQL_original {
110110
.arg("-w")
111111
.arg("--file")
112112
.arg(&self.main_file_path)
113-
.arg(&self.read_previous_code().replace('\n', "")) // contains database address
113+
.arg(self.read_previous_code().replace('\n', "")) // contains database address
114114
.current_dir(&self.data.projectroot)
115115
.output()
116116
.expect("Unable to start process");

src/interpreters/TypeScript_original.rs

Lines changed: 18 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -142,26 +142,25 @@ impl Interpreter for TypeScript_original {
142142
}
143143
}
144144

145-
// You can add tests if you want to
146-
#[cfg(test)]
147-
mod test_typescript_original {
148-
use super::*;
145+
// #[cfg(test)]
146+
// mod test_typescript_original {
147+
// use super::*;
149148
// commenting this, as CI fails with 'invalid token "export"'
150149
// which doesn't happen locally, for some reason
151150
// If an user experiences this and opens an issue i'll probably fix it
152151
// #[test]
153-
fn simple_print() {
154-
let mut data = DataHolder::new();
155-
156-
//inspired from Rust syntax
157-
data.current_bloc = String::from("let message: string = 'Hi';\nconsole.log(message);");
158-
let mut interpreter = TypeScript_original::new(data);
159-
let res = interpreter.run();
160-
161-
// -> should panic if not an Ok()
162-
let string_result = res.unwrap();
163-
164-
// -> compare result with predicted
165-
assert_eq!(string_result, "Hi\n");
166-
}
167-
}
152+
// fn simple_print() {
153+
// let mut data = DataHolder::new();
154+
//
155+
// //inspired from Rust syntax
156+
// data.current_bloc = String::from("let message: string = 'Hi';\nconsole.log(message);");
157+
// let mut interpreter = TypeScript_original::new(data);
158+
// let res = interpreter.run();
159+
//
160+
// // -> should panic if not an Ok()
161+
// let string_result = res.unwrap();
162+
//
163+
// // -> compare result with predicted
164+
// assert_eq!(string_result, "Hi\n");
165+
// }
166+
// }

0 commit comments

Comments
 (0)