mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-04 13:06:50 +00:00
chore: clean up compile warnings
This commit is contained in:
parent
16ce67e02c
commit
89d6481ddb
16 changed files with 37 additions and 32 deletions
|
|
@ -1,6 +1,8 @@
|
|||
use axum::http::StatusCode;
|
||||
use std::fmt;
|
||||
|
||||
// todo
|
||||
#[allow(dead_code)]
|
||||
#[derive(Debug)]
|
||||
pub struct PKError {
|
||||
pub response_code: StatusCode,
|
||||
|
|
@ -16,6 +18,7 @@ impl fmt::Display for PKError {
|
|||
|
||||
impl std::error::Error for PKError {}
|
||||
|
||||
#[allow(unused_macros)]
|
||||
macro_rules! define_error {
|
||||
( $name:ident, $response_code:expr, $json_code:expr, $message:expr ) => {
|
||||
const $name: PKError = PKError {
|
||||
|
|
@ -26,4 +29,4 @@ macro_rules! define_error {
|
|||
};
|
||||
}
|
||||
|
||||
define_error! { GENERIC_BAD_REQUEST, StatusCode::BAD_REQUEST, 0, "400: Bad Request" }
|
||||
// define_error! { GENERIC_BAD_REQUEST, StatusCode::BAD_REQUEST, 0, "400: Bad Request" }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue