Switch to rust edition 2021

This commit is contained in:
silverpill 2022-12-15 16:58:18 +00:00
parent c8ff53a14c
commit 533cd81aa6
22 changed files with 4 additions and 39 deletions

View file

@ -4,8 +4,8 @@ version = "1.7.0"
description = "Federated micro-blogging platform and content subscription service" description = "Federated micro-blogging platform and content subscription service"
license = "AGPL-3.0" license = "AGPL-3.0"
edition = "2018" edition = "2021"
rust-version = "1.54" rust-version = "1.56"
publish = false publish = false
default-run = "mitra" default-run = "mitra"
@ -97,6 +97,7 @@ uuid = { version = "1.1.2", features = ["serde", "v4"] }
web3 = { version = "0.18.0", default-features = false, features = ["http", "http-tls", "signing"] } web3 = { version = "0.18.0", default-features = false, features = ["http", "http-tls", "signing"] }
[dev-dependencies] [dev-dependencies]
rand = { version = "*", features = ["small_rng"] }
serial_test = "0.5.1" serial_test = "0.5.1"
[features] [features]

View file

@ -36,7 +36,7 @@ Ethereum contracts: https://codeberg.org/silverpill/mitra-contracts
## Requirements ## Requirements
- Rust 1.54+ (when building from source) - Rust 1.56+ (when building from source)
- PostgreSQL 12+ - PostgreSQL 12+
- IPFS node (optional, see [guide](./docs/ipfs.md)) - IPFS node (optional, see [guide](./docs/ipfs.md))
- Ethereum node (optional) - Ethereum node (optional)

View file

@ -1,5 +1,4 @@
use std::collections::HashMap; use std::collections::HashMap;
use std::convert::TryInto;
use chrono::{DateTime, Utc}; use chrono::{DateTime, Utc};
use uuid::Uuid; use uuid::Uuid;

View file

@ -1,5 +1,4 @@
/// https://github.com/w3c-ccg/did-pkh/blob/main/did-pkh-method-draft.md /// https://github.com/w3c-ccg/did-pkh/blob/main/did-pkh-method-draft.md
use std::convert::TryInto;
use std::fmt; use std::fmt;
use std::str::FromStr; use std::str::FromStr;

View file

@ -1,6 +1,4 @@
/// https://jedisct1.github.io/minisign/ /// https://jedisct1.github.io/minisign/
use std::convert::TryInto;
use blake2::{Blake2b512, Digest}; use blake2::{Blake2b512, Digest};
use ed25519_dalek::{ use ed25519_dalek::{
PublicKey, PublicKey,

View file

@ -1,5 +1,3 @@
use std::convert::TryFrom;
use actix_web::HttpResponse; use actix_web::HttpResponse;
use serde::{Deserialize, Serialize}; use serde::{Deserialize, Serialize};

View file

@ -1,5 +1,3 @@
use std::convert::TryFrom;
use chrono::{DateTime, Utc}; use chrono::{DateTime, Utc};
use serde::{Deserialize, Serialize}; use serde::{Deserialize, Serialize};
use uuid::Uuid; use uuid::Uuid;

View file

@ -1,6 +1,4 @@
/// https://docs.joinmastodon.org/methods/statuses/ /// https://docs.joinmastodon.org/methods/statuses/
use std::convert::TryFrom;
use actix_web::{delete, get, post, web, HttpResponse, Scope}; use actix_web::{delete, get, post, web, HttpResponse, Scope};
use actix_web_httpauth::extractors::bearer::BearerAuth; use actix_web_httpauth::extractors::bearer::BearerAuth;
use uuid::Uuid; use uuid::Uuid;

View file

@ -1,5 +1,3 @@
use std::convert::TryFrom;
use chrono::{DateTime, Utc}; use chrono::{DateTime, Utc};
use serde_json::Value; use serde_json::Value;
use postgres_types::FromSql; use postgres_types::FromSql;

View file

@ -1,5 +1,3 @@
use std::convert::TryFrom;
use chrono::{DateTime, Utc}; use chrono::{DateTime, Utc};
use postgres_types::FromSql; use postgres_types::FromSql;
use uuid::Uuid; use uuid::Uuid;

View file

@ -1,5 +1,3 @@
use std::convert::TryFrom;
use chrono::{DateTime, Utc}; use chrono::{DateTime, Utc};
use postgres_types::FromSql; use postgres_types::FromSql;
use uuid::Uuid; use uuid::Uuid;

View file

@ -1,5 +1,3 @@
use std::convert::TryFrom;
use tokio_postgres::GenericClient; use tokio_postgres::GenericClient;
use uuid::Uuid; use uuid::Uuid;

View file

@ -1,5 +1,3 @@
use std::convert::TryFrom;
use chrono::{DateTime, Utc}; use chrono::{DateTime, Utc};
use postgres_types::FromSql; use postgres_types::FromSql;
use tokio_postgres::Row; use tokio_postgres::Row;

View file

@ -1,5 +1,3 @@
use std::convert::TryFrom;
use chrono::{DateTime, Utc}; use chrono::{DateTime, Utc};
use tokio_postgres::GenericClient; use tokio_postgres::GenericClient;
use uuid::Uuid; use uuid::Uuid;

View file

@ -1,5 +1,3 @@
use std::convert::TryFrom;
use chrono::{DateTime, Utc}; use chrono::{DateTime, Utc};
use postgres_types::FromSql; use postgres_types::FromSql;
use tokio_postgres::Row; use tokio_postgres::Row;

View file

@ -1,4 +1,3 @@
use std::convert::TryFrom;
use std::fmt; use std::fmt;
use std::str::FromStr; use std::str::FromStr;

View file

@ -1,5 +1,3 @@
use std::convert::TryFrom;
use tokio_postgres::GenericClient; use tokio_postgres::GenericClient;
use uuid::Uuid; use uuid::Uuid;

View file

@ -1,5 +1,3 @@
use std::convert::TryFrom;
use postgres_types::FromSql; use postgres_types::FromSql;
use tokio_postgres::Row; use tokio_postgres::Row;
use uuid::Uuid; use uuid::Uuid;

View file

@ -1,5 +1,3 @@
use std::convert::TryFrom;
use chrono::{DateTime, Utc}; use chrono::{DateTime, Utc};
use tokio_postgres::GenericClient; use tokio_postgres::GenericClient;
use uuid::Uuid; use uuid::Uuid;

View file

@ -1,5 +1,3 @@
use std::convert::TryFrom;
use chrono::{DateTime, Utc}; use chrono::{DateTime, Utc};
use postgres_types::FromSql; use postgres_types::FromSql;
use tokio_postgres::Row; use tokio_postgres::Row;

View file

@ -1,4 +1,3 @@
use std::convert::TryInto;
use std::str::FromStr; use std::str::FromStr;
use chrono::{Duration, Utc}; use chrono::{Duration, Utc};

View file

@ -1,5 +1,3 @@
use std::convert::TryFrom;
use regex::Regex; use regex::Regex;
use crate::errors::{ConversionError, ValidationError}; use crate::errors::{ConversionError, ValidationError};