fix(clippy): apply auto-fixable linting suggestions
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
id: safecell-new-inline
|
||||
language: Rust
|
||||
rule:
|
||||
pattern: $CELL.write_inline(|$W| $BODY);
|
||||
follows:
|
||||
pattern: let mut $CELL = SafeCell::new($INIT);
|
||||
fix:
|
||||
template: let mut $CELL = SafeCell::new_inline(|$W| $BODY);
|
||||
expandStart:
|
||||
id: safecell-new-inline
|
||||
language: Rust
|
||||
rule:
|
||||
pattern: $CELL.write_inline(|$W| $BODY);
|
||||
follows:
|
||||
pattern: let mut $CELL = SafeCell::new($INIT);
|
||||
fix:
|
||||
template: let mut $CELL = SafeCell::new_inline(|$W| $BODY);
|
||||
expandStart:
|
||||
pattern: let mut $CELL = SafeCell::new($INIT)
|
||||
@@ -1,17 +1,17 @@
|
||||
id: safecell-read-inline
|
||||
language: Rust
|
||||
rule:
|
||||
pattern:
|
||||
context: |
|
||||
{
|
||||
let $READ = $CELL.read();
|
||||
$$$BODY
|
||||
}
|
||||
selector: block
|
||||
inside:
|
||||
kind: block
|
||||
fix:
|
||||
template: |
|
||||
$CELL.read_inline(|$READ| {
|
||||
$$$BODY
|
||||
id: safecell-read-inline
|
||||
language: Rust
|
||||
rule:
|
||||
pattern:
|
||||
context: |
|
||||
{
|
||||
let $READ = $CELL.read();
|
||||
$$$BODY
|
||||
}
|
||||
selector: block
|
||||
inside:
|
||||
kind: block
|
||||
fix:
|
||||
template: |
|
||||
$CELL.read_inline(|$READ| {
|
||||
$$$BODY
|
||||
});
|
||||
@@ -1,13 +1,13 @@
|
||||
id: safecell-write-inline
|
||||
language: Rust
|
||||
rule:
|
||||
pattern: |
|
||||
{
|
||||
let mut $WRITE = $CELL.write();
|
||||
$$$BODY
|
||||
}
|
||||
fix:
|
||||
template: |
|
||||
$CELL.write_inline(|$WRITE| {
|
||||
$$$BODY
|
||||
id: safecell-write-inline
|
||||
language: Rust
|
||||
rule:
|
||||
pattern: |
|
||||
{
|
||||
let mut $WRITE = $CELL.write();
|
||||
$$$BODY
|
||||
}
|
||||
fix:
|
||||
template: |
|
||||
$CELL.write_inline(|$WRITE| {
|
||||
$$$BODY
|
||||
});
|
||||
Reference in New Issue
Block a user