diff options
| author | Roee Shapira <35409124+5c077m4n@users.noreply.github.com> | 2020-11-28 21:02:05 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-11-28 20:02:05 +0100 |
| commit | 9ad7b8a35ea34297905ec479dbf87a35802cd8b1 (patch) | |
| tree | 6c61f8e74b72b9c8b484f39fe2173d927227bf26 /src/main.rs | |
| parent | feat(tiles): initial WASM integration (diff) | |
| download | sl0ppij-9ad7b8a35ea34297905ec479dbf87a35802cd8b1.tar.gz sl0ppij-9ad7b8a35ea34297905ec479dbf87a35802cd8b1.tar.xz sl0ppij-9ad7b8a35ea34297905ec479dbf87a35802cd8b1.zip | |
chore(infra): added clippy check. (#65)
* Added clippy check.
* Changed step name.
* Used the suggested ci config.
* Some more clippy fixes.
* Some more clippy fixes.
* More clippy fixes.
* Removed allow annotations.
* Minor lint edit.
* More clippy fixes.
* Ran cargo fmt.
* More clippy fixes.
* More clippy fixes.
* More clippy fixes.
* More clippy fixes.
* More clippy fixes.
* More clippy fixes.
* Code review edits.
* Code review edits.
* Code review edits.
* CI update.
* CI update.
* CI update.
* Added clippy warn so wip won't fail ci.
* Cargo fmt.
Diffstat (limited to 'src/main.rs')
| -rw-r--r-- | src/main.rs | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/main.rs b/src/main.rs index 105f3863..96b50cb2 100644 --- a/src/main.rs +++ b/src/main.rs @@ -134,10 +134,7 @@ pub fn start(mut os_input: Box<dyn OsApi>, opts: Opt) { os_input.clone(), opts.debug, ); - let maybe_layout = opts.layout.and_then(|layout_path| { - let layout = Layout::new(layout_path); - Some(layout) - }); + let maybe_layout = opts.layout.map(Layout::new); active_threads.push( thread::Builder::new() @@ -316,6 +313,7 @@ pub fn start(mut os_input: Box<dyn OsApi>, opts: Opt) { // This eventually calls the `.init()` method start.call(&[])?; + #[warn(clippy::never_loop)] loop { break; //let (cols, rows) = terminal::size()?; @@ -377,7 +375,7 @@ pub fn start(mut os_input: Box<dyn OsApi>, opts: Opt) { match stream { Ok(mut stream) => { let mut buffer = [0; 65535]; // TODO: more accurate - stream + let _ = stream .read(&mut buffer) .expect("failed to parse ipc message"); let decoded: ApiCommand = bincode::deserialize(&buffer) @@ -422,7 +420,6 @@ pub fn start(mut os_input: Box<dyn OsApi>, opts: Opt) { let send_pty_instructions = send_pty_instructions.clone(); let send_app_instructions = send_app_instructions.clone(); let os_input = os_input.clone(); - let command_is_executing = command_is_executing.clone(); move || { input_loop( os_input, @@ -434,6 +431,7 @@ pub fn start(mut os_input: Box<dyn OsApi>, opts: Opt) { } }); + #[warn(clippy::never_loop)] loop { let app_instruction = receive_app_instructions .recv() @@ -459,7 +457,7 @@ pub fn start(mut os_input: Box<dyn OsApi>, opts: Opt) { ); os_input.unset_raw_mode(0); - os_input + let _ = os_input .get_stdout_writer() .write(goodbye_message.as_bytes()) .unwrap(); |
