satisfy clippy

This commit is contained in:
Nikita Galaiko 2023-10-17 14:40:11 +02:00 committed by GitButler
parent 8795a9dd2a
commit 94f257e8b1
3 changed files with 2 additions and 3 deletions

View File

@ -101,7 +101,6 @@ fn from_key(key: &keys::PrivateKey) -> CredentialsCallback {
fn from_token(token: &str) -> CredentialsCallback {
Box::new(move |url, _username_from_url, _allowed_types| {
tracing::debug!("authenticating with {} using github token", url);
dbg!(token, url);
git2::Cred::userpass_plaintext("git", token)
})
}

View File

@ -1,4 +1,4 @@
#![forbid(unsafe_code)]
#![forbid(unsafe_code, dead_code)]
#![deny(
clippy::all,
clippy::perf,

View File

@ -468,7 +468,7 @@ impl Controller {
self.with_lock(project_id, || {
self.with_verify_branch(project_id, |gb_repository, project_repository, user| {
let credentials = git::credentials::Factory::new(
&project_repository.project(),
project_repository.project(),
self.keys
.get_or_create()
.context("failed to get or create private key")?,