chore (backend-rs): remove unneeded serde derives

This commit is contained in:
naskya 2024-05-31 21:28:53 +09:00
parent 6113b183d3
commit 2e44357665
No known key found for this signature in database
GPG key ID: 712D413B3A9FED5C
5 changed files with 11 additions and 11 deletions

View file

@ -3,7 +3,7 @@
use crate::federation::nodeinfo::schema::*;
use crate::util::http_client;
use isahc::AsyncReadResponseExt;
use serde::{Deserialize, Serialize};
use serde::Deserialize;
#[derive(thiserror::Error, Debug)]
pub enum Error {
@ -21,12 +21,12 @@ pub enum Error {
MissingNodeinfo,
}
#[derive(Deserialize, Serialize, Debug)]
#[derive(Deserialize, Debug)]
pub struct NodeinfoLinks {
links: Vec<NodeinfoLink>,
}
#[derive(Deserialize, Serialize, Debug)]
#[derive(Deserialize, Debug)]
pub struct NodeinfoLink {
rel: String,
href: String,

View file

@ -1,7 +1,7 @@
use serde::{Deserialize, Serialize};
use serde::Deserialize;
// TODO?: handle name collisions
#[derive(Debug, Deserialize, Serialize)]
#[derive(Debug, Deserialize)]
#[serde(rename_all = "camelCase")]
#[crate::export(object, js_name = "NoteLikeForGetNoteSummary")]
pub struct NoteLike {

View file

@ -3,7 +3,7 @@
use crate::database::cache;
use crate::util::http_client;
use isahc::ReadResponseExt;
use serde::{Deserialize, Serialize};
use serde::Deserialize;
#[derive(thiserror::Error, Debug)]
pub enum Error {
@ -25,7 +25,7 @@ const UPSTREAM_PACKAGE_JSON_URL: &str =
"https://firefish.dev/firefish/firefish/-/raw/main/package.json";
async fn get_latest_version() -> Result<String, Error> {
#[derive(Debug, Deserialize, Serialize)]
#[derive(Debug, Deserialize)]
struct Response {
version: String,
}

View file

@ -1,8 +1,8 @@
use crate::service::stream::{publish_to_stream, Error, Stream};
use serde::{Deserialize, Serialize};
use serde::Serialize;
// TODO: define schema type in other place
#[derive(Deserialize, Serialize)]
#[derive(Serialize)]
#[serde(rename_all = "camelCase")]
#[crate::export(object)]
pub struct PackedEmoji {

View file

@ -1,7 +1,7 @@
use crate::service::stream::{publish_to_stream, Error, Stream};
use serde::{Deserialize, Serialize};
use serde::Serialize;
#[derive(Deserialize, Serialize)]
#[derive(Serialize)]
#[serde(rename_all = "camelCase")]
#[crate::export(object)]
pub struct AbuseUserReportLike {