Skip to content

Fix new lint on nightly #1702

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 3, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion src/db.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ impl Deref for DieselPooledConn<'_> {
}

pub fn connect_now() -> ConnectionResult<PgConnection> {
use diesel::Connection;
let mut url = Url::parse(&crate::env("DATABASE_URL")).expect("Invalid database URL");
if dotenv::var("HEROKU").is_ok() && !url.query_pairs().any(|(k, _)| k == "sslmode") {
url.query_pairs_mut().append_pair("sslmode", "require");
Expand Down
2 changes: 0 additions & 2 deletions src/middleware/current_user.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ pub enum AuthenticationSource {

impl Middleware for CurrentUser {
fn before(&self, req: &mut dyn Request) -> Result<(), Box<dyn Error + Send>> {
use std::mem::drop;

// Check if the request has a session cookie with a `user_id` property inside
let id = {
req.session()
Expand Down
2 changes: 0 additions & 2 deletions src/tests/owners.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@ impl crate::util::MockCookieUser {
/// As the currently logged in user, accept an invitation to become an owner of the named
/// crate.
fn accept_ownership_invitation(&self, krate_name: &str, krate_id: i32) {
use cargo_registry::views::InvitationResponse;

let body = json!({
"crate_owner_invite": {
"invited_by_username": "",
Expand Down