Skip to content

Commit

Permalink
chore: silent nightly warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
udoprog committed Aug 11, 2024
1 parent c39adee commit 1593d81
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 0 deletions.
2 changes: 2 additions & 0 deletions crates/rune-alloc/src/alloc/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ impl<T> SizedTypeProperties for T {}
pub(crate) fn into_ok<T>(result: Result<T, Infallible>) -> T {
match result {
Ok(value) => value,
#[allow(unreachable_patterns)]
Err(error) => match error {},
}
}
Expand All @@ -52,6 +53,7 @@ pub(crate) fn into_ok_try<T>(result: Result<T, CustomError<Infallible>>) -> Resu
Ok(value) => Ok(value),
Err(error) => match error {
CustomError::Error(error) => Err(error),
#[allow(unreachable_patterns)]
CustomError::Custom(error) => match error {},
},
}
Expand Down
1 change: 1 addition & 0 deletions crates/rune-alloc/src/btree/map.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ macro_rules! into_iter {
pub(crate) fn into_ok<T>(result: Result<T, Infallible>) -> T {
match result {
Ok(value) => value,
#[allow(unreachable_patterns)]
Err(error) => match error {},
}
}
Expand Down
1 change: 1 addition & 0 deletions crates/rune-alloc/src/btree/navigate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ enum Never {}
fn into_ok<T>(result: Result<T, Never>) -> T {
match result {
Ok(value) => value,
#[allow(unreachable_patterns)]
Err(never) => match never {},
}
}
Expand Down
1 change: 1 addition & 0 deletions crates/rune-alloc/src/hashbrown/map.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1846,6 +1846,7 @@ where
None
}
Err(ErrorOrInsertSlot::Error(error)) => match error {
#[allow(unreachable_patterns)]
CustomError::Custom(error) => match error {},
CustomError::Error(error) => return Err(error),
},
Expand Down
1 change: 1 addition & 0 deletions crates/rune-alloc/src/testing/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ impl<T> TestExt<T> for Result<T, Infallible> {
fn abort(self) -> T {
match self {
Ok(value) => value,
#[allow(unreachable_patterns)]
Err(error) => match error {},
}
}
Expand Down
1 change: 1 addition & 0 deletions crates/rune/src/ast/expr_binary.rs
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,7 @@ impl Peek for BinOp {
fn peek(p: &mut Peeker<'_>) -> bool {
match Self::from_peeker(p) {
Ok(tok) => tok.is_some(),
#[allow(unreachable_patterns)]
Err(infallible) => match infallible {},
}
}
Expand Down
1 change: 1 addition & 0 deletions crates/rune/src/runtime/to_value.rs
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,7 @@ macro_rules! number_value_trait {
fn to_value(self) -> VmResult<Value> {
match <i64>::try_from(self) {
Ok(number) => VmResult::Ok(vm_try!(Value::try_from(number))),
#[allow(unreachable_patterns)]
Err(..) => VmResult::err(VmErrorKind::IntegerToValueCoercionError {
from: VmIntegerRepr::from(self),
to: any::type_name::<i64>(),
Expand Down

0 comments on commit 1593d81

Please sign in to comment.