Checking custom_derive v0.1.7 Checking bufstream v0.1.4 Checking enum_derive v0.1.7 Checking anyhow v1.0.26 Checking faux v0.0.4 Checking saleae v0.0.1 (/home/wcampbell/projects/wcampbell/code/saleae) warning: item name ends with its containing module's name --> src/device.rs:41:1 | 41 | / pub struct ConnectedDevice { 42 | | /// type of device 43 | | pub d_type: String, 44 | | /// name of device ... | 51 | | pub is_active: bool, 52 | | } | |_^ | = note: `-W clippy::module-name-repetitions` implied by `-W clippy::pedantic` = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_name_repetitions warning: item name starts with its containing module's name --> src/performance.rs:4:1 | 4 | / pub enum PerformanceOption { 5 | | Full = 100, 6 | | Half = 50, 7 | | Third = 33, 8 | | Quarter = 25, 9 | | Low = 20, 10 | | } | |_^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_name_repetitions warning: Unnecessary boolean `not` operation --> src/request.rs:21:21 | 21 | let d_str = if !digital_channels.is_empty() { | _____________________^ 22 | | format!( 23 | | ", digital_channels, {}", 24 | | Self::create_channel_str(digital_channels)? ... | 27 | | "".to_string() 28 | | }; | |_________^ | = note: `-W clippy::if-not-else` implied by `-W clippy::pedantic` = help: remove the `!` and swap the blocks of the `if`/`else` = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_not_else warning: Unnecessary boolean `not` operation --> src/request.rs:30:21 | 30 | let a_str = if !analog_channels.is_empty() { | _____________________^ 31 | | format!( 32 | | ", analog_channels, {}", 33 | | Self::create_channel_str(analog_channels)? ... | 36 | | "".to_string() 37 | | }; | |_________^ | = help: remove the `!` and swap the blocks of the `if`/`else` = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_not_else warning: you should put `SaleaeSocketAPI` between ticks in the documentation --> src/lib.rs:5:6 | 5 | //! [SaleaeSocketAPI](https://github.com/saleae/SaleaeSocketApi) | ^^^^^^^^^^^^^^^ | = note: `-W clippy::doc-markdown` implied by `-W clippy::pedantic` = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_markdown warning: could not read cargo metadata: Error during execution of `cargo metadata`: error: Unrecognized option: 'format-version' | = note: `-W clippy::cargo-common-metadata` implied by `-W clippy::cargo` = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cargo_common_metadata warning: could not read cargo metadata: Error during execution of `cargo metadata`: error: Unrecognized option: 'format-version' | = note: `-W clippy::multiple-crate-versions` implied by `-W clippy::cargo` = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#multiple_crate_versions warning: could not read cargo metadata: Error during execution of `cargo metadata`: error: Unrecognized option: 'format-version' | = note: `-W clippy::wildcard-dependencies` implied by `-W clippy::cargo` = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wildcard_dependencies warning: docs for function returning `Result` missing `# Errors` section --> src/client.rs:28:5 | 28 | / pub fn general_recieve_ack(&mut self) -> Result { 29 | | let r: String = std::str::from_utf8(&self.read_line()?)?.to_string(); 30 | | Ok(response::verify_ack(&r)) 31 | | } | |_____^ | = note: `-W clippy::missing-errors-doc` implied by `-W clippy::pedantic` = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc warning: docs for function returning `Result` missing `# Errors` section --> src/client.rs:33:5 | 33 | / pub fn general_recieve_message(&mut self) -> Result { 34 | | let msg: String = std::str::from_utf8(&self.read_line()?)?.to_string(); 35 | | response::verify_ack(&msg); 36 | | Ok(msg) 37 | | } | |_____^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc warning: docs for function returning `Result` missing `# Errors` section --> src/client.rs:47:5 | 47 | / pub fn run_command(&mut self, command: &str) -> Result<()> { 48 | | let mut writer = BufWriter::new(&self.stream); 49 | | writer.write_all(command.as_bytes()).unwrap(); 50 | | Ok(()) 51 | | } | |_____^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc warning: docs for function returning `Result` missing `# Errors` section --> src/client.rs:65:5 | 65 | / pub fn new(connection: Connection) -> Result { 66 | | Ok(Self { connection }) 67 | | } | |_____^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc warning: this could be a `const fn` --> src/client.rs:65:5 | 65 | / pub fn new(connection: Connection) -> Result { 66 | | Ok(Self { connection }) 67 | | } | |_____^ | = note: `-W clippy::missing-const-for-fn` implied by `-W clippy::nursery` = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_const_for_fn warning: docs for function returning `Result` missing `# Errors` section --> src/client.rs:75:5 | 75 | / pub fn set_num_samples(&mut self, num: u32) -> Result { 76 | | self.connection 77 | | .run_command(&format!("set_num_samples, {}\0", num))?; 78 | | Ok(self.connection.general_recieve_ack()?) 79 | | } | |_____^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc warning: docs for function returning `Result` missing `# Errors` section --> src/client.rs:81:5 | 81 | / pub fn get_num_samples(&mut self) -> Result { 82 | | self.connection.run_command("get_num_samples\0")?; 83 | | let response = self.connection.general_recieve_message()?; 84 | | if response::verify_ack(&response) { ... | 90 | | } 91 | | } | |_____^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc warning: docs for function returning `Result` missing `# Errors` section --> src/client.rs:94:5 | 94 | / pub fn set_capture_seconds(&mut self, seconds: f32) -> Result { 95 | | self.connection 96 | | .run_command(&format!("set_capture_seconds, {}\0", seconds))?; 97 | | Ok(self.connection.general_recieve_ack()?) 98 | | } | |_____^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc warning: docs for function returning `Result` missing `# Errors` section --> src/client.rs:104:5 | 104 | / pub fn set_sample_rate(&mut self, rate: &SampleRate) -> Result { 105 | | self.connection.run_command(&format!( 106 | | "set_sample_rate, {}, {}\0", 107 | | rate.DigitalSampleRate, rate.AnalogSampleRate 108 | | ))?; 109 | | Ok(self.connection.general_recieve_ack()?) 110 | | } | |_____^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc warning: docs for function returning `Result` missing `# Errors` section --> src/client.rs:112:5 | 112 | / pub fn get_sample_rate(&mut self) -> Result { 113 | | self.connection.run_command("get_sample_rate\0")?; 114 | | let response = self.connection.general_recieve_message()?; 115 | | Ok(response::parse_get_sample_rate(&response::remove_ack( 116 | | &response, 117 | | ))) 118 | | } | |_____^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc warning: docs for function returning `Result` missing `# Errors` section --> src/client.rs:120:5 | 120 | / pub fn get_all_sample_rates(&mut self) -> Result> { 121 | | self.connection.run_command("get_all_sample_rates\0")?; 122 | | let response = self.connection.general_recieve_message()?; 123 | | Ok(response::parse_get_all_sample_rates(&response::remove_ack( 124 | | &response, 125 | | ))) 126 | | } | |_____^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc warning: docs for function returning `Result` missing `# Errors` section --> src/client.rs:129:5 | 129 | / pub fn get_performance(&mut self) -> Result { 130 | | self.connection.run_command("get_performance\0")?; 131 | | let response = self.connection.general_recieve_message()?; 132 | | Ok(response::parse_performance(&response::remove_ack( 133 | | &response, 134 | | ))) 135 | | } | |_____^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc warning: docs for function returning `Result` missing `# Errors` section --> src/client.rs:138:5 | 138 | / pub fn set_performance(&mut self, perf: PerformanceOption) -> Result { 139 | | let input = String::from(&format!("set_performance, {}\0", perf as i32)); 140 | | self.connection.run_command(&input)?; 141 | | Ok(self.connection.general_recieve_ack()?) 142 | | } | |_____^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc warning: docs for function returning `Result` missing `# Errors` section --> src/client.rs:147:5 | 147 | / pub fn get_connected_devices(&mut self) -> Result> { 148 | | self.connection.run_command("get_connected_devices\0")?; 149 | | let response = self.connection.general_recieve_message()?; 150 | | Ok(response::parse_connected_devices(&response::remove_ack( 151 | | &response, 152 | | ))) 153 | | } | |_____^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc warning: docs for function returning `Result` missing `# Errors` section --> src/client.rs:162:5 | 162 | / pub fn select_active_device(&mut self, device: ConnectedDevice) -> Result { 163 | | let b = self 164 | | .get_connected_devices() 165 | | .unwrap() ... | 171 | | Ok(true) 172 | | } | |_____^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc warning: this argument is passed by value, but not consumed in the function body --> src/client.rs:162:52 | 162 | pub fn select_active_device(&mut self, device: ConnectedDevice) -> Result { | ^^^^^^^^^^^^^^^ help: consider taking a reference instead: `&ConnectedDevice` | = note: `-W clippy::needless-pass-by-value` implied by `-W clippy::pedantic` = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_value warning: docs for function returning `Result` missing `# Errors` section --> src/client.rs:175:5 | 175 | / pub fn get_active_device(&mut self) -> Result { 176 | | self.connection.run_command("get_connected_devices\0")?; 177 | | let response = self.connection.general_recieve_message()?; 178 | | Ok( ... | 183 | | ) 184 | | } | |_____^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc warning: docs for function returning `Result` missing `# Errors` section --> src/client.rs:188:5 | 188 | / pub fn get_active_channels(&mut self) -> Result>> { 189 | | self.connection.run_command("get_active_channels\0")?; 190 | | let response = self.connection.general_recieve_message()?; 191 | | Ok(response::parse_get_active_channels(&response::remove_ack( 192 | | &response, 193 | | ))?) 194 | | } | |_____^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc warning: you should put `get_active_channels` between ticks in the documentation --> src/client.rs:199:18 | 199 | /// TODO add get_active_channels | ^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_markdown warning: docs for function returning `Result` missing `# Errors` section --> src/client.rs:200:5 | 200 | / pub fn set_active_channels( 201 | | &mut self, 202 | | digital_channels: &[u8], 203 | | analog_channels: &[u8], ... | 210 | | Ok(self.connection.general_recieve_ack()?) 211 | | } | |_____^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc warning: docs for function returning `Result` missing `# Errors` section --> src/client.rs:214:5 | 214 | / pub fn reset_active_channels(&mut self) -> Result { 215 | | self.connection.run_command("reset_active_channels\0")?; 216 | | Ok(self.connection.general_recieve_ack()?) 217 | | } | |_____^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc warning: docs for function returning `Result` missing `# Errors` section --> src/client.rs:223:5 | 223 | / pub fn start_capture(&mut self) -> Result { 224 | | self.connection.run_command("capture\0")?; 225 | | Ok(true) 226 | | // Doesn't return ACK 227 | | } | |_____^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc warning: docs for function returning `Result` missing `# Errors` section --> src/client.rs:230:5 | 230 | / pub fn start_capture_block_until_finished(&mut self) -> Result { 231 | | self.start_capture()?; 232 | | Ok(self.connection.general_recieve_ack()?) 233 | | } | |_____^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc warning: docs for function returning `Result` missing `# Errors` section --> src/client.rs:236:5 | 236 | / pub fn is_processing_complete(&mut self) -> Result { 237 | | self.connection.run_command("is_processing_complete\0")?; 238 | | let response = self.connection.general_recieve_message()?; 239 | | Ok(response::parse_processing_complete(&response::remove_ack( 240 | | &response, 241 | | ))) 242 | | } | |_____^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc warning: docs for function returning `Result` missing `# Errors` section --> src/client.rs:245:5 | 245 | / pub fn stop_capture(&mut self) -> Result { 246 | | self.connection.run_command("stop_capture\0")?; 247 | | Ok(self.connection.general_recieve_ack()?) 248 | | } | |_____^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc warning: docs for function returning `Result` missing `# Errors` section --> src/client.rs:255:5 | 255 | / pub fn close_all_tabs(&mut self) -> Result { 256 | | self.connection.run_command("close_all_tabs\0")?; 257 | | Ok(self.connection.general_recieve_ack()?) 258 | | } | |_____^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc warning: docs for function returning `Result` missing `# Errors` section --> src/request.rs:10:5 | 10 | / pub fn prepare_set_active_channels( 11 | | digital_channels: &[u8], 12 | | analog_channels: &[u8], 13 | | ) -> Result { ... | 39 | | Ok(format!("set_active_channels{}{}\0", d_str, a_str)) 40 | | } | |_____^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc warning: docs for function returning `Result` missing `# Errors` section --> src/request.rs:45:5 | 45 | / pub fn create_channel_str(v: &[u8]) -> Result { 46 | | let s = v 47 | | .iter() 48 | | .map(|a| format!("{}, ", a.to_string())) 49 | | .collect::(); 50 | | Ok(s[..s.len() - 2].to_string()) 51 | | } | |_____^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc warning: you should put `nACK` between ticks in the documentation --> src/response.rs:9:29 | 9 | /// Return string without "\nACK" string line nor extra 0 char's from buffer | ^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_markdown warning: you should put `connected_devices` between ticks in the documentation --> src/response.rs:63:15 | 63 | /// Parse the connected_devices reponse into ConnectedDevice | ^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_markdown warning: you should put `ConnectedDevice` between ticks in the documentation --> src/response.rs:63:46 | 63 | /// Parse the connected_devices reponse into ConnectedDevice | ^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_markdown warning: docs for function returning `Result` missing `# Errors` section --> src/response.rs:76:1 | 76 | / pub fn parse_get_active_channels(response: &str) -> Result>> { 77 | | println!("{}", response); 78 | | let v: Vec<&str> = response.split(',').map(str::trim_start).collect(); 79 | | ... | 94 | | Ok(vec![digital_res, analog_res]) 95 | | } | |_^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc warning: 40 warnings emitted warning: item name ends with its containing module's name --> src/device.rs:41:1 | 41 | / pub struct ConnectedDevice { 42 | | /// type of device 43 | | pub d_type: String, 44 | | /// name of device ... | 51 | | pub is_active: bool, 52 | | } | |_^ | = note: `-W clippy::module-name-repetitions` implied by `-W clippy::pedantic` = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_name_repetitions warning: item name starts with its containing module's name --> src/performance.rs:4:1 | 4 | / pub enum PerformanceOption { 5 | | Full = 100, 6 | | Half = 50, 7 | | Third = 33, 8 | | Quarter = 25, 9 | | Low = 20, 10 | | } | |_^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_name_repetitions warning: Unnecessary boolean `not` operation --> src/request.rs:21:21 | 21 | let d_str = if !digital_channels.is_empty() { | _____________________^ 22 | | format!( 23 | | ", digital_channels, {}", 24 | | Self::create_channel_str(digital_channels)? ... | 27 | | "".to_string() 28 | | }; | |_________^ | = note: `-W clippy::if-not-else` implied by `-W clippy::pedantic` = help: remove the `!` and swap the blocks of the `if`/`else` = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_not_else warning: Unnecessary boolean `not` operation --> src/request.rs:30:21 | 30 | let a_str = if !analog_channels.is_empty() { | _____________________^ 31 | | format!( 32 | | ", analog_channels, {}", 33 | | Self::create_channel_str(analog_channels)? ... | 36 | | "".to_string() 37 | | }; | |_________^ | = help: remove the `!` and swap the blocks of the `if`/`else` = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_not_else warning: you should put `SaleaeSocketAPI` between ticks in the documentation --> src/lib.rs:5:6 | 5 | //! [SaleaeSocketAPI](https://github.com/saleae/SaleaeSocketApi) | ^^^^^^^^^^^^^^^ | = note: `-W clippy::doc-markdown` implied by `-W clippy::pedantic` = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_markdown warning: could not read cargo metadata: Error during execution of `cargo metadata`: error: Unrecognized option: 'format-version' | = note: `-W clippy::cargo-common-metadata` implied by `-W clippy::cargo` = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cargo_common_metadata warning: could not read cargo metadata: Error during execution of `cargo metadata`: error: Unrecognized option: 'format-version' | = note: `-W clippy::multiple-crate-versions` implied by `-W clippy::cargo` = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#multiple_crate_versions warning: could not read cargo metadata: Error during execution of `cargo metadata`: error: Unrecognized option: 'format-version' | = note: `-W clippy::wildcard-dependencies` implied by `-W clippy::cargo` = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wildcard_dependencies warning: docs for function returning `Result` missing `# Errors` section --> src/client.rs:28:5 | 28 | / pub fn general_recieve_ack(&mut self) -> Result { 29 | | let r: String = std::str::from_utf8(&self.read_line()?)?.to_string(); 30 | | Ok(response::verify_ack(&r)) 31 | | } | |_____^ | = note: `-W clippy::missing-errors-doc` implied by `-W clippy::pedantic` = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc warning: docs for function returning `Result` missing `# Errors` section --> src/client.rs:33:5 | 33 | / pub fn general_recieve_message(&mut self) -> Result { 34 | | let msg: String = std::str::from_utf8(&self.read_line()?)?.to_string(); 35 | | response::verify_ack(&msg); 36 | | Ok(msg) 37 | | } | |_____^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc warning: docs for function returning `Result` missing `# Errors` section --> src/client.rs:47:5 | 47 | / pub fn run_command(&mut self, command: &str) -> Result<()> { 48 | | let mut writer = BufWriter::new(&self.stream); 49 | | writer.write_all(command.as_bytes()).unwrap(); 50 | | Ok(()) 51 | | } | |_____^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc warning: docs for function returning `Result` missing `# Errors` section --> src/client.rs:65:5 | 65 | / pub fn new(connection: Connection) -> Result { 66 | | Ok(Self { connection }) 67 | | } | |_____^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc warning: this could be a `const fn` --> src/client.rs:65:5 | 65 | / pub fn new(connection: Connection) -> Result { 66 | | Ok(Self { connection }) 67 | | } | |_____^ | = note: `-W clippy::missing-const-for-fn` implied by `-W clippy::nursery` = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_const_for_fn warning: docs for function returning `Result` missing `# Errors` section --> src/client.rs:75:5 | 75 | / pub fn set_num_samples(&mut self, num: u32) -> Result { 76 | | self.connection 77 | | .run_command(&format!("set_num_samples, {}\0", num))?; 78 | | Ok(self.connection.general_recieve_ack()?) 79 | | } | |_____^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc warning: docs for function returning `Result` missing `# Errors` section --> src/client.rs:81:5 | 81 | / pub fn get_num_samples(&mut self) -> Result { 82 | | self.connection.run_command("get_num_samples\0")?; 83 | | let response = self.connection.general_recieve_message()?; 84 | | if response::verify_ack(&response) { ... | 90 | | } 91 | | } | |_____^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc warning: docs for function returning `Result` missing `# Errors` section --> src/client.rs:94:5 | 94 | / pub fn set_capture_seconds(&mut self, seconds: f32) -> Result { 95 | | self.connection 96 | | .run_command(&format!("set_capture_seconds, {}\0", seconds))?; 97 | | Ok(self.connection.general_recieve_ack()?) 98 | | } | |_____^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc warning: docs for function returning `Result` missing `# Errors` section --> src/client.rs:104:5 | 104 | / pub fn set_sample_rate(&mut self, rate: &SampleRate) -> Result { 105 | | self.connection.run_command(&format!( 106 | | "set_sample_rate, {}, {}\0", 107 | | rate.DigitalSampleRate, rate.AnalogSampleRate 108 | | ))?; 109 | | Ok(self.connection.general_recieve_ack()?) 110 | | } | |_____^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc warning: docs for function returning `Result` missing `# Errors` section --> src/client.rs:112:5 | 112 | / pub fn get_sample_rate(&mut self) -> Result { 113 | | self.connection.run_command("get_sample_rate\0")?; 114 | | let response = self.connection.general_recieve_message()?; 115 | | Ok(response::parse_get_sample_rate(&response::remove_ack( 116 | | &response, 117 | | ))) 118 | | } | |_____^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc warning: docs for function returning `Result` missing `# Errors` section --> src/client.rs:120:5 | 120 | / pub fn get_all_sample_rates(&mut self) -> Result> { 121 | | self.connection.run_command("get_all_sample_rates\0")?; 122 | | let response = self.connection.general_recieve_message()?; 123 | | Ok(response::parse_get_all_sample_rates(&response::remove_ack( 124 | | &response, 125 | | ))) 126 | | } | |_____^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc warning: docs for function returning `Result` missing `# Errors` section --> src/client.rs:129:5 | 129 | / pub fn get_performance(&mut self) -> Result { 130 | | self.connection.run_command("get_performance\0")?; 131 | | let response = self.connection.general_recieve_message()?; 132 | | Ok(response::parse_performance(&response::remove_ack( 133 | | &response, 134 | | ))) 135 | | } | |_____^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc warning: docs for function returning `Result` missing `# Errors` section --> src/client.rs:138:5 | 138 | / pub fn set_performance(&mut self, perf: PerformanceOption) -> Result { 139 | | let input = String::from(&format!("set_performance, {}\0", perf as i32)); 140 | | self.connection.run_command(&input)?; 141 | | Ok(self.connection.general_recieve_ack()?) 142 | | } | |_____^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc warning: docs for function returning `Result` missing `# Errors` section --> src/client.rs:147:5 | 147 | / pub fn get_connected_devices(&mut self) -> Result> { 148 | | self.connection.run_command("get_connected_devices\0")?; 149 | | let response = self.connection.general_recieve_message()?; 150 | | Ok(response::parse_connected_devices(&response::remove_ack( 151 | | &response, 152 | | ))) 153 | | } | |_____^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc warning: docs for function returning `Result` missing `# Errors` section --> src/client.rs:162:5 | 162 | / pub fn select_active_device(&mut self, device: ConnectedDevice) -> Result { 163 | | let b = self 164 | | .get_connected_devices() 165 | | .unwrap() ... | 171 | | Ok(true) 172 | | } | |_____^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc warning: this argument is passed by value, but not consumed in the function body --> src/client.rs:162:52 | 162 | pub fn select_active_device(&mut self, device: ConnectedDevice) -> Result { | ^^^^^^^^^^^^^^^ help: consider taking a reference instead: `&ConnectedDevice` | = note: `-W clippy::needless-pass-by-value` implied by `-W clippy::pedantic` = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_value warning: docs for function returning `Result` missing `# Errors` section --> src/client.rs:175:5 | 175 | / pub fn get_active_device(&mut self) -> Result { 176 | | self.connection.run_command("get_connected_devices\0")?; 177 | | let response = self.connection.general_recieve_message()?; 178 | | Ok( ... | 183 | | ) 184 | | } | |_____^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc warning: docs for function returning `Result` missing `# Errors` section --> src/client.rs:188:5 | 188 | / pub fn get_active_channels(&mut self) -> Result>> { 189 | | self.connection.run_command("get_active_channels\0")?; 190 | | let response = self.connection.general_recieve_message()?; 191 | | Ok(response::parse_get_active_channels(&response::remove_ack( 192 | | &response, 193 | | ))?) 194 | | } | |_____^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc warning: you should put `get_active_channels` between ticks in the documentation --> src/client.rs:199:18 | 199 | /// TODO add get_active_channels | ^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_markdown warning: docs for function returning `Result` missing `# Errors` section --> src/client.rs:200:5 | 200 | / pub fn set_active_channels( 201 | | &mut self, 202 | | digital_channels: &[u8], 203 | | analog_channels: &[u8], ... | 210 | | Ok(self.connection.general_recieve_ack()?) 211 | | } | |_____^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc warning: docs for function returning `Result` missing `# Errors` section --> src/client.rs:214:5 | 214 | / pub fn reset_active_channels(&mut self) -> Result { 215 | | self.connection.run_command("reset_active_channels\0")?; 216 | | Ok(self.connection.general_recieve_ack()?) 217 | | } | |_____^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc warning: docs for function returning `Result` missing `# Errors` section --> src/client.rs:223:5 | 223 | / pub fn start_capture(&mut self) -> Result { 224 | | self.connection.run_command("capture\0")?; 225 | | Ok(true) 226 | | // Doesn't return ACK 227 | | } | |_____^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc warning: docs for function returning `Result` missing `# Errors` section --> src/client.rs:230:5 | 230 | / pub fn start_capture_block_until_finished(&mut self) -> Result { 231 | | self.start_capture()?; 232 | | Ok(self.connection.general_recieve_ack()?) 233 | | } | |_____^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc warning: docs for function returning `Result` missing `# Errors` section --> src/client.rs:236:5 | 236 | / pub fn is_processing_complete(&mut self) -> Result { 237 | | self.connection.run_command("is_processing_complete\0")?; 238 | | let response = self.connection.general_recieve_message()?; 239 | | Ok(response::parse_processing_complete(&response::remove_ack( 240 | | &response, 241 | | ))) 242 | | } | |_____^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc warning: docs for function returning `Result` missing `# Errors` section --> src/client.rs:245:5 | 245 | / pub fn stop_capture(&mut self) -> Result { 246 | | self.connection.run_command("stop_capture\0")?; 247 | | Ok(self.connection.general_recieve_ack()?) 248 | | } | |_____^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc warning: docs for function returning `Result` missing `# Errors` section --> src/client.rs:255:5 | 255 | / pub fn close_all_tabs(&mut self) -> Result { 256 | | self.connection.run_command("close_all_tabs\0")?; 257 | | Ok(self.connection.general_recieve_ack()?) 258 | | } | |_____^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc warning: docs for function returning `Result` missing `# Errors` section --> src/request.rs:10:5 | 10 | / pub fn prepare_set_active_channels( 11 | | digital_channels: &[u8], 12 | | analog_channels: &[u8], 13 | | ) -> Result { ... | 39 | | Ok(format!("set_active_channels{}{}\0", d_str, a_str)) 40 | | } | |_____^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc warning: docs for function returning `Result` missing `# Errors` section --> src/request.rs:45:5 | 45 | / pub fn create_channel_str(v: &[u8]) -> Result { 46 | | let s = v 47 | | .iter() 48 | | .map(|a| format!("{}, ", a.to_string())) 49 | | .collect::(); 50 | | Ok(s[..s.len() - 2].to_string()) 51 | | } | |_____^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc warning: you should put `nACK` between ticks in the documentation --> src/response.rs:9:29 | 9 | /// Return string without "\nACK" string line nor extra 0 char's from buffer | ^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_markdown warning: you should put `connected_devices` between ticks in the documentation --> src/response.rs:63:15 | 63 | /// Parse the connected_devices reponse into ConnectedDevice | ^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_markdown warning: you should put `ConnectedDevice` between ticks in the documentation --> src/response.rs:63:46 | 63 | /// Parse the connected_devices reponse into ConnectedDevice | ^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_markdown warning: docs for function returning `Result` missing `# Errors` section --> src/response.rs:76:1 | 76 | / pub fn parse_get_active_channels(response: &str) -> Result>> { 77 | | println!("{}", response); 78 | | let v: Vec<&str> = response.split(',').map(str::trim_start).collect(); 79 | | ... | 94 | | Ok(vec![digital_res, analog_res]) 95 | | } | |_^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc warning: 40 warnings emitted warning: could not read cargo metadata: Error during execution of `cargo metadata`: error: Unrecognized option: 'format-version' | = note: `-W clippy::cargo-common-metadata` implied by `-W clippy::cargo` = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cargo_common_metadata warning: could not read cargo metadata: Error during execution of `cargo metadata`: error: Unrecognized option: 'format-version' | = note: `-W clippy::multiple-crate-versions` implied by `-W clippy::cargo` = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#multiple_crate_versions warning: could not read cargo metadata: Error during execution of `cargo metadata`: error: Unrecognized option: 'format-version' | = note: `-W clippy::wildcard-dependencies` implied by `-W clippy::cargo` = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wildcard_dependencies warning: 3 warnings emitted warning: could not read cargo metadata: Error during execution of `cargo metadata`: error: Unrecognized option: 'format-version' | = note: `-W clippy::cargo-common-metadata` implied by `-W clippy::cargo` = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cargo_common_metadata warning: could not read cargo metadata: Error during execution of `cargo metadata`: error: Unrecognized option: 'format-version' | = note: `-W clippy::multiple-crate-versions` implied by `-W clippy::cargo` = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#multiple_crate_versions warning: could not read cargo metadata: Error during execution of `cargo metadata`: error: Unrecognized option: 'format-version' | = note: `-W clippy::wildcard-dependencies` implied by `-W clippy::cargo` = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wildcard_dependencies warning: 3 warnings emitted warning: could not read cargo metadata: Error during execution of `cargo metadata`: error: Unrecognized option: 'format-version' | = note: `-W clippy::cargo-common-metadata` implied by `-W clippy::cargo` = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cargo_common_metadata warning: could not read cargo metadata: Error during execution of `cargo metadata`: error: Unrecognized option: 'format-version' | = note: `-W clippy::multiple-crate-versions` implied by `-W clippy::cargo` = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#multiple_crate_versions warning: could not read cargo metadata: Error during execution of `cargo metadata`: error: Unrecognized option: 'format-version' | = note: `-W clippy::wildcard-dependencies` implied by `-W clippy::cargo` = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wildcard_dependencies warning: this could be a `const fn` --> tests/client.rs:163:1 | 163 | / fn select_active_device() { 164 | | //TODO can't test b/c of get_connected_devices not being fauxable 165 | | //let device = ConnectedDevice { 166 | | // d_type: "4".to_string(), ... | 179 | | //assert_eq!(response, true); 180 | | } | |_^ | = note: `-W clippy::missing-const-for-fn` implied by `-W clippy::nursery` = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_const_for_fn warning: 4 warnings emitted warning: could not read cargo metadata: Error during execution of `cargo metadata`: error: Unrecognized option: 'format-version' | = note: `-W clippy::cargo-common-metadata` implied by `-W clippy::cargo` = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cargo_common_metadata warning: could not read cargo metadata: Error during execution of `cargo metadata`: error: Unrecognized option: 'format-version' | = note: `-W clippy::multiple-crate-versions` implied by `-W clippy::cargo` = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#multiple_crate_versions warning: could not read cargo metadata: Error during execution of `cargo metadata`: error: Unrecognized option: 'format-version' | = note: `-W clippy::wildcard-dependencies` implied by `-W clippy::cargo` = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wildcard_dependencies warning: 3 warnings emitted warning: could not read cargo metadata: Error during execution of `cargo metadata`: error: Unrecognized option: 'format-version' | = note: `-W clippy::cargo-common-metadata` implied by `-W clippy::cargo` = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cargo_common_metadata warning: could not read cargo metadata: Error during execution of `cargo metadata`: error: Unrecognized option: 'format-version' | = note: `-W clippy::multiple-crate-versions` implied by `-W clippy::cargo` = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#multiple_crate_versions warning: could not read cargo metadata: Error during execution of `cargo metadata`: error: Unrecognized option: 'format-version' | = note: `-W clippy::wildcard-dependencies` implied by `-W clippy::cargo` = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wildcard_dependencies warning: `input` is being shadowed --> tests/request.rs:44:9 | 44 | let input = [1, 2, 3, 5, 8]; | ^^^^^ | = note: `-W clippy::shadow-unrelated` implied by `-W clippy::pedantic` note: initialization happens here --> tests/request.rs:44:17 | 44 | let input = [1, 2, 3, 5, 8]; | ^^^^^^^^^^^^^^^ note: previous binding is here --> tests/request.rs:41:9 | 41 | let input = [0, 4, 5, 7]; | ^^^^^ = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#shadow_unrelated warning: 4 warnings emitted warning: binding's name is too similar to existing binding --> examples/example.rs:21:9 | 21 | let response02 = conn.select_active_device(response2); | ^^^^^^^^^^ | = note: `-W clippy::similar-names` implied by `-W clippy::pedantic` note: existing binding defined here --> examples/example.rs:18:9 | 18 | let response2 = conn.get_active_device().unwrap(); | ^^^^^^^^^ = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#similar_names warning: binding's name is too similar to existing binding --> examples/example.rs:51:9 | 51 | let response10 = conn.set_num_samples(10000); | ^^^^^^^^^^ | note: existing binding defined here --> examples/example.rs:8:9 | 8 | let response0 = conn.get_performance(); | ^^^^^^^^^ = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#similar_names warning: binding's name is too similar to existing binding --> examples/example.rs:57:9 | 57 | let response12 = conn.get_sample_rate(); | ^^^^^^^^^^ | note: existing binding defined here --> examples/example.rs:18:9 | 18 | let response2 = conn.get_active_device().unwrap(); | ^^^^^^^^^ = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#similar_names warning: binding's name is too similar to existing binding --> examples/example.rs:60:9 | 60 | let response13 = conn.get_all_sample_rates().unwrap(); | ^^^^^^^^^^ | note: existing binding defined here --> examples/example.rs:24:9 | 24 | let response3 = conn.reset_active_channels(); | ^^^^^^^^^ = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#similar_names warning: binding's name is too similar to existing binding --> examples/example.rs:65:9 | 65 | let response14 = conn.set_sample_rate(sample_rate); | ^^^^^^^^^^ | note: existing binding defined here --> examples/example.rs:33:9 | 33 | let response4 = conn.start_capture(); | ^^^^^^^^^ = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#similar_names warning: binding's name is too similar to existing binding --> examples/example.rs:68:9 | 68 | let response15 = conn.get_sample_rate(); | ^^^^^^^^^^ | note: existing binding defined here --> examples/example.rs:36:9 | 36 | let response5 = conn.is_processing_complete(); | ^^^^^^^^^ = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#similar_names warning: binding's name is too similar to existing binding --> examples/example.rs:71:9 | 71 | let response16 = conn.set_active_channels(&[0, 4, 5, 7], &[0, 1, 2, 5, 8]); | ^^^^^^^^^^ | note: existing binding defined here --> examples/example.rs:27:9 | 27 | let response6 = conn.start_capture_block_until_finished(); | ^^^^^^^^^ = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#similar_names warning: binding's name is too similar to existing binding --> examples/example.rs:74:9 | 74 | let response17 = conn.get_active_channels().unwrap(); | ^^^^^^^^^^ | note: existing binding defined here --> examples/example.rs:45:9 | 45 | let response7 = conn.is_processing_complete(); | ^^^^^^^^^ = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#similar_names warning: could not read cargo metadata: Error during execution of `cargo metadata`: error: Unrecognized option: 'format-version' | = note: `-W clippy::cargo-common-metadata` implied by `-W clippy::cargo` = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cargo_common_metadata warning: could not read cargo metadata: Error during execution of `cargo metadata`: error: Unrecognized option: 'format-version' | = note: `-W clippy::multiple-crate-versions` implied by `-W clippy::cargo` = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#multiple_crate_versions warning: could not read cargo metadata: Error during execution of `cargo metadata`: error: Unrecognized option: 'format-version' | = note: `-W clippy::wildcard-dependencies` implied by `-W clippy::cargo` = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wildcard_dependencies warning: 11 warnings emitted Finished dev [unoptimized + debuginfo] target(s) in 1.68s