From 09a8737f242f6ea7c709ef4afb5a6d6c6a6c8536 Mon Sep 17 00:00:00 2001 From: Devin Ragotzy Date: Fri, 11 Jun 2021 15:47:53 -0400 Subject: [PATCH] Export conduits Config struct and fix clipp warningsy --- Cargo.lock | 6 +++--- src/error.rs | 3 ++- src/lib.rs | 4 ++-- src/server_server.rs | 3 +-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index c3d7408b..1bf8a3fe 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -982,9 +982,9 @@ dependencies = [ [[package]] name = "itertools" -version = "0.10.0" +version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37d572918e350e82412fe766d24b15e6682fb2ed2bbe018280caa810397cb319" +checksum = "69ddb889f9d0d08a67338271fa9b62996bc788c7796a5c18cf057420aaed5eaf" dependencies = [ "either", ] @@ -2122,7 +2122,7 @@ name = "ruma-state-res" version = "0.1.0" source = "git+https://github.com/ruma/ruma?rev=5a7e2cddcf257e367465cced51442c91e8f557c9#5a7e2cddcf257e367465cced51442c91e8f557c9" dependencies = [ - "itertools 0.10.0", + "itertools 0.10.1", "js_int", "maplit", "ruma-common", diff --git a/src/error.rs b/src/error.rs index 4f363fff..e1393863 100644 --- a/src/error.rs +++ b/src/error.rs @@ -1,4 +1,4 @@ -use log::{error, warn}; +use log::warn; use ruma::{ api::client::{ error::{Error as RumaError, ErrorKind}, @@ -12,6 +12,7 @@ use thiserror::Error; use { crate::RumaResponse, http::StatusCode, + log::error, rocket::{ response::{self, Responder}, Request, diff --git a/src/lib.rs b/src/lib.rs index 50ca6ea6..fbffb7e3 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -10,10 +10,10 @@ mod ruma_wrapper; pub mod server_server; mod utils; -pub use database::Database; +pub use database::{Config, Database}; pub use error::{Error, Result}; pub use pdu::PduEvent; -pub use rocket::Config; +pub use rocket::Config as RocketConfig; pub use ruma_wrapper::{ConduitResult, Ruma, RumaResponse}; use std::ops::Deref; diff --git a/src/server_server.rs b/src/server_server.rs index 961cc9d8..20e24add 100644 --- a/src/server_server.rs +++ b/src/server_server.rs @@ -662,8 +662,7 @@ pub async fn send_transaction_message_route( for edu in body .edus .iter() - .map(|edu| serde_json::from_str::(edu.json().get())) - .filter_map(|r| r.ok()) + .filter_map(|edu| serde_json::from_str::(edu.json().get()).ok()) { match edu { Edu::Presence(_) => {}