Skip to content

Commit 75e1f4f

Browse files
committed
Ignore ref_option pedantic clippy lint
warning: it is more idiomatic to use `Option<&T>` instead of `&Option<T>` --> src/generics.rs:258:5 | 258 | pub fn where_clause_for_body(&mut self, where_clause: &Option<WhereClause>) { | ^ -------------------- help: change this to: `Option<&WhereClause>` | _____| | | 259 | | let hardbreaks = true; 260 | | let semi = false; 261 | | self.where_clause_impl(where_clause, hardbreaks, semi); 262 | | } | |_____^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ref_option = note: `-W clippy::ref-option` implied by `-W clippy::pedantic` = help: to override `-W clippy::pedantic` add `#[allow(clippy::ref_option)]` warning: it is more idiomatic to use `Option<&T>` instead of `&Option<T>` --> src/generics.rs:264:5 | 264 | pub fn where_clause_semi(&mut self, where_clause: &Option<WhereClause>) { | ^ -------------------- help: change this to: `Option<&WhereClause>` | _____| | | 265 | | let hardbreaks = true; 266 | | let semi = true; 267 | | self.where_clause_impl(where_clause, hardbreaks, semi); 268 | | } | |_____^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ref_option warning: it is more idiomatic to use `Option<&T>` instead of `&Option<T>` --> src/generics.rs:270:5 | 270 | pub fn where_clause_oneline(&mut self, where_clause: &Option<WhereClause>) { | ^ -------------------- help: change this to: `Option<&WhereClause>` | _____| | | 271 | | let hardbreaks = false; 272 | | let semi = false; 273 | | self.where_clause_impl(where_clause, hardbreaks, semi); 274 | | } | |_____^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ref_option warning: it is more idiomatic to use `Option<&T>` instead of `&Option<T>` --> src/generics.rs:276:5 | 276 | pub fn where_clause_oneline_semi(&mut self, where_clause: &Option<WhereClause>) { | ^ -------------------- help: change this to: `Option<&WhereClause>` | _____| | | 277 | | let hardbreaks = false; 278 | | let semi = true; 279 | | self.where_clause_impl(where_clause, hardbreaks, semi); 280 | | } | |_____^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ref_option warning: it is more idiomatic to use `Option<&T>` instead of `&Option<T>` --> src/generics.rs:282:5 | 282 | / fn where_clause_impl( 283 | | &mut self, 284 | | where_clause: &Option<WhereClause>, | | -------------------- help: change this to: `Option<&WhereClause>` 285 | | hardbreaks: bool, ... | 332 | | } 333 | | } | |_____^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ref_option warning: it is more idiomatic to use `Option<&T>` instead of `&Option<T>` --> src/path.rs:174:5 | 174 | pub fn qpath(&mut self, qself: &Option<QSelf>, path: &Path, kind: PathKind) { | ^ -------------- help: change this to: `Option<&QSelf>` | _____| | | 175 | | let qself = if let Some(qself) = qself { 176 | | qself 177 | | } else { ... | 205 | | } 206 | | } | |_____^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ref_option
1 parent c28d8ea commit 75e1f4f

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -334,6 +334,7 @@
334334
clippy::module_name_repetitions,
335335
clippy::must_use_candidate,
336336
clippy::needless_pass_by_value,
337+
clippy::ref_option,
337338
clippy::similar_names,
338339
clippy::too_many_lines,
339340
clippy::unused_self,

0 commit comments

Comments
 (0)