diff options
| author | Xe Iaso <me@xeiaso.net> | 2023-08-21 21:19:49 -0400 |
|---|---|---|
| committer | Xe Iaso <me@xeiaso.net> | 2023-08-21 21:19:49 -0400 |
| commit | 275327041b4ce5cac6e1adabc813ece54c646cd6 (patch) | |
| tree | ab4f9ce5b8aff7e39ed9b11f229ecd166155fd85 /src/handlers/feeds.rs | |
| parent | 90da0c1daea6dfefe801548443a3889b19def2b2 (diff) | |
| download | xesite-275327041b4ce5cac6e1adabc813ece54c646cd6.tar.xz xesite-275327041b4ce5cac6e1adabc813ece54c646cd6.zip | |
fix clippy suggestions
Signed-off-by: Xe Iaso <me@xeiaso.net>
Diffstat (limited to 'src/handlers/feeds.rs')
| -rw-r--r-- | src/handlers/feeds.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/handlers/feeds.rs b/src/handlers/feeds.rs index bc3d861..c55dcb7 100644 --- a/src/handlers/feeds.rs +++ b/src/handlers/feeds.rs @@ -16,8 +16,8 @@ lazy_static! { &["kind"] ) .unwrap(); - pub static ref ETAG: String = format!(r#"W/"{}""#, uuid::Uuid::new_v4().to_string().replace("-", "")); - pub static ref CACHEBUSTER: String = uuid::Uuid::new_v4().to_string().replace("-", ""); + pub static ref ETAG: String = format!(r#"W/"{}""#, uuid::Uuid::new_v4().to_string().replace('-', "")); + pub static ref CACHEBUSTER: String = uuid::Uuid::new_v4().to_string().replace('-', ""); } #[instrument(skip(state))] @@ -31,7 +31,7 @@ pub async fn jsonfeed(Extension(state): Extension<Arc<State>>) -> Json<xe_jsonfe #[axum_macros::debug_handler] pub async fn new_post(Extension(state): Extension<Arc<State>>) -> Result<Json<NewPost>> { let state = state.clone(); - let p: Post = state.everything.iter().next().unwrap().clone(); + let p: Post = state.everything.get(0).unwrap().clone(); Ok(Json(p.new_post)) } |
