Skip to content

Commit 1dd9a2f

Browse files
committed
suppress clippy warnings
1 parent 12601d0 commit 1dd9a2f

2 files changed

Lines changed: 6 additions & 1 deletion

File tree

‎vm/sre_engine/src/engine.rs‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -283,6 +283,8 @@ fn _match<S: StrDrive>(req: &Request<S>, state: &mut State, mut ctx: MatchContex
283283
let mut context_stack = vec![];
284284
let mut popped_result = false;
285285

286+
// NOTE: 'result loop is not an actual loop but break label
287+
#[allow(clippy::never_loop)]
286288
'coro: loop {
287289
popped_result = 'result: loop {
288290
let yielded = 'context: loop {
@@ -513,6 +515,7 @@ fn _match<S: StrDrive>(req: &Request<S>, state: &mut State, mut ctx: MatchContex
513515
loop {
514516
macro_rules! general_op_literal {
515517
($f:expr) => {{
518+
#[allow(clippy::redundant_closure_call)]
516519
if ctx.at_end(req) || !$f(ctx.peek_code(req, 1), ctx.peek_char::<S>()) {
517520
break 'result false;
518521
}
@@ -523,6 +526,7 @@ fn _match<S: StrDrive>(req: &Request<S>, state: &mut State, mut ctx: MatchContex
523526

524527
macro_rules! general_op_in {
525528
($f:expr) => {{
529+
#[allow(clippy::redundant_closure_call)]
526530
if ctx.at_end(req) || !$f(&ctx.pattern(req)[2..], ctx.peek_char::<S>())
527531
{
528532
break 'result false;
@@ -551,6 +555,7 @@ fn _match<S: StrDrive>(req: &Request<S>, state: &mut State, mut ctx: MatchContex
551555
};
552556

553557
for _ in group_start..group_end {
558+
#[allow(clippy::redundant_closure_call)]
554559
if ctx.at_end(req)
555560
|| $f(ctx.peek_char::<S>()) != $f(gctx.peek_char::<S>())
556561
{

‎vm/sre_engine/src/string.rs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ impl StrDrive for &str {
101101
#[inline]
102102
fn adjust_cursor(&self, cursor: &mut StringCursor, n: usize) {
103103
if cursor.ptr.is_null() || cursor.position > n {
104-
*cursor = Self::create_cursor(&self, n);
104+
*cursor = Self::create_cursor(self, n);
105105
} else if cursor.position < n {
106106
Self::skip(cursor, n - cursor.position);
107107
}

0 commit comments

Comments
 (0)