Skip to content

Commit

Permalink
Remove unused dep
Browse files Browse the repository at this point in the history
  • Loading branch information
bubelov committed Feb 4, 2025
1 parent 5ea944a commit 61e9f3b
Show file tree
Hide file tree
Showing 41 changed files with 26 additions and 626 deletions.
149 changes: 0 additions & 149 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 1 addition & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,12 @@ panic = "abort"

# This is the main dependency, providing a webserver and core infra
# https://github.com/actix/actix-web/blob/master/actix-web/CHANGES.md
actix-web = { version = "4.9.0", default-features = false, features = ["compress-brotli"] }
actix-web = { version = "4.9.0", default-features = false, features = ["macros", "compress-brotli"] }

# Experimental extractors
# https://github.com/robjtede/actix-web-lab/releases
actix-web-lab = { version = "0.23.0" }

# JSON RPC support
# https://crates.io/crates/jsonrpc-v2
jsonrpc-v2 = { version = "0.13.0", default-features = false, features = ["actix-web-v4-integration"] }

# Rate limiters
# https://github.com/AaronErhardt/actix-governor/releases
actix-governor = { version = "0.6.0", default-features = false }
Expand Down
3 changes: 0 additions & 3 deletions src/error.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
use actix_web::{
error::QueryPayloadError, http::StatusCode, HttpRequest, HttpResponse, ResponseError,
};
use jsonrpc_v2::ErrorLike;
use serde::{Deserialize, Serialize};
use std::fmt::{Display, Formatter};

Expand Down Expand Up @@ -173,8 +172,6 @@ impl ResponseError for Error {
}
}

impl ErrorLike for Error {}

pub fn action_is_not_allowed(action: impl Into<String>) -> Error {
let action = action.into();
Error::Unauthorized(format!("you are not allowed to perform action {action}"))
Expand Down
8 changes: 4 additions & 4 deletions src/feed/atom.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ use time::format_description::well_known::Rfc3339;
use time::{Duration, OffsetDateTime};

#[get("/new-places")]
async fn new_places(pool: Data<Pool>) -> Result<impl Responder> {
pub async fn new_places(pool: Data<Pool>) -> Result<impl Responder> {
let events: Vec<(Event, Element)> = pool
.get()
.await?
Expand Down Expand Up @@ -44,7 +44,7 @@ async fn new_places(pool: Data<Pool>) -> Result<impl Responder> {
}

#[get("/new-places/{area}")]
async fn new_places_for_area(area: Path<String>, pool: Data<Pool>) -> Result<impl Responder> {
pub async fn new_places_for_area(area: Path<String>, pool: Data<Pool>) -> Result<impl Responder> {
let area = Area::select_by_id_or_alias_async(area.to_string(), &pool).await?;
let area_elements = pool
.get()
Expand Down Expand Up @@ -132,7 +132,7 @@ fn event_to_atom_entry(event: (Event, Element)) -> String {
}

#[get("/new-comments")]
async fn new_comments(pool: Data<Pool>) -> Result<impl Responder> {
pub async fn new_comments(pool: Data<Pool>) -> Result<impl Responder> {
let comments: Vec<(ElementComment, Element)> = pool
.get()
.await?
Expand Down Expand Up @@ -166,7 +166,7 @@ async fn new_comments(pool: Data<Pool>) -> Result<impl Responder> {
}

#[get("/new-comments/{area}")]
async fn new_comments_for_area(area: Path<String>, pool: Data<Pool>) -> Result<impl Responder> {
pub async fn new_comments_for_area(area: Path<String>, pool: Data<Pool>) -> Result<impl Responder> {
let area = Area::select_by_id_or_alias_async(area.to_string(), &pool).await?;
let area_id = area.id;
let area_name = area.name();
Expand Down
Loading

0 comments on commit 61e9f3b

Please sign in to comment.