casting to avoid calamity with signedness memes
This commit is contained in:
parent
aa9c515b95
commit
a9fafa8fdc
@ -20,6 +20,9 @@ impl FromDB<Invite, bool> for Invite {
|
|||||||
type Row = Option<(BigInt, Option<BigInt>, bool)>;
|
type Row = Option<(BigInt, Option<BigInt>, bool)>;
|
||||||
|
|
||||||
async fn get(p: &Pool, id: UBigInt) -> Response<Self> {
|
async fn get(p: &Pool, id: UBigInt) -> Response<Self> {
|
||||||
|
// NOTE: cast is required for this as `id` is used as unix timestamp
|
||||||
|
let id: BigInt = id as BigInt;
|
||||||
|
|
||||||
if id <= 0 {
|
if id <= 0 {
|
||||||
return Response::Empty;
|
return Response::Empty;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user