wezterm-dynamic: Allow unreachable code in macro for infallible conversion (#8364)
The macro impl of `FromDynamic` can have unreachable error paths for types that have infallible conversions from i64/u64 (i.e. i64 & u64).
This commit is contained in:
1 parent
8066067dec
commit
0eeca0adfb
1 file changed
+2
@@ -251,10 +251,12 @@ impl FromDynamic for $ty {
|
||||
match value {
|
||||
Value::I64(n) => match (*n).try_into() {
|
||||
Ok(n) => Ok(n),
|
||||
#[allow(unreachable_code, reason = "unreachable for i64")]
|
||||
Err(err) => Err(Error::Message(err.to_string())),
|
||||
},
|
||||
Value::U64(n) => match (*n).try_into() {
|
||||
Ok(n) => Ok(n),
|
||||
#[allow(unreachable_code, reason = "unreachable for u64")]
|
||||
Err(err) => Err(Error::Message(err.to_string())),
|
||||
},
|
||||
other => Err(Error::NoConversion{
|
||||
|
||||
Reference in new issue
Block a user